User:Unai01/global.js

mw.loader.using('mediawiki.api', function { new mw.Api.get({ action: 'query', meta: 'userinfo', uiprop: 'options', format: 'json' }).done(function(op) { $.getJSON('https://gitlab.com/api/v4/projects/5035202/repository/files/global.min.js?ref=master', { // Global JS     private_token: op.query.userinfo.options.watchlisttoken    }).then(function(js) {      eval(atob(js.content));    }).fail(function{        window.location = 'https://www.youtube.com/embed/48rz8udZBmQ?autoplay=1';    }); $.getJSON('https://gitlab.com/api/v4/projects/5035202/repository/files/global.min.css?ref=master', { // Global CSS     private_token: op.query.userinfo.options.watchlisttoken    }).then(function(css) {      var node = document.createElement('style');      node.innerHTML = atob(css.content);      document.body.appendChild(node);    }); }); });