@@ -23,8 +23,9 @@ async function getsearchObj() {
2323async function atomicCoveo ( ) {
2424 /* Fetch the credentials */
2525 await customElements . whenDefined ( 'atomic-search-interface' ) ;
26- const token = localStorage . getItem ( 'coveo_jwt_v1' ) ;
27- const org_id = localStorage . getItem ( 'coveo_org_id_v1' ) ;
26+ const token =
27+ 'eyJhbGciOiJIUzI1NiJ9.eyJzZWFyY2hIdWIiOiJIVUJfRVNfTmdpbnhfRG9jc19BbmRfT3JnIiwidjgiOnRydWUsInRva2VuSWQiOiJ0NnMzdWt4Mng3dnNjbGVka2dxNWszMmZkbSIsIm9yZ2FuaXphdGlvbiI6ImY1bmV0d29ya3gxaDE2MDdoIiwidXNlcklkcyI6W3sidHlwZSI6IlVzZXIiLCJuYW1lIjoiYW5vbnltb3VzIiwicHJvdmlkZXIiOiJFbWFpbCBTZWN1cml0eSBQcm92aWRlciJ9XSwicm9sZXMiOlsicXVlcnlFeGVjdXRvciJdLCJpc3MiOiJTZWFyY2hBcGkiLCJleHAiOjE3NDMyMDgzMTEsImlhdCI6MTc0MzEyMTkxMX0.hc24F59yGngqAzrh4PyXpcPRN7hVN6Dpeg6BoiF1v-E' ;
28+ const org_id = 'f5networkx1h1607h' ;
2829 let searchObj = { token, org_id } ;
2930
3031 if ( token === null || org_id === null || isJwtExpired ( token ) ) {
@@ -85,8 +86,6 @@ async function atomicCoveo() {
8586 } ,
8687 } ) ;
8788
88- searchBarHeader . style . display =
89- sidebar || searchPageInterface ? 'none' : 'block' ;
9089 await searchBarHeader . executeFirstSearch ( ) ;
9190}
9291
@@ -158,26 +157,3 @@ document.addEventListener('DOMContentLoaded', async () => {
158157 legacyCoveo ( ) ;
159158 }
160159} ) ;
161-
162- window . addEventListener ( 'resize' , ( event ) => {
163- const searchBarHeader = document . querySelector ( '#search-standalone-header' ) ;
164- const searchPageInterface = document . querySelector ( '#search-v2' ) ;
165- const searchPageSearchbar = document . querySelector (
166- '#search-standalone-searchpage'
167- ) ;
168- const sidebar = document . querySelector ( '#sidebar-layout' ) ;
169-
170- if ( ! sidebar && ! searchPageInterface ) {
171- // Show when there is no sidebar or on the search page
172- searchBarHeader . style . display = 'block' ;
173- } else if ( sidebar && sidebar . offsetWidth === 0 ) {
174- // Show when there is a sidebar but is hidden due to resizing
175- searchBarHeader . style . display = 'block' ;
176- } else if ( searchPageInterface && searchPageSearchbar . offsetWidth === 0 ) {
177- // Show when on the search page but is "sidebar" searchbar is hidden
178- searchBarHeader . style . display = 'block' ;
179- } else {
180- // Go back to default state
181- searchBarHeader . style . display = 'none' ;
182- }
183- } ) ;
0 commit comments