2020-06-08 22:14:37 +00:00
/ * *
* @ external SearchData
* /
2020-02-17 19:49:43 +00:00
import searchBoxTemplate from '!!raw-loader!../includes/templates/SearchBox.mustache' ;
2020-07-14 21:40:28 +00:00
import { htmlUserLanguageAttributes } from './utils' ;
2020-02-17 19:49:43 +00:00
2020-05-29 19:07:55 +00:00
/ * *
2020-06-08 22:14:37 +00:00
* @ type { SearchData }
2020-05-29 19:07:55 +00:00
* /
2021-07-22 17:27:33 +00:00
const legacySearchBoxData = {
2020-05-29 19:07:55 +00:00
'form-action' : '/w/index.php' ,
2021-06-02 22:57:43 +00:00
class : 'vector-search-box vector-search-show-thumbnail' ,
2020-07-14 21:40:28 +00:00
'html-user-language-attributes' : htmlUserLanguageAttributes ,
2020-05-29 19:07:55 +00:00
'msg-search' : 'Search' ,
'html-input' : '<input type="search" name="search" placeholder="Search Wikipedia" title="Search Wikipedia [⌃⌥f]" accesskey="f" id="searchInput" autocomplete="off">' ,
'page-title' : 'Special:Search' ,
'html-button-search-fallback' : '<input type="submit" name="fulltext" value="Search" title="Search pages for this text" id="mw-searchButton" class="searchButton mw-fallbackSearchButton"/>' ,
'html-button-search' : '<input type="submit" name="go" value="Go" title="Go to a page with this exact name if it exists" id="searchButton" class="searchButton">'
2020-02-17 19:49:43 +00:00
} ;
2021-07-22 17:27:33 +00:00
/ * *
* @ type { SearchData }
* /
const searchBoxData = Object . assign ( { } , legacySearchBoxData , {
class : 'vector-search-box vector-search-show-thumbnail vector-search-box-collapses' ,
'is-collapsible' : true ,
'href-search' : '/wiki/Special:Search'
} ) ;
export {
searchBoxTemplate ,
legacySearchBoxData ,
searchBoxData
} ;