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 |
||
Line 2: | Line 2: | ||
(function(){ | (function(){ | ||
console.log('js test'); | console.log('js test'); | ||
( function ( $ , mw ) { | |||
if (mw.config.get('wgNamespaceNumber') === 0) { | |||
var categories = mw.config.get('wgCategories'); // Get the list of categories for the page | |||
// Check if the page belongs to the desired category | |||
if (categories && categories.includes('Pages using gadget HexConverter')) { | |||
console.log('yaa'); | |||
} | |||
} | |||
})(); | })(); |
Revision as of 01:18, 28 December 2024
/* Any JavaScript here will be loaded for all users on every page load. */
(function(){
console.log('js test');
( function ( $ , mw ) {
if (mw.config.get('wgNamespaceNumber') === 0) {
var categories = mw.config.get('wgCategories'); // Get the list of categories for the page
// Check if the page belongs to the desired category
if (categories && categories.includes('Pages using gadget HexConverter')) {
console.log('yaa');
}
}
})();