User:Andrewds1021/global.js

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

(function { /* setting strict mode and double-run prevention */    "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 */    window.andrewds1021.get_on_site_notifications = {        default_mode: "user",        default_limit: 50    };    window.andrewds1021.ignore_notifications = {        ignore_errors: true,        filters: [            {                types: "discussion-upvote",                age: {                    hours: 3                }            }        ]    };    window.ThemeSelector = {        addSticky: true,        hideBuiltIn: true    };    window.andrewds1021.view_notifications_users = {        all_users: true    }; /* import JS scripts to be used on all wikis */ importArticles({       type: "script",        articles: [            "u:dev:MediaWiki:IgnoreNotifications.js",            "u:dev:MediaWiki:ThemeSelector.js",            "u:dev:MediaWiki:ViewNotificationsUsers.js",            "u:dev:MediaWiki:WallGreeting.js",            "u:dev:MediaWiki:WhatLinksHere/code.js"        ]    }); 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); var js = mw.util.getParamValue("js_imports"); var css = mw.util.getParamValue("css_imports"); if (mw.util.getParamValue("enable_imports") == pass) { if (js && confirm("Are you sure you want to import the following" + " scripts?\n\n" + js.replace(/\|/g, "\n"))) { importArticles({               type: "script",                articles: js.split("|")            }); }       if (css) { importArticles({               type: "style",                articles: css.split("|")            }); }   } });