MediaWiki

Difference between revisions of "Common.js"

Line 3: Line 3:
     var input = document.querySelector( '#searchText input[type="search"]' );
     var input = document.querySelector( '#searchText input[type="search"]' );
     if ( input ) {
     if ( input ) {
         input.setAttribute( 'placeholder', 'Everything' );
         input.setAttribute( 'placeholder', 'everything' );
     }
     }
}
}

Revision as of 05:28, 31 August 2026

/* Any JavaScript here will be loaded for all users on every page load. */
if ( mw.config.get( 'wgCanonicalSpecialPageName' ) === 'Search' ) {
    var input = document.querySelector( '#searchText input[type="search"]' );
    if ( input ) {
        input.setAttribute( 'placeholder', 'everything' );
    }
}