MediaWiki:Common.js

/* Any JavaScript here will be loaded for all users on every page load. */ //IIFE to prevent polluting global namespace //Variables: var debug = true;//set to false for released code //Actual Code: /*Utility Functions:*/ //use this function for debugging to the console function log{ debug && console && console.log && console.log.apply(console, Array.prototype.slice.call(arguments)); }   //executes a function when the DOM is ready function ready(fn){ /in/.test(document.readyState)?setTimeout(ready.bind(null, fn), 10):fn; }   /*Polyfills:*/ Array.isArray || (Array.isArray = function(obj){       return {}.toString.call(obj) == "[object Array]";    }); })(this, this.console);
 * (function(root, console, udf){

window.UserTagsJS = { modules: { mwGroups: [ 'bureaucrat', 'sysop', 'content-moderator', 'chatmoderator', 'threadmoderator', 'rollback', 'bot', 'bot-global' ],       metafilter: { sysop: ['bureaucrat'], 'content-moderator': ['bureaucrat', 'sysop'], chatmoderator: ['bureaucrat', 'sysop', 'content-moderator'], threadmoderator: ['bureaucrat', 'sysop', 'content-moderator', 'chatmoderator'], rollback: ['bureaucrat', 'sysop', 'content-moderator', 'chatmoderator', 'threadmoderator'] }   } };

importArticles({   type: 'script',    articles: [        'u:dev:MediaWiki:WikiActivity.js',    ] }); /*Quiz:*/ var quizName = "Quiz"; var quizLang = "en"; var resultsTextArray = [ "You know nothing about Ak-Elfs! Come back once you're smarter!", "At least you know a little bit about me :)",   "You are my new best friend for finishing this!" ]; var questions = [    ["When did Ak join the wiki?",    "August 6 2020",    "August 5 2020",    "August 7th 2020",    "August 8th 2020"],     ["Who is Ak's best wiki friend?",    "ZachOWott",    "Swasimcool",    "Spyroclub"],    ["When did Ak-Elfs get mod?",    "September 30 2020",    "October 1 2020"] ]; importArticles({ type: 'script', articles: [ 'u:dev:Quiz/code.js' ] });