Difference between revisions of "Common.js"
| Line 1: | Line 1: | ||
/* Any JavaScript here will be loaded for all users on every page load. */ | /* Any JavaScript here will be loaded for all users on every page load. */ | ||
<div class="searchstyle"> | |||
if ( mw.config.get( 'wgCanonicalSpecialPageName' ) === 'Search' ) { | if ( mw.config.get( 'wgCanonicalSpecialPageName' ) === 'Search' ) { | ||
var input = document.querySelector( '#searchText input[type="search"]' ); | var input = document.querySelector( '#searchText input[type="search"]' ); | ||
| Line 6: | Line 7: | ||
} | } | ||
} | } | ||
</div> | |||
Revision as of 05:38, 31 August 2026
/* Any JavaScript here will be loaded for all users on every page load. */
<div class="searchstyle">
if ( mw.config.get( 'wgCanonicalSpecialPageName' ) === 'Search' ) {
var input = document.querySelector( '#searchText input[type="search"]' );
if ( input ) {
input.setAttribute( 'placeholder', 'everything' );
}
}
</div>