Difference between revisions of "Common.js"
Admin (talk | contribs) (Created page with "→Any JavaScript here will be loaded for all users on every page load.: document.addEventListener( 'DOMContentLoaded', function () { if ( mw.config.get( 'wgCanonicalSpecialPageName' ) === 'Search' ) { var input = document.querySelector( '#searchText input[type="search"]' ); if ( input ) { input.setAttribute( 'placeholder', 'What Do You Want to Try?…' ); } } } );") |
|||
| Line 4: | Line 4: | ||
var input = document.querySelector( '#searchText input[type="search"]' ); | var input = document.querySelector( '#searchText input[type="search"]' ); | ||
if ( input ) { | if ( input ) { | ||
input.setAttribute( 'placeholder', ' | input.setAttribute( 'placeholder', 'Everything' ); | ||
} | } | ||
} | } | ||
} ); | } ); | ||
Revision as of 19:46, 28 August 2026
/* Any JavaScript here will be loaded for all users on every page load. */
document.addEventListener( 'DOMContentLoaded', function () {
if ( mw.config.get( 'wgCanonicalSpecialPageName' ) === 'Search' ) {
var input = document.querySelector( '#searchText input[type="search"]' );
if ( input ) {
input.setAttribute( 'placeholder', 'Everything' );
}
}
} );