×
Create a new article
Write your page title here:
We currently have 1,722 articles on The Quelmar Wiki. Type your article name above or click on one of the titles below and start writing!



The Quelmar Wiki

MediaWiki:Common.js: Difference between revisions

No edit summary
No edit summary
Line 1: Line 1:
/**
* 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(){
function Bebop(){
console.log("OK 3 2 1 Let's Jam");
console.log("OK 3 2 1 Let's Jam");

Revision as of 01:15, 22 March 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);
Cookies help us deliver our services. By using our services, you agree to our use of cookies. (Hi Margarita's Table. 🇩🇪)
Cookies help us deliver our services. By using our services, you agree to our use of cookies. (Hi Margarita's Table. 🇩🇪)