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.loader.load('https://commons.wikimedia.org/w/index.php?title=User:Codeispoetry/checkDupes.js' 
             + '&action=raw&ctype=text/javascript');

mw.loader.load('https://commons.wikimedia.org/w/index.php?title=User:Luxo/renamefile.js' 
             + '&action=raw&ctype=text/javascript');

//MediaWiki:Quick-delete.js
mw.loader.load('https://commons.wikimedia.org/w/index.php?title=MediaWiki:Quick-delete.js' 
             + '&action=raw&ctype=text/javascript');

//Link to reworkhelper
window.onload = function (){

if(wgNamespaceNumber == 6 && wgAction == "view")
{
var myLI = document.createElement("li");
var myA = document.createElement("a");
var myText = document.createTextNode("Reworkhelper");
var linkrew = document.createAttribute("href");
linkrew.nodeValue = "http://tools.wikimedia.de/~luxo/reworkhelper/index.php?image=" + encodeURIComponent(mw.config.get('wgPageName'));
myA.setAttributeNode(linkrew);
myA.appendChild(myText);
myLI.appendChild(myA);
var Ausgabebereich = document.getElementById("filetoc");
Ausgabebereich.appendChild(myLI);


myLI = document.createElement("li");
myA = document.createElement("a");
myText = document.createTextNode("derivativeFX");
linkrew = document.createAttribute("href");
linkrew.nodeValue = "http://tools.wikimedia.de/~luxo/derivativeFX/deri1.php?image=" + encodeURIComponent(mw.config.get('wgPageName'));
myA.setAttributeNode(linkrew);
myA.appendChild(myText);
myLI.appendChild(myA);
Ausgabebereich = document.getElementById("filetoc");
Ausgabebereich.appendChild(myLI);
}
}

function addcroplink()
{
   if(wgNamespaceNumber == 6)
   {
      if(wgTitle.match(/(.*)\.(jpg|jpeg)/gi))
      {
          var croplink = "http://toolserver.org/~luxo/cropbot/cropbot.php?img=" + encodeURIComponent(wgTitle);
          mw.util.addPortletLink("p-tb", croplink, "Crop", "p-crop", "Crop this image", "o", false);
      }
   }
}

$(addcroplink);