User:Denis Barthel/monobook.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.
// [[User:Dschwen/coordinates.js]] - please include this line 
mw.loader.load('https://commons.wikimedia.org/w/index.php?title=User:Dschwen/coordinates.js' 
     + '&action=raw&ctype=text/javascript');



//
// Insert a personalized Texttemplate into the Special:Upload edit box.
//
function setSpecialUploadTemplate()
{
 if(window.location.href == "http://commons.wikimedia.org/wiki/Special:Upload")
 {
  var editbox = document.getElementById('wpUploadDescription');
  editbox.value = "{"+"{Information\n"
                + "|Description=\n"
                + "|Source=Own work\n"
                + "|Date=\n"
                + "|Author=[[User:Denisoliver|Denis Barthel]]\n"
                + "|Permission=See license\n"
                + "|other_versions=\n"
                + "}"+"}";

  var licensemenu = document.getElementById('wpLicense');
  licensemenu.value = "GFDL-self";
 }
}

$(setSpecialUploadTemplate);