MediaWiki:Gadget-Cat-a-lot.js: Difference between revisions

From Kanthaus wiki
Add namespace "-1" (special pages) to allow tagging from `Special:AllPages`
remove conditional altogether, since namespace addition did not work
 
Line 3: Line 3:
  * https://commons.wikimedia.org/w/index.php?title=Help:Gadget-Cat-a-lot&withJS=MediaWiki:ActivateGadget.js&gadgetname=Cat-a-lot
  * https://commons.wikimedia.org/w/index.php?title=Help:Gadget-Cat-a-lot&withJS=MediaWiki:ActivateGadget.js&gadgetname=Cat-a-lot
**/
**/
if (mw.config.get('wgNamespaceNumber') === 14 || -1) {
//if (mw.config.get('wgNamespaceNumber') === 14 || -1) {
window.catALotPrefs = { editpages: true, subcatcount: 100 };
window.catALotPrefs = { editpages: true, subcatcount: 100 };
mw.loader.using(['jquery.ui', 'mediawiki.util']).done(function () {
mw.loader.using(['jquery.ui', 'mediawiki.util']).done(function () {
Line 10: Line 10:
mw.loader.load('//commons.wikimedia.org/w/index.php?title=MediaWiki:Gadget-Cat-a-lot.css&action=raw&ctype=text/css', 'text/css');
mw.loader.load('//commons.wikimedia.org/w/index.php?title=MediaWiki:Gadget-Cat-a-lot.css&action=raw&ctype=text/css', 'text/css');
});
});
}
//}

Latest revision as of 15:40, 19 November 2024

/**
 * Cat-a-lot - changes category of multiple files
 * https://commons.wikimedia.org/w/index.php?title=Help:Gadget-Cat-a-lot&withJS=MediaWiki:ActivateGadget.js&gadgetname=Cat-a-lot
**/
//if (mw.config.get('wgNamespaceNumber') === 14 || -1) {
	window.catALotPrefs = { editpages: true, subcatcount: 100 };
	mw.loader.using(['jquery.ui', 'mediawiki.util']).done(function () {
		mw.util.addCSS("#cat_a_lot_settings { display:none !important;}"); // Preferences depend on some Commons gadgets, not available locally
		mw.loader.load('//commons.wikimedia.org/w/index.php?title=MediaWiki:Gadget-Cat-a-lot.js&action=raw&ctype=text/javascript');
		mw.loader.load('//commons.wikimedia.org/w/index.php?title=MediaWiki:Gadget-Cat-a-lot.css&action=raw&ctype=text/css', 'text/css');
	});
//}