User:T12/common.js

From Sarkarverse
< User:T12
Revision as of 04:44, 9 December 2013 by T12 (talk | contribs) (Testing a script)
Jump to navigation Jump to search

Note: After publishing, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Press Ctrl-F5.
importScript("User:Example/watchlistContribs.js");
importScript("User:Example/duplinks.js");
importScript('User:Example/copySectionLink.js');
importScript('User:Example/autolink.js');
importScript('User:Example/saveandedit.js');
importScript('User:Example/sagittarius.js');
importScript('User:Example/pagesCreated.js');
importScript('User:Example/headingEditor.js');

(function(mw, $){
    if (mw.config.get( 'wgNamespaceNumber' ) !== 6) return;
    if (mw.config.get( 'wgAction' ) != 'view') return;
 
    $( function () {
        var croplink = '//tools.wmflabs.org/croptool/?title=' + wgTitle;
        mw.util.addPortletLink(
            "p-tb",
            croplink,
            "CropTool",
            "t-crop",
            "Crop this image"
        );
    });
})(mediaWiki, jQuery);