User:Thedjatclubrock/monobook.js/extra

// 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 (UrlParameters["deletereason"] > "") { if (UrlParameters["deletereason"] != 'undefined') { document.getElementById("deleteconfirm").wpReason.value = UrlParameters["deletereason"]; }     window.setTimeout(function { document.getElementById("deleteconfirm").wpConfirmB.click; }, 100); window.setTimeout(function { window.close; }, 500); }  if (UrlParameters["blockreason"] > "" && UrlParameters["blockduration"] > "") { document.forms["blockip"].wpBlockReason.value = UrlParameters["blockreason"]; if (UrlParameters["blockduration"].match(/\s/) || UrlParameters["blockduration"] == 'infinite') { document.forms["blockip"].wpBlockOther.value = UrlParameters["blockduration"]; } else if (UrlParameters["blockduration"].match(/\d+/)) { document.forms["blockip"].wpBlockOther.value = UrlParameters["blockduration"] + " hours"; }    var isBlocked = UrlParameters["title"].replace(/Special:Blockip\//, ''); if (UrlParameters["blockduration"] == 'infinite') { if (prompt('Sicher, ' + isBlocked + ' zu sperren?','ja')) { if (UrlParameters["blockreason"] != 'inappropriate username') { var newurl = "http://en.wikipedia.org/w/index.php?title=User:" + isBlocked + "&action=edit&addtemplate=2"; } else { document.forms["blockip"].wpCreateAccount.click; document.forms["blockip"].wpEnableAutoblock.click; var newurl = "http://en.wikipedia.org/w/index.php?title=User_talk:" + isBlocked + "&action=edit&addtemplate=3"; }        window.setTimeout(function { document.forms["blockip"].wpBlock.click; }, 100); }    } else { var newurl = "http://en.wikipedia.org/w/index.php?title=User_talk:" + isBlocked + "&action=edit&addtemplate=1&blockduration=" + UrlParameters["blockduration"]; window.setTimeout(function { document.forms["blockip"].wpBlock.click; }, 100); }    window.setTimeout(function { location.href = newurl; }, 1000); }  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"]; window.setTimeout(function { document.getElementById("mw-Protect-submit").click; }, 100); }  if ( ( (UrlParameters["title"] == 'Special:Log') && (UrlParameters["type"] == 'newusers') ) || (location.href.substring(location.href.indexOf("/wiki/")).search(/Special\:Log\/newusers/) != -1) ) { if ( (UrlParameters["limit"] < 51) || (document.body.getElementsByTagName("p")[1].childNodes[0].nodeValue.match(/\d+/) < 51) ) { var as = document.body.getElementsByTagName("ul")[0].getElementsByTagName("a"); for (i=0; i < as.length; i++) { if (as[i].childNodes[0].nodeValue == "block") { var newlink = document.createElement('a'); newlink.setAttribute('href', 'http://en.wikipedia.org/w/index.php?title=Special:Blockip/' + as[i].title.replace(/Special:Blockip\//, '') + '&blockreason=Vandalism-only_account&blockduration=infinite'); var EditTextNode = document.createTextNode("fastblock"); newlink.appendChild(EditTextNode); as[i].parentNode.insertBefore( newlink, as[i].nextSibling ); as[i].parentNode.insertBefore( document.createTextNode(' | '), as[i].nextSibling ); }    }    }   }   if (UrlParameters["title"] == 'Category:All_images_with_the_same_name_on_Wikimedia_Commons') { var as = document.getElementsByTagName("table")[1].getElementsByTagName("a"); for (i=0; i "") { var uri = "http://commons.wikimedia.org/w/index.php?title=" + wgPageName; window.open(uri); }  if (UrlParameters["diff"] > "") { function searchRollbackLink { var tds = document.getElementsByTagName("td"); for (var i=0; i<tds.length; i++) { var td = tds[i]; if (td.className != "diff-ntitle") continue; var as = td.getElementsByTagName("a"); for (var j=0; j<as.length; j++) { var a = as[j]; if (!/.*action=rollback.*/(a.href)) continue; var newlink = document.createElement('a'); newlink.setAttribute('href', a.href); var EditTextNode = document.createTextNode("normal rollback"); newlink.appendChild(EditTextNode); as[j].parentNode.insertBefore( newlink, as[j].nextSibling ); as[j].parentNode.insertBefore( document.createTextNode(' | '), as[j].nextSibling ); return a;        } }      return tds; }    function RollAndSpam(rolluri) { location.href = rolluri; var backrolled = rolluri.split("from=")[1].split("&token=")[0]; var vandalizedpage = wgPageName; var uri = "http://en.wikipedia.org/w/index.php?title=User talk:" + backrolled + "&vandalizedpage=" + vandalizedpage + "&action=edit&spam=1"; window.setTimeout(function { location.href = uri; }, 500); }   if (wgUserName == "DerHexer") { var revlink = searchRollbackLink; revlink.onclick = function { RollAndSpam(revlink.href); return false; } }  }   if ( (UrlParameters["spam"] > "") && (UrlParameters["vandalizedpage"] > "") ) { document.editform.wpMinoredit.checked=true; if (document.forms["editform"].wpTextbox1.value == "") { document.editform.wpSummary.value = "Caution: Vandalism on \[\[" + UrlParameters["vandalizedpage"].replace(/\_/g, ' ') + "\]\]"; document.forms["editform"].wpTextbox1.value = "\{\{subst\:uw-vandalism2\|" + UrlParameters["vandalizedpage"].replace(/\_/g, ' ') + "\}\} " + usersignature; document.editform.wpSave.click; window.setTimeout(function { window.close; }, 1000); } else { var now = new Date; var actual_time = now.getTime; var splitted = document.forms["editform"].wpTextbox1.value.split("<!--"); var last_time = splitted[splitted.length-1].match(/([\:\d]+)\, (\d+) ([^\d]+) (\d+)/); var last_timestamp = Date.parse(RegExp.$2 + " " + RegExp.$3 + " " + RegExp.$4 + " " + RegExp.$1 + ":00 GMT"); var difftime = last_timestamp + 86400000 - actual_time; if (difftime < 0) { document.editform.wpSummary.value = "Caution: Vandalism on \[\[" + UrlParameters["vandalizedpage"].replace(/\_/g, ' ') + "\]\]"; document.forms["editform"].wpTextbox1.value = document.forms["editform"].wpTextbox1.value + "\n\n\{\{subst\:uw-vandalism2\|" + UrlParameters["vandalizedpage"].replace(/\_/g, ' ') + "\}\} " + usersignature; document.editform.wpSave.click; window.setTimeout(function { window.close; }, 1000); } else { if ((splitted[splitted.length-1].search(/uw\-[^\d]*(\d)/) != -1) || (splitted[splitted.length-1].search(/Template\:Test/) != -1)) { var matchedtemplate = splitted[splitted.length-1].match(/uw\-[^\d]*(\d)/); var matchednumber = RegExp.$1; var matchedtemplate2 = splitted[splitted.length-1].match(/Template\:Test(\d)/); var matchednumber2 = RegExp.$1; if ((matchednumber == 4) || (matchednumber2 == 4)) { if (wgTitle.match(/\d+\.\d+\.\d+\.\d+/)) { var blockurl = "http://en.wikipedia.org/w/index.php?title=Special:Blockip/" + wgTitle + "&blockduration=24&blockreason=vandalism"; } else { var blockurl = "http://en.wikipedia.org/w/index.php?title=Special:Blockip/" + wgTitle + "&blockduration=infinite&blockreason=vandalism-only%20account"; }              window.setTimeout(function { location.href = blockurl; }, 1000); } else { document.editform.wpSummary.value = "Final warning: Vandalism on \[\[" + UrlParameters["vandalizedpage"].replace(/\_/g, ' ') + "\]\]"; document.forms["editform"].wpTextbox1.value = document.forms["editform"].wpTextbox1.value + "\n\n\{\{subst\:uw-vandalism4\|" + UrlParameters["vandalizedpage"].replace(/\_/g, ' ') + "\}\} " + usersignature; document.editform.wpSave.click; window.setTimeout(function { window.close; }, 1000); }          } else { document.editform.wpSummary.value = "Caution: Vandalism on \[\[" + UrlParameters["vandalizedpage"].replace(/\_/g, ' ') + "\]\]"; document.forms["editform"].wpTextbox1.value = document.forms["editform"].wpTextbox1.value + "\n\n\{\{subst\:uw-vandalism2\|" + UrlParameters["vandalizedpage"].replace(/\_/g, ' ') + "\}\} " + usersignature; document.editform.wpSave.click; window.setTimeout(function { window.close; }, 1000); }        }       }   }   if (UrlParameters["addtemplate"] > '') { document.editform.wpMinoredit.checked=true; if (UrlParameters["addtemplate"] == 1) { document.editform.wpSummary.value = "You have been temporarily blocked."; document.forms["editform"].wpTextbox1.value = document.forms["editform"].wpTextbox1.value + "\n\n\{\{subst\:uw-block1\|time=" + UrlParameters["blockduration"] + "\|reason\=vandalism\|subst\=subst\:\}\}"; } else if (UrlParameters["addtemplate"] == 2) { document.editform.wpSummary.value = "\{\{indefblockeduser\}\}"; document.forms["editform"].wpTextbox1.value = "\{\{indefblockeduser\}\}"; } else if (UrlParameters["addtemplate"] == 3) { document.editform.wpSummary.value = "\{\{uw-ublock\}\}"; document.forms["editform"].wpTextbox1.value = document.forms["editform"].wpTextbox1.value + "\n\n\{\{subst:uw-ublock\}\}" + usersignature; }    document.editform.wpSave.click; window.setTimeout(function { window.close; }, 1000); } if (wgUserName == "DerHexer") { if (UrlParameters["title"] == "User:DerHexer/redirects" && UrlParameters["action"] == "edit") { if (UrlParameters["number"]) { var namespace = new Array ; namespace = ["", "Wikipedia ", "Bild ", "MediaWiki ", "Template ", "Help ", "Category ", "Portal "]; var namespace_number = new Array ; namespace_number = [0, 4, 6, 8, 10, 12, 14, 100]; var number = UrlParameters["number"]; function newRequest {                 try { if (window.XMLHttpRequest) { return new XMLHttpRequest; } else { return new ActiveXObject("MSXML2.XMLHTTP"); }                 } catch (e) { return false; }               }                var beginning = UrlParameters["beginning"]; var req; if (req = newRequest) { var text = "/w/query.php?format=xml&what=allpages&aplimit=40&apnamespace=" + (namespace_number[number] + 1) + "&apfrom=" + beginning + "&apfilterredir=redirects"; req.open("GET", text, false); req.send(""); var redir = req.responseXML.getElementsByTagName("title"); }               for (i = 0; i < redir.length; i++) { var redir2 = "/w/query.php?format=xml&what=allpages&aplimit=1&apnamespace=" + namespace_number[number] + "&apfrom=" + redir[i].childNodes[0].nodeValue.replace(new RegExp(namespace[number] + "Talk:"), "").replace(/ /g, "%20").replace(/&/g, "%26").replace(/\"/g, "%22").replace(/\+/g, "%2B").replace(/\'/g, "%27") + "&apfilterredir=redirects";                 var req;                  if (req = newRequest) {                    req.open("GET", redir2, false);                    req.send("");                    var redir_compare = req.responseXML.getElementsByTagName("title");                    var redir_compare_disk = namespace[number] + "Talk:" + redir_compare[0].childNodes[0].nodeValue.replace(new RegExp(namespace[number].replace(/ /, "") + ":"), "");                    if (redir[i].childNodes[0].nodeValue == redir_compare_disk) {                      var redir3 = "/w/query.php?format=xml&what=backlinks&bllimit=1&titles=" + redir_compare_disk; var req; if (req = newRequest) { req.open("GET", redir3, false); req.send(""); var linked = req.responseXML.getElementsByTagName("bl"); if (linked.length == 0) { document.editform.wpTextbox1.value = document.editform.wpTextbox1.value + "http://en.wikipedia.org/w/index.php?title=" + redir[i].childNodes[0].nodeValue.replace(/ /g, "%20").replace(/&/g, "%26").replace(/\"/g, "%22").replace(/\+/g, "%2B").replace(/\'/g, "%27") + "&redirect=no&action=delete&deletereason=unnecessary%20redirect ";                       }                      }                    }                    if (i == redir.length-1) {                      document.editform.wpTextbox1.value = document.editform.wpTextbox1.value + "http://en.wikipedia.org/w/index.php?title=User:DerHexer/redirects&action=edit&beginning=" + redir[i].childNodes[0].nodeValue.replace(new RegExp(namespace[number] + "Talk:"), "").replace(/ /g, "%20").replace(/&/g, "%26").replace(/\"/g, "%22").replace(/\+/g, "%2B").replace(/\'/g, "%27") + "&number=" + number; document.editform.wpPreview.click; }                 }                }              }    } } } if ( (UrlParameters["deletereason"] > "") || ( (UrlParameters["blockreason"] > "") && (UrlParameters["blockduration"] > "") )  || ( (UrlParameters["protectreason"] > "") && (UrlParameters["protectduration"] > "") && (UrlParameters["protecttype"] > "") ) || ( ( (UrlParameters["title"] == 'Special:Log') && (UrlParameters["type"] == 'newusers') ) || (location.href.substring(location.href.indexOf("/wiki/")).search(/Special\:Log\/newusers/) != -1) ) || (UrlParameters["title"] == 'Category:All_images_with_the_same_name_on_Wikimedia_Commons') || (UrlParameters["opencommons"] > "") || (UrlParameters["diff"] > "") || ( (UrlParameters["spam"] > "") && (UrlParameters["vandalizedpage"] > "") ) || (UrlParameters["addtemplate"] > '') || (UrlParameters["title"] == "User:DerHexer/redirects" && UrlParameters["action"] == "edit") ) { addOnloadHook(fillActionPage); } // // Funktionen im Quickbar (monobook.js) var usedropdown = false;       // Wenn keine Dropdowns gewünscht sind, hier false eintragen! var qbnewpage = false;          // sollen Seiten aus dem QuickBar im neuen Fenster aufgerufen werden? var timeout = 50000;           // 50 Sekunden auf das Neuladen der Seite warten var zeigeversion = false;       // monobook-Version anzeigen? var zeigehilfe = true;         // kurze Hilfetexte beim überfahren mit der Maus anzeigen ? default true var debugme = false;           // Debug-Modus? var usersignature = '\~\~\~\~';        //Standardsignatur // Modul: admin.js var delreason = true;            // Löschgründe ergänzen? var deletereasons = "g1|was patent nonsense: an unsalvageably incoherent page with no meaningful content||g1:nonsense; g2|was a test page||g2:test; g3|was pure vandalism||g3:vandalism; g3|was a redirect created during cleanup of page move vandalism||g3:pagemove; g4|was a copy of material previously deleted per XfD||g4:repost; g5|was a contribution was made by a banned user||g5:banned; g6|temporary deletion in order to merge page histories||g6:histmerge; g6|making way for a non-controversial move||g6:move; g6|g6:deleting page per result of AfD discussion||g6:afd; g6|non-controversial housekeeping deletion||g6:housekeeping; g7|only editor requested deletion||g7:author; g7|only editor has blanked the page||g7:blanked; g8|was a talk page whose corresponding page does not exist||g8:talk; g10|was an attack page intented to disparage its subject||g10:attack; g11|was blatant advertising, used only to promote someone or something||g11:spam; g12|was a blatant copyright infringement||g12:copyvio; a1|had no content whatsoever except possibly links elsewhere, a rephrasing of the title, and/or attempts to correspond||a1:nocontext; a2|was a foreign language article that exists on another Wikimedia project||a2:foreign; a3|had no content whatsoever except possibly links elsewhere, a rephrasing of the title, and/or attempts to correspond||a3:nocontent; a5|was properly transwikified elsewhere||a5:transwiki; a7|was an article about a real person, group of people, band, club, company, or web content that didn\’t assert the importance or significance of its subject||a7:bio; a7|was an article about a web site, blog, online forum, webcomic, podcast, or similar web content that didn\’t assert the importance or significance of its subject||a7:web; a7|was an article about a company or corporation that didn\’t assert the importance or significance of its subject||a7:inc; a7|was an article about a club that didn\’t assert the importance or significance of the subject||a7:club; a7|was an article about a band, singer, musician, or musical ensemble that didn\’t assert the importance or significance of the subject||a7:band; r1|was a redirect to an non-existent page||r1:redirnone; r2|was a redirect to the Talk:, User: or User talk: space||r2:rediruser; r3|was a redirect based on an implausible typo||r3:redirtypo; i1|a same or better image exists on Wikipedia||i1:redundantimage; i2|was a corrupt or empty image||i2:noimage; i3|was licensed as for non-commercial use only, non-derivative use or used with permission\, uploaded on or after May 19, 2005, and no assertion of fair use was provided||i3:noncom; i4|was an image lacking sources or licensing information for more than seven days||i4:unksource; i5|was an unfree image that wasn\’t been used for more than seven days||i5:unfree; i6|was an image with fair use tag but no fair use rationale for more than seven days||i6:norat; i7|was an image with an invalid fair use rationale and the uploader was notified more than 48 hours ago||i7:badfairuse; i8|was an image available as a bit-for-bit identical copy on the Wikimedia Commons||i8:nowcommons; c1|was an empty category for at least four days||c1:catempty; c3|was a category solely populated from a now deleted template||c3:catfd; u1|was a user page whose user requested deletion||u1:userreq; u2|was a user page of a user that did not exist||u2:nouser; u3|was a gallery in the user space which consisted mostly of fair use images||u3:gallery; t1|was an divisive and inflammatory template||t1:divisive; p2|was an underpopulated portal||p2:emptyportal"; var blockreason = true;            // Blockgründe ergänzen? var blockreasons = "vandalism||7||B(v+7); vandalism||24||B(v+24); vandalism||31||B(v+31); article vandalism||7||B(article+7); article vandalism||24||B(article+24); article vandalism||31||B(article+31); vandalism-only account||infinite||B(voa+i); inappropriate username||infinite||B(name+i)"; var protectreason = true;            // Schutzgründe ergänzen? var protectreasons = "IP vandalism||1 day||1||P(IP-V+1d); IP vandalism||1 week||1||P(IP-V+1w); IP vandalism||3 months||1||P(IP-V+3m); IP vandalism||infinite||1||P(IP-V+i); edit war||indefinite||2||P(EW+i); \{\{indefblockeduser\}\}||infinite||2||P(indefblock+i); protection removed||infinite||0||P(!protection+i)"; var blockedtext = "Zwei Stunden.";            // Standardtext für die VM // **************** SETUP Ende *********************************** var user = wgUserName ; // username wird automatisch übernommen // page type variables: namespaces var isArticle      = (wgNamespaceNumber == 0); var isArticleTalk  = (wgNamespaceNumber == 1); var isBild         = (wgCanonicalNamespace == "Image"); var isCategory     = (wgCanonicalNamespace == "Category"); var isTemplate     = (wgCanonicalNamespace == "Template"); var isGeneric      = false; if ((!isBild) && (!isCategory) && (!isTemplate)) isGeneric = true; var isProject      = (wgCanonicalNamespace == "Project"); // page type variables: namespace == -1 var isSpecial = (wgCanonicalNamespace == "Special"); var isRestore = (isSpecial && (wgCanonicalSpecialPageName == "Undelete")); var isContrib = (isSpecial && (wgCanonicalSpecialPageName == "Contributions")); var isWatchlist = (isSpecial && (wgCanonicalSpecialPageName == "Watchlist")); // page type variables: namespace == -1 var isTalk = (!isSpecial && isOdd(wgNamespaceNumber)); // page type variables: other stuff var isPHP    = (document.URL.indexOf('index.php') > 0); var isDiff   = UrlParameters["diff"]; var isEdit   = ((UrlParameters['action']=='edit') || (UrlParameters['action']=='submit')); var isHistory = (UrlParameters['action']=='history'); // Admin functions var adminflag = false; if (isAdmin) adminflag = true; /* * ab hier wird der Quickbar (der Kasten oben links) zusammengebaut * * zuerst die allgemeinen Variablen (hier bitte nix ändern!) */ var Quickbar = ' '; var xxx     = ''; var trenner=' '; var br    =' '; var qbtarget = '_self'; if (qbnewpage) qbtarget = '_blank'; var dropdown = usedropdown; var scrpt   = ''; var scrptn  = 0; var indropdown; var ind; /* * Quickbar-Zusammenbau, Teil 1: * * zuerst die Reihenfolge der einzelnen Abschnitte: */ function buildQuickbar { // der folgende Abschnitt wird nur bei Admins eingeblendet qbAdminTools; } /* * Quickbar-Zusammenbau, Teil 2: * * die Belegung der einzelnen Abschnitte */ function qbAdminTools { if (!adminflag) return; w (0,' ','Adminbar',''); if (delreason) { w (0,' Delete ','Löschen',''); decodeadminreasons(deletereasons); }     if (blockreason) { w (0,' Block ','Sperren',''); decodeadminreasons(blockreasons); }     if (protectreason) { w (0,' Protect ','Schützen',''); decodeadminreasons(protectreasons); }     w (0,' ',,); } /*  * hier wird der Quickbar in die Seite geschrieben * (ab hier bitte nichts ändern) */ buildQuickbar; document.write(Quickbar); if (typeof(version) == 'undefined') var version = "?"; if (!isEdit || zeigeversion || isPHP) { document.write(     ' ',    (zeigeversion) ?      ('' + (adminflag ? 'A/' : ) + version + '  ')         : ,    (!isEdit) ?      ('  ')         : ' ',      '',          (user.split(' ')[0].length < 10) ? user.split(' ')[0] : 'MyPages',      '',      ' '); }                document.write(xxx,' '); if (scrpt > '') { document.write(' function _doopt (was) { switch (was) {', scrpt, '}}<\/script>'); scrpt=''; } // // ab hier functions // function w (was,lurl,linktext,targt,title) { if (!title) title=linktext; if (!zeigehilfe) title=''; if (!dropdown) { switch (was) { case 0 : xxx=xxx+lurl;break; case 1 : xxx=xxx+''+linktext+' ';break; case 2 : xxx=xxx+''+linktext+' ';break; case 3 : xxx=xxx+''+linktext+' ';break; case 4 : xxx=xxx+''+linktext+' ';break; }	 	     } //if else //todo: Hilfe bei Dropdowns. Benutzt die überhaupt jemand???? {  var ltext='__________'.substr(1,ind)+linktext; switch (was) { case 0 : if (lurl==br) {xxx=xxx+' '+linktext+' ';ind=2;} else if (lurl==trenner) newdropdown(linktext); break; case 1 : xxx=xxx+''+ltext+' ';break; case 2 : xxx=xxx+''+ltext+' '; scrpt=scrpt+'case '+scrptn+':newtext('+lurl+');break;';scrptn++;break; case 3 : xxx=xxx+'<option value="3|'+scrptn+'">'+ltext+' '; scrpt=scrpt+'case '+scrptn+':insertTagsWrapper('+lurl+');break;';scrptn++;break; case 4 : xxx=xxx+'<option value="4|'+scrptn+'">'+ltext+' '; scrpt=scrpt+'case '+scrptn+':'+lurl+';break;';scrptn++;break; } //switch } //else } //w function isEven(myNumber) { return (myNumber % 2 == 0); } function isOdd(myNumber) { return (! isEven(myNumber)); } function isAdmin { var specialrights = false; if (typeof wgUserGroups != 'object') return(specialrights); if (typeof wgUserGroups[0] != 'string') return(specialrights); for (i=0;i<wgUserGroups.length;i++) { if (wgUserGroups[i] == "sysop") specialrights = true; }  return(specialrights); } function importJavascriptL(page, lang) {   try { /* check the parameters and set defaults */ if(!page) throw("importJavascriptL: Missing parameter page."); if(!lang) lang = wgContentLanguage; /* create import url */ var import_url = 'http://' + lang + '.wikipedia.org' + wgScriptPath + '/index.php?title=User:' + page + '.js&action=raw&ctype=text/javascript&smaxage=2678400&dontcountme=s'; /* import page */ var Head = document.getElementsByTagName('head').item(0); var Script = document.createElement('script'); Script.setAttribute('type', 'text/javascript'); Script.setAttribute('src', import_url); Script.setAttribute('charset', 'utf-8'); Head.appendChild(Script); return true; } catch(e) { alert(e.message); return false; } } function decodeadminreasons(adminreasons) { // DerHexer var adminreason = adminreasons.split('; '); for (i=0; i < adminreason.length; i++) { var adminreasoncount = adminreason[i].split("||"); switch(adminreasoncount.length) { case 1 : w (4,"deleting('" + adminreasoncount[0] + "');","" + adminreasoncount[0] + ""); break; case 2 : w (4,"deleting('" + adminreasoncount[0] + "');","" + adminreasoncount[1] + ""); break; case 3 : w (4,"blocking('" + adminreasoncount[0] + "', '" + adminreasoncount[1] + "');","" + adminreasoncount[2] + ""); break; case 4 : w (4,"protecting('" + adminreasoncount[0] + "', '" + adminreasoncount[1] + "', '" + adminreasoncount[2] + "');","" + adminreasoncount[3] + ""); break; case 5 : w (4,"protecting('" + adminreasoncount[0] + "', '" + adminreasoncount[1] + "', '" + adminreasoncount[2] + "', '" + adminreasoncount[3] + "');","" + adminreasoncount[4] + ""); break; }  } } // ***** FOOT-Block ***** if (adminflag && (delreason || blockreason || protectreason) && wgUserName == 'DerHexer') importJavascriptL('DerHexer/admin','en'); // User:DerHexer/admin.js