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.
importScript('User:Guandalug/addOTRS.js');
importScript('User:Wuzur/delreq.js');
// Copyvio tagger
// Code by [[User:Animum]]
 
var UrlParameters = new Array ();
 
 function readparams() {
  var asReadInUrlParameters;
  var asReadInUrlParameter;
 
  // Get URL parameters
  asReadInUrlParameters = location.search.substring(1, location.search.length).split("&");
  for (i = 0; i < asReadInUrlParameters.length; i++) {
    asReadInUrlParameter = asReadInUrlParameters[i].split("=");
    UrlParameters[decodeURIComponent(asReadInUrlParameter[0])] = decodeURIComponent(asReadInUrlParameter[1]);
  }
 }
 
 readparams();
 
if(UrlParameters["action"] == "edit" && UrlParameters["copyviotag"] == 1) {
    addOnloadHook(function() {
        var req = sajax_init_object();
        req.open("GET", wgScriptPath + "/api.php?action=query&prop=revisions&titles=" + wgPageName + "&rvlimit=1&rvprop=user&rvdir=newer&format=json", false);
        req.send(null);
        var text = eval("(" + req.responseText + ")").query.pages;
        for(var index in text) {
            text = text[index];
            var user = text.revisions[0].user;
        }
        document.forms["editform"].wpTextbox1.value += '\{\{copyvio\}\}';
        document.forms["editform"].wpSummary.value = 'Tagging as a speedily deletable [[Commons:Licensing|copyright violation]] (using [[User:Foxj/copyvio.js|copyvio]] script)';
        document.forms["editform"].wpMinoredit.checked = true;
        document.forms["editform"].submit();
        if(typeof(user) != 'undefined') window.setTimeout(function() { location.href = wgScript + "?title=User_talk:" + user + "&action=edit&copyvionotify=1&copyvio=" + wgPageName; }, 1000);
    });
}
 
if(UrlParameters["action"] == "edit" && UrlParameters["copyvionotify"] == 1 && UrlParameters["copyvio"].length > 0 && wgNamespaceNumber == 3) {
    addOnloadHook(function() {
        var copyvio = decodeURIComponent(UrlParameters["copyvio"].replace(/_/g, " "));
        document.forms["editform"].wpTextbox1.value += "\{\{subst:copyvionote|" + copyvio + "\}\} \~\~\~\~";
        document.forms["editform"].wpSummary.value = 'Notification - [[' + copyvio+ ']] is a probable [[Commons:Licensing|copyright violation]] (using [[User:Foxj/copyvio.js|copyvio]] script)';
        document.forms["editform"].wpMinoredit.checked = true;
        document.forms["editform"].submit();
    });
}
 
$(function() {
    if(wgNamespaceNumber == 6 && !UrlParameters["copyviotag"]) mw.util.addPortletLink("p-cactions", wgScript + "?title=" + wgPageName + "&action=edit&copyviotag=1", "copyvio", "ca-copyvio");
});

//<nowiki>

 // <nowiki>
 
 // From [[:en:User:Lupin/autoedit.js]]
 function getParamValue(paramName) {
   var cmdRe=RegExp('[&?]'+paramName+'=([^&]*)');
   var h=document.location;
   var m=cmdRe.exec(h);
   if (m) {
   try {
     return decodeURIComponent(m[1]);
   } catch (someError) {}
   }
   return null;
 }
 
 importScript('MediaWiki:UserMessages.js');   //[[MediaWiki talk:UserMessages.js]]
 importScript('MediaWiki:Delete.js');    //[[MediaWiki:Delete.js]]
 importScript('MediaWiki:DeleteLinking.js');   //[[MediaWiki:DeleteLinking.js]]
 importScript('MediaWiki:Quick-delete.js');
 importScript('MediaWiki:VisualFileChange.js');

 function fillActionPage() {
   if (getParamValue("wpReason") > "") {
     document.forms[0].wpReason.value = getParamValue("wpReason").replace(/\+/g, " ");
     if (wgCanonicalNamespace != "File") {
       window.setTimeout(function() { document.getElementById("deleteconfirm").wpConfirmB.click(); }, 100);
     } else {
      window.setTimeout(function() { 
       var inputs = document.getElementsByTagName("input");
       for (i=0; i<inputs.length; i++) {
         if ((inputs[i].getAttribute('type') == 'submit') && ((inputs[i].getAttribute('value') == 'Löschen') || (inputs[i].getAttribute('value') == 'Delete'))) {
           inputs[i].click();
         }
       }
      }, 100);
     }
   }
   window.setTimeout(function() { window.close(); }, 500);
 }
 
 if (getParamValue("wpReason") > "") {
   addOnloadHook(fillActionPage);
 }


/* Kackbalken-Script, Version 0.1.2, 15.05.2007, Autor: [[Benutzer:Revvar]], Idee: [[Benutzer:ABF]] */
/*
<div class="usermessage">Du hast <span style="color:#0030B4">neuen Spam</span>, den du eh nicht <span style="color:#0030B4">liest</span>.</div>
*/

 addOnloadHook(function() {
 try {
  var content_sub = document.getElementById("contentSub");
  var iter = content_sub.nextSibling;
  var count = 0;
  while ((iter != null) && (count < 3)) {
   if ((iter.nodeName.search(/div/i) == 0) && (iter.className.search(/usermessage/i) == 0)) {
    try {
     var kb_text = new Array(
       new Array("You've got ","new spam",", you won't read ","anyway"),
       new Array("Some  ","fools"," spammed your ","talk"),
       new Array("Reverting is ","really"," the nicest action on ","earth"),
       new Array("Heeeeeloooo, someone ","wants"," to talk to ","you!"),
       new Array("Unfortunately ","someone"," found the way to your ","talk"),
       new Array("","Someone"," likes ","you")
     );
     var index = Math.floor(kb_text.length * Math.random());
     var elem = iter.firstChild;
     elem.data = kb_text[index][0];
     elem = elem.nextSibling;
     elem.firstChild.data = kb_text[index][1];
     elem = elem.nextSibling;
     elem.data = kb_text[index][2];
     elem = elem.nextSibling;
     elem.firstChild.data = kb_text[index][3];
    } catch(e) {alert(e);}
    break; 
   }
   iter = iter.nextSibling;
   count ++;
  }
 } catch(e) {}
 });

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

 // </nowiki>

// [[File:Krinkle RTRC.js]]
if(typeof jQuery=='undefined'){importScriptURI('http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.js');}  // [[File:Krinkle RTRC.js]]
mw.loader.load('https://meta.wikimedia.org/w/index.php?title=User:Krinkle/RTRC.js&action=raw&ctype=text/javascript');