@@ -3,11 +3,6 @@ window.addEventListener("DOMContentLoaded", () => {
33 const searchModalEl = document . getElementById ( "search" ) ;
44 const root = document . documentElement ;
55
6- // Get the current doc platform
7- const activePlatform = document
8- . getElementsByTagName ( "meta" )
9- [ "docsearch:platform" ] . getAttribute ( "content" ) ;
10-
116 // Set search page title
127 // TODO: Do the right way
138 const pageName = document
@@ -103,8 +98,8 @@ window.addEventListener("DOMContentLoaded", () => {
10398 initialUiState : {
10499 minio : {
105100 refinementList : {
106- platform : [ activePlatform ] ,
107- site : "docs"
101+ site : "docs" ,
102+ edition : "community" ,
108103 } ,
109104 } ,
110105 } ,
@@ -128,17 +123,6 @@ window.addEventListener("DOMContentLoaded", () => {
128123 if ( query !== "" ) {
129124 // Make search modal active
130125 searchModalEl . classList . add ( "search--focused" ) ;
131-
132- // Clear the filters and select the active platform
133- setTimeout ( ( ) => {
134- const activeFilterEl = document . querySelector (
135- ".search__filters__checkbox[value='" + activePlatform + "']"
136- ) ;
137-
138- if ( activeFilterEl && ! activeFilterEl . checked ) {
139- activeFilterEl . click ( ) ;
140- }
141- } , 50 ) ;
142126 } else {
143127 // Clear the filters
144128 clearRefinements ( ) ;
@@ -201,7 +185,6 @@ window.addEventListener("DOMContentLoaded", () => {
201185 </i>
202186 <div class="search__hits__text">
203187 <div class="search__hits__title">${ data . _highlightResult . hierarchy . lvl1 . value } </div>
204- <div class="search__hits__platform">${ data . platform } </div>
205188 </div>
206189 ` ;
207190 }
@@ -219,7 +202,6 @@ window.addEventListener("DOMContentLoaded", () => {
219202 <div class="search__hits__text">
220203 <div class="search__hits__title">${ data . _highlightResult . hierarchy . lvl2 . value } </div>
221204 <div class="search__hits__label">
222- <div class="search__hits__platform">${ data . platform } </div>
223205 ${ data . hierarchy . lvl1 }
224206 </div>
225207 </div>
@@ -239,7 +221,6 @@ window.addEventListener("DOMContentLoaded", () => {
239221 <div class="search__hits__text">
240222 <div class="search__hits__title">${ data . _highlightResult . hierarchy . lvl3 . value } </div>
241223 <div class="search__hits__label">
242- <div class="search__hits__platform">${ data . platform } </div>
243224 ${ data . hierarchy . lvl1 }
244225 </div>
245226 </div>
@@ -262,7 +243,6 @@ window.addEventListener("DOMContentLoaded", () => {
262243 data . _snippetResult . content . value
263244 } </div>
264245 <div class="search__hits__label">
265- <div class="search__hits__platform">${ data . platform } </div>
266246 ${ data . hierarchy . lvl1 }
267247 ${
268248 data . hierarchy . lvl2
@@ -374,24 +354,9 @@ window.addEventListener("DOMContentLoaded", () => {
374354 if ( e . key === "Enter" ) {
375355 const searchInputEl = document . querySelector ( ".search__input" ) ;
376356 if ( searchInputEl . value && document . activeElement === searchInputEl ) {
377- var platform = "" ;
378357 var environment = location . hostname === "localhost" || location . hostname === "127.0.0.1" ? "dev" : "prod" ;
379358
380- if ( activePlatform === "k8s" ) {
381- platform = "kubernetes/upstream" ;
382- } else if ( activePlatform === "openshift" ) {
383- platform = "kubernetes/openshift" ;
384- } else if ( activePlatform === "eks" ) {
385- platform = "kubernetes/eks" ;
386- } else if ( activePlatform === "gke" ) {
387- platform = "kubernetes/gke" ;
388- } else if ( activePlatform === "aks" ) {
389- platform = "kubernetes/aks" ;
390- } else {
391- platform = activePlatform ;
392- }
393-
394- var pathname = environment === "dev" ? "/search.html" : `/docs/minio/${ platform } /search.html` ;
359+ var pathname = environment === "dev" ? "/search.html" : `/docs/minio/search.html` ;
395360
396361 setTimeout ( ( ) => {
397362 window . location . pathname = pathname ;
0 commit comments