User:Thedjatclubrock/admin.js

// function blocking(blockingreason, blockingduration) { // Thedjatclubrock if (wgUserName == 'Thedjatclubrock') { // Variables that should be defined in your monobook if (typeof(autosave) == 'undefined') autosave = false; if (typeof(isPHP ) == 'undefined') isPHP = (document.URL.indexOf('index.php') > 0); var speichernpa = (autosave) ? "&" + speichernp + "=1" : ""; var lemma; if ( UrlParameters["title"] > "" ) lemma = UrlParameters["title"]; else lemma = decodeURIComponent(location.href.substring(location.href.indexOf("/wiki/") + 6)).split('#')[0]; if (isPHP) lemma=lemma.split('+').join('_'); if (UrlParameters["oldid"] > 0) { var as = document.getElementById("bodyContent").getElementsByTagName("table")[0].getElementsByTagName("td")[1].getElementsByTagName("a"); for (i=0; i<as.length; i++) { if (as[i].getAttributeNode("href").value.search(/\/wiki\/Special:Blockip\//) != -1) { lemma = as[i].getAttributeNode("title").value; }    }   }   if (lemma == 'Special:Contributions') lemma = 'User:' + UrlParameters["target"].split('+').join('_'); if (lemma == 'Special:Blockip') lemma = 'User:' + UrlParameters["ip"]; if (lemma.match(/User:/) || lemma.match(/User_talk:/) || lemma.match(/Special:Contributions/)|| lemma.match(/Special:Blockip/)) { // Wir müssen die Seite erst zum Editieren öffnen uri = 'http://en.wikipedia.org/w/index.php?title=Special:Blockip/' + encodeURIComponent( lemma.replace(/User:/, ).replace(/User_talk:/, ).replace(/Special:Contributions\//, ).replace(/Special:Blockip\//, ) ) + "&blockreason=" + blockingreason + "&blockduration=" + blockingduration; if (UrlParameters["oldid"] > 0) { var as = document.getElementById("bodyContent").getElementsByTagName("table")[0].getElementsByTagName("td")[1].getElementsByTagName("a"); if (as[6].childNodes[0].nodeValue == 'rollback' && lemma.search(/\d+\.\d+\.\d+\.\d+/) != -1) { uri = uri + speichernpa; window.open(uri); } else if (lemma.search(/\d+\.\d+\.\d+\.\d+/) == -1) { if (as[7].childNodes[0].nodeValue == 'rollback') { window.open(uri); } else { location.href = uri; }      } else { uri = uri + speichernpa; location.href = uri; }    } else { uri = uri + speichernpa; location.href = uri; }  }  } } function deleting(deletereason) { // DerHexer if (wgUserName == 'DerHexer') { // Variables that should be defined in your monobook if (typeof(autosave) == 'undefined') autosave = false; if (typeof(isPHP ) == 'undefined') isPHP = (document.URL.indexOf('index.php') > 0); var speichernpa = (autosave) ? "&" + speichernp + "=1" : ""; var lemma; if ( UrlParameters["title"] > "" ) lemma = UrlParameters["title"]; else lemma = decodeURIComponent(location.href.substring(location.href.indexOf("/wiki/") + 6)).split('#')[0]; if (isPHP) lemma=lemma.split('+').join('_'); if (lemma.search(/Special:Whatlinkshere\//) != -1) lemma = lemma.replace(/Special:Whatlinkshere\//, ''); // Wir müssen die Seite erst zum Editieren öffnen uri = 'http://en.wikipedia.org/w/index.php?title=' + encodeURIComponent(lemma) + '&action=delete' + '&deletereason=Speedy deleted per (")[0]) + '|CSD ' + encodeURIComponent(deletereason.split("|")[0]) + '), ' + encodeURIComponent(deletereason.split("|")[1]) + speichernpa; location.href = uri; } } function protecting(protectreason, protectduration, protecttype, anotherprotecttype) { // DerHexer if (wgUserName == 'DerHexer') { // Variables that should be defined in your monobook if (typeof(autosave) == 'undefined') autosave = false; if (typeof(isPHP ) == 'undefined') isPHP = (document.URL.indexOf('index.php') > 0); var speichernpa = (autosave) ? "&" + speichernp + "=1" : ""; if(!anotherprotecttype) anotherprotecttype = ''; var lemma; if ( UrlParameters["title"] > "" ) lemma = UrlParameters["title"]; else lemma = decodeURIComponent(location.href.substring(location.href.indexOf("/wiki/") + 6)).split('#')[0]; if (isPHP) lemma=lemma.split('+').join('_'); // Wir müssen die Seite erst zum Editieren öffnen uri = 'http://en.wikipedia.org/w/index.php?title=' + encodeURIComponent(lemma) + "&action=protect" + "&protectreason=" + encodeURIComponent(protectreason) + "&protectduration=" + encodeURIComponent(protectduration) + "&protecttype=" + encodeURIComponent(protecttype) + "&anotherprotecttype=" + encodeURIComponent(anotherprotecttype) + speichernpa; location.href = uri; } } //