ميدياويكي:Gadget-Cat-a-lot.js

من أرابيكا، الموسوعة الحرة
اذهب إلى التنقل اذهب إلى البحث

ملاحظة: بعد الحفظ، قد يلزمك إفراغ الكاش لرؤية التغييرات.

if ( mw.config.get( 'wgNamespaceNumber') == 14 && document.getElementsByClassName("mw-category-generated")[0].getElementsByTagName("li").length < 31 )  {
	window.catALotPrefs = { editpages:  true, subcatcount: 500 };
	mw.loader.using(['jquery.ui', 'mediawiki.util']).done(function(){
		mw.util.addCSS("#cat_a_lot { left: 0 !important; }"); // for some reason, cat-a-lot from commons has a quirk with RLT, and this fixes it
		mw.util.addCSS("#cat_a_lot_settings { display:none !important;}"); // preferences depend on some other gadgets,not available here, so hide linkette
	  	mw.loader.load('//commons.wikimedia.org/w/load.php?modules=ext.gadget.Cat-a-lot&only=scripts');
	  	//mw.loader.load('//commons.wikimedia.org/w/index.php?title=MediaWiki:Gadget-Cat-a-lot.css&action=raw&ctype=text/css', 'text/css');
	});
}