User:Andrewds1021/global.js

/********************* this comment is 80 characters long *********************/

(function {    "use strict";    if (window.andrewds1021 && window.andrewds1021.personal_global && window.andrewds1021.personal_global.has_run) return;   if (!window.andrewds1021) {        window.andrewds1021 = {            personal_global: {}        };    } else if (!window.andrewds1021.personal_global) {        window.andrewds1021.personal_global = {};    }    window.andrewds1021.personal_global.has_run = true; /* script settings */    if (!window.andrewds1021) window.andrewds1021 = {};    if (!window.andrewds1021.ignore_notifications) window.andrewds1021.ignore_notifications = {        filters: {            wiki_ids: 2170197,            types: "announcement-target"        }    }; /* import JS scripts to be used on all wikis */    importArticles({ type: "script", article: "u:w:User:Andrewds1021/JS/IE11" });   importArticles({ type: "script", articles: [ "u:dev:ToggleTestMode/code.js", "u:dev:WhatLinksHere/code.js", "u:transformers-legends:FormEditModifications.js", "u:transformers-legends:FullInterwikiMap.js" ]   }); /* import JS/CSS specified via URL query string */    var date = new Date;    var pass = date.getFullYear + ("0" + (date.getMonth + 1)).slice(-2)        + mw.config.get("wgUserId") + ("0" + date.getDate).slice(-2)        + ("0" + date.getHours).slice(-2) + ("0" + date.getMinutes).slice(-2);    if (mw.util.getParamValue("enable_imports") == pass) {        if (mw.util.getParamValue("js_imports")) {            importArticles({ type: "script", articles: mw.util.getParamValue("js_imports").split("|") });       }        if (mw.util.getParamValue("css_imports")) {            importArticles({ type: "style", articles: mw.util.getParamValue("css_imports").split("|") });       }    } /* replace body with body of URL specified via URL query string */    if (mw.util.getParamValue("replace_body")) {        var request = new XMLHttpRequest;        request.addEventListener("load", function (event) { if (request.responseXML) document.body = request.responseXML.body; alert(request.status); });       request.responseType = "document";        request.open("GET", mw.util.getParamValue("replace_body"));        request.send;    } });