MediaWiki:PortabilityShortcuts.js

/* $(function {   var p = '//portability.wikia.com/wiki/Special:PortabilityDashboard?url=';    var s = window.location.hostname;
 * PortabilityShortcuts
 * @author Railfail536

if (window.PortabilityShortcutsLoaded) { return; }   window.PortabilityShortcutsLoaded = true;

function init(i18n) { $('.page-header__contribution-buttons .wds-is-linked').append(           $('', { title: i18n.msg('portability-check-title').plain, id: 'portability-check' }).append( $('', {                   href: p + s,                    text: i18n.msg('portability-check').plain,                    target: '_blank'                }), ),           $('', { title: i18n.msg('infobox-check-title').plain, id: 'infobox-check' }).append( $('', {                   href: '/Special:Templates?type=infobox',                    text: i18n.msg('infobox-check').plain                }) )       );    }    mw.hook('dev.i18n').add(function(i18n) {        i18n.loadMessages('PortabilityShortcuts').then(init);    }); importArticle({       type: 'script',        article: 'u:dev:I18n-js/code.js'    }); });