Jump to content

User:Trlkly/common.js

From Wikipedia, the free encyclopedia
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
importScript('User:AWeenieMan/furme.js');

//wikEd options:
window.wikEdConfig = {
	textSizeAdjust: 15/13 * 100 //15px
};

//CropTool code begins, see https://commons.wikimedia.org/wiki/Commons:CropTool
(function(mw, $){
    if (mw.config.get( 'wgNamespaceNumber' ) !== 6) return;
    if (mw.config.get( 'wgAction' ) != 'view') return;

    $( function () {
        var title = mw.config.get('wgServer') + mw.config.get('wgArticlePath').replace('$1', mw.config.get('wgPageName')),
            croplink = '//tools.wmflabs.org/croptool/?title=' + encodeURIComponent(title);
        mw.util.addPortletLink(
            "p-tb",
            croplink,
            "CropTool",
            "t-crop",
            "Crop this image"
        );
    });
})(mediaWiki, jQuery);