User:Leslie1289/sandbox.js

(function($, mw) {   'use strict';    mw.loader.using('mediawiki.util').then(function { mw.hook('dev.fetch').add(function (fetch) {           fetch('randompage').then(function(msg) { window.dev.ShortCutter.add({                   id: 'dev_fandom',                    href: mw.util.getUrl('Special:Random'),                    title: msg,                    'data-tracking': 'random-page',                    html: $('.wiki-tools [data-tracking="recent-changes"] svg')                        .first                        .clone                        .html(' ')                        [0]                        .outerHTML,                }, '[data-tracking="recent-changes"]') });       });    });    importArticle({ type: 'script', articles: [ 'u:dev:MediaWiki:Fetch.js', 'u:dev:MediaWiki:ShortCutter.js', ]   });

})(window.jQuery, window.mediaWiki);