Spiderjjr45 (talk | contribs) No edit summary |
Spiderjjr45 (talk | contribs) No edit summary |
||
Line 29: | Line 29: | ||
setTimeout(Bebop, 2000); | setTimeout(Bebop, 2000); | ||
// START HOTCAT | |||
window.hotcat_translations_from_commons = true; | |||
/* | |||
This imports the latest version of HotCat from Commons. | |||
HotCat is a gadget to make changes to categories much easier. | |||
Full documentation can be found at http://commons.wikimedia.org/wiki/Help:Gadget-HotCat | |||
*/ | |||
mw.loader.load( 'https://commons.wikimedia.org/w/index.php?title=MediaWiki:Gadget-HotCat.js&action=raw&ctype=text/javascript' ); | |||
// END HOTCAT |
Revision as of 16:42, 13 July 2022
/** * Adds CSS classes to the body tag based on the categories this page belongs to * * @source https://www.mediawiki.org/wiki/Snippets/Style_pages_based_on_categories * @revision 2016-01-18 */ (function($, mw) { var fn = function() { var cats = mw.config.get('wgCategories'), newClasses; if (cats) { newClasses = $.map(cats, function(el) { return 'cat-' + encodeURIComponent(el.replace(/[ .]/g, '_')).replace(/%/g, '_'); }).join(' '); $(document.body).addClass(newClasses); } }; if (document.body) { fn(); } else { $(fn); } })(jQuery, mw); function Bebop(){ console.log("OK 3 2 1 Let's Jam"); var x = document.getElementById("myaudio"); x.play(); } setTimeout(Bebop, 2000); // START HOTCAT window.hotcat_translations_from_commons = true; /* This imports the latest version of HotCat from Commons. HotCat is a gadget to make changes to categories much easier. Full documentation can be found at http://commons.wikimedia.org/wiki/Help:Gadget-HotCat */ mw.loader.load( 'https://commons.wikimedia.org/w/index.php?title=MediaWiki:Gadget-HotCat.js&action=raw&ctype=text/javascript' ); // END HOTCAT