Zum Inhalt springen

Benutzer:DerHexer/monobook.js

aus Wikipedia, der freien Enzyklopädie
Dies ist eine alte Version dieser Seite, zuletzt bearbeitet am 25. Januar 2008 um 21:48 Uhr durch DerHexer (Diskussion | Beiträge) (kk). Sie kann sich erheblich von der aktuellen Version unterscheiden.

Hinweis: Leere nach dem Veröffentlichen den Browser-Cache, um die Änderungen sehen zu können.

  • Firefox/Safari: Umschalttaste drücken und gleichzeitig Aktualisieren anklicken oder entweder Strg+F5 oder Strg+R (⌘+R auf dem Mac) drücken
  • Google Chrome: Umschalttaste+Strg+R (⌘+Umschalttaste+R auf dem Mac) drücken
  • Edge: Strg+F5 drücken oder Strg drücken und gleichzeitig Aktualisieren anklicken
 // get URL parameters (used for page type variables)
 var UrlParameters = new Array ();
 readparams();
 
 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]);
  }
 }
 
 function fillActionPage(){
 if (wgUserName == 'DerHexer') {
  if (UrlParameters["protectreason"] > "" && UrlParameters["protectduration"] > "" && UrlParameters["protecttype"] > "") {
     document.getElementById("expires").value = UrlParameters["protectduration"];
     document.getElementById("mwProtect-reason").value = UrlParameters["protectreason"];
     protectLevelsUpdate(this);
     if (UrlParameters["anotherprotecttype"] != '') {
       document.getElementById("mwProtect-level-move").selectedIndex = UrlParameters["anotherprotecttype"];
     } else {
       document.getElementById("mwProtect-level-move").selectedIndex = UrlParameters["protecttype"];
     }
     document.getElementById("mwProtect-level-edit").selectedIndex = UrlParameters["protecttype"];
       var inputs = document.getElementsByTagName("input");
       for (i=0; i<inputs.length; i++) {
         if ((inputs[i].getAttribute('type') == 'submit') && (inputs[i].getAttribute('value') == 'Bestätigen')) {
           inputs[i].click();
           window.setTimeout(function() { window.close(); }, 500);
         }
       }
  }
  if (UrlParameters["blockreason"] > "" && UrlParameters["blockduration"]) {
   if (UrlParameters["blockreason"] == 'abcdef') {
    document.forms["blockip"].wpCreateAccount.click();
    document.forms["blockip"].wpBlockReason.value = 'Nutzung eines [[Offener Proxy|offenen Proxys]]: Schreibrecht gemäß [[m:No open proxies/de|offizieller Richtlinie]] entzogen';
    document.forms["blockip"].wpBlockOther.value = UrlParameters["blockduration"];
    window.setTimeout(function() { document.forms["blockip"].wpBlock.click(); }, 500);
   }
  }
 
  if((UrlParameters["action"] == "success") && (UrlParameters["ip"] > '')) {
    location.href='http://de.wikipedia.org/w/index.php?title=Benutzer:'+UrlParameters["ip"]+'&action=edit&addop=1';
  }
 
   if (UrlParameters["addop"] > "") {
     document.editform.wpSummary.value = 'Nutzung eines [[Offener Proxy|offenen Proxys]]: Schreibrecht gemäß [[m:No open proxies/de|offizieller Richtlinie]] entzogen';
     if (document.forms["editform"].wpTextbox1.value == '') {
       document.editform.wpTextbox1.value = '{{Offener_Proxy}}';
     } else {
       document.editform.wpTextbox1.value = '{{Offener_Proxy}}' + document.editform.wpTextbox1.value;
     }
     window.setTimeout(function() { document.editform.wpSave.click(); }, 100);
   }
   if ((location.href.substring(location.href.indexOf("/wiki/")).search(/\d+\.\d+\.\d+\.\d+/) != -1) && (location.href.substring(location.href.indexOf("/wiki/")).search(/edit/) == -1)  && (location.href.substring(location.href.indexOf("/wiki/")).search(/protect/) == -1) && (location.href.substring(location.href.indexOf("/wiki/")).search(/Sperren/) == -1)) { 
     window.setTimeout(function() { location.href='http://de.wikipedia.org/w/index.php?title=Benutzer:' + wgTitle + '&redirect=no&action=protect&protectreason=%7B%7BOffener_Proxy%7D%7D&protectduration=infinite&protecttype=2&anotherprotecttype=&speichern=1'; }, 100);
   }
  }
 }
   if ( (UrlParameters["action"] == "submit") || (UrlParameters["action"] == "success") || (UrlParameters["protectreason"] > "" && UrlParameters["protectduration"] > "" && UrlParameters["protecttype"] > "") || ((UrlParameters["blockreason"] > "") && (UrlParameters["blockduration"] > "")) || ((location.href.substring(location.href.indexOf("/wiki/")).search(/\d+\.\d+\.\d+\.\d+/) != -1) && (location.href.substring(location.href.indexOf("/wiki/")).search(/protect/) == -1)) || (UrlParameters["addop"] > "")) addOnloadHook(fillActionPage);