MediaWiki talk:Gadget-HotCat.js

From Wikisource
Jump to navigation Jump to search

Compare numbers instead of strings[edit]

George Orwell III, I think it is better to update this code to the following version:

if ( mw.config.get( 'wgNamespaceNumber' ) !== 104 ) {
	mw.loader.load( '//commons.wikimedia.org/w/index.php?title=MediaWiki:Gadget-HotCat.js&action=raw&ctype=text/javascript&smaxage=21600&maxage=86400' );
}

I also added the cache parameters which are suggested at mw:ResourceLoader/Migration guide (users)#Gadgets. Helder.wiki 19:40, 13 March 2014 (UTC)