MediaWiki:Common.js: Difference between revisions

From OpenGK
(Created page with "→‎Any JavaScript here will be loaded for all users on every page load.: (function(){ console.log('js test'); })();")
 
No edit summary
 
(8 intermediate revisions by the same user not shown)
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. */
(function(){
(function($, mw) {
console.log('js test');
    if (mw.config.get('wgNamespaceNumber') === 0) {
})();
        var categories = mw.config.get('wgCategories');
 
        if (categories && categories.includes('Pages using gadget HexConverter')) {
            mw . loader . load ( '/index.php?title=MediaWiki:Gadget-HexConverter.css&action=raw&ctype=text/css', 'text/css' );
            mw . loader . load ( '/index.php?title=MediaWiki:Gadget-HexConverter.js&action=raw&ctype=text/javascript' );
        }
    }
})( jQuery , mediaWiki );

Latest revision as of 03:28, 28 December 2024

/* Any JavaScript here will be loaded for all users on every page load. */
(function($, mw) {
    if (mw.config.get('wgNamespaceNumber') === 0) {
        var categories = mw.config.get('wgCategories');

        if (categories && categories.includes('Pages using gadget HexConverter')) {
            mw . loader . load ( '/index.php?title=MediaWiki:Gadget-HexConverter.css&action=raw&ctype=text/css', 'text/css' );
            mw . loader . load ( '/index.php?title=MediaWiki:Gadget-HexConverter.js&action=raw&ctype=text/javascript' );
        }
    }
})( jQuery , mediaWiki );