User:Slick/common.js

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search
Note: After saving, you have to bypass your browser's cache to see the changes. Internet Explorer: press Ctrl-F5, Mozilla: hold down Shift while clicking Reload (or press Ctrl-Shift-R), Opera/Konqueror: press F5, Safari: hold down Shift + Alt while clicking Reload, Chrome: hold down Shift while clicking Reload.
 mw.util.addPortletLink('p-tb', 'javascript:importScript("MediaWiki:VisualFileChange.js");', 'Perform batch task', 't-AjaxQuickDeleteOnDemand');
//vFCvFCCfg/////////////////////////////////////
/////// VISUAL FILE CHANGE CONFIGURATION ///////
///// DO NOT MODIFY BY HAND - FINGERS AWAY! ////
////////////////////////////////////////////////
window.vFCSettings = {"userNote":"Yours sincerely","firstTest":0,"testEdits":0,"defaultAction":"append","watchlistUserTalk":"preferences","watchlistFiles":"preferences","watchlistReplace":"nochange","watchlistOTRS":"nochange","loadBatchSize":100,"maxSimultaneousReq":5,"summaryChacheLen":5,"loadThumbs":true,"loadWikitext":true};
//////////////////////////////////vFCvFCCfgEnd//
// upload > 100MB (maybe add &chunkedupload=1 to page if not use the given link)
importScript('User:Rillke/bigChunkedUpload.js');

// cropbot
// https://commons.wikimedia.org/wiki/User:Cropbot
$( function() {
   if(mw.config.get('wgNamespaceNumber') == 6) {
      if(wgTitle.match(/(.*)\.(jpg|jpeg)/gi)) {
          var croplink = "//tools.wmflabs.org/cropbot/cropbot.php?img="+wgTitle;
          mw.util.addPortletLink("p-tb", croplink, "Crop", "p-crop", "Crop this image", "o", false);
      }
   }
});