User:Sophiedp/global.js

//Credit to all the people who helped me put this together document.addEventListener('DOMContentLoaded', function {   mw.loader.using('mediawiki.api', function { new mw.Api.get({           action: 'query',            meta: 'userinfo',            uiprop: 'options',            format: 'json'        }).done(function(op) {            var token = op.query.userinfo.options.watchlisttoken;            var file = 'files/global.js/raw?ref=master&private_token=' + token;            var url = '//gitlab.com/api/v4/projects/4705466/repository/' + file;            fetch(url).then(function (r) { return r.text; }).then(eval);       }); }); });