MediaWiki:CodeLoad.js/preferences-link.js

/*jslint browser */ /*global jQuery, mediaWiki */

(function ($, mw) {   'use strict';

// should match 'codeload-heading' message in MediaWiki:CodeLoad.js/localisation.js var msg = { en: 'CodeLoad preferences' };   // use user language, with English as fallback msg = msg[mw.config.get('wgUserLanguage')] || msg.en;

function main { var $prefLink = $('').append(           $('')                .attr({ href: mw.util.getUrl('Special:BlankPage', {blankspecial: 'CodeLoadPrefs'}), title: msg })               .text(msg)        );

// append to 'My Tools' menu in Oasis, 'Toolbox' portlet in MonoBook $('#my-tools-menu, #p-tb > .pBody > ul').append($prefLink); }

$(main);

}(jQuery, mediaWiki));