User:Epicgenius/vector.js

From Wikipedia, the free encyclopedia
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
/* ====== Definition of import script ====== */
window.importScript = function (pageName) {
    mw.loader.using('mediawiki.util').then(function () {
        var conf = mw.config.get(['wgServer', 'wgScript']),
            url = conf.wgServer + conf.wgScript + '?title=' + mw.util.wikiUrlencode(pageName) +
                '&action=raw&ctype=text/javascript';
        mw.loader.load(url);
    });
};

// Due to the QuickEdit script loading in mobile when it probably shouldn't, it is listed here.
mw.loader.load('//en.wikipedia.org/w/index.php?title=User:BrandonXLF/QuickEdit.js&action=raw&ctype=text/javascript'); // [[User:BrandonXLF/QuickEdit.js]]