Benutzer:CyRoXX/monobook.js
aus Wikipedia, der freien Enzyklopädie
Hinweis: Leere nach dem Speichern den Browser-Cache, um die Änderungen zu sehen: Mozilla/Firefox: Shift-Strg-R, Internet Explorer: Strg-F5, Opera: F5, Safari: ⌘-R, Konqueror: Strg-R.
// Nuetzliche Skripte gibts auch unter: // http://en.wikipedia.org/wiki/Wikipedia:WikiProject_User_scripts/Scripts //*********************************************************************** // Marks admins with something // by [[:de:User:Spongo]] // 28. Dez. 2005 //*********************************************************************** var markadmin = true; var UrlParameters = new Array (); readparams(); document.write('<SCRIPT SRC=\'http://tools.wikimedia.de/~aka/dewiki_admins.txt\'><\/SCRIPT>'); function MarkAdmins(){ if (markadmin){ var langUser = "Benutzer:"; // in German 'Benutzer:' var aMark = document.createElement("b"); var aMarkText = document.createTextNode(" (A)"); // dieser Text wird hinter dem Namen des Admins angefügt (Standard: "(A)") aMark.appendChild(aMarkText); var ishistory = (UrlParameters['action']=='history'); var isdiskussion = (((document.URL.indexOf('Spezial:Recentchanges') > 0)) || (document.URL.indexOf('Diskussion') > 0) || (document.URL.indexOf('Wikipedia') > 0)); var searchExp = /.wiki.Benutzer.(.+)/; if (ishistory || isdiskussion || ((UrlParameters['diff']>'') && (UrlParameters['oldid']>''))) { for (var i=0; aNode = document.getElementsByTagName("a")[i]; i++) { // if it's a link to an user if ( (href = aNode.getAttribute("href")) && (href.search("/wiki/" + langUser) != -1) ) { currUser = searchExp.exec(href)[1]; // is this user an admin? for (var k=0; k < admins.length; ++k){ if (currUser == admins[k]){ aNode.appendChild(aMark.cloneNode(true)); break; } } } } } } } //****************************************** 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 readparams //****************************************** addOnloadHook(MarkAdmins); //*********************************************************************** // Google-Link //*********************************************************************** function addLink(where, url, name, id, title, key, after){ //* where is the id of the toolbar where the button should be added; // i.e. one of "p-cactions", "p-personal", or "p-navigation". //* url is the URL which will be called when the button is clicked. // javascript: urls can be used to do more complex things. //* name is what will appear as the name of the button. //* id is the id of the button; it's best to define one. // Use a prefix to make sure its unique. Optional. //* title is the tooltip title that gives a longer description // of the button; if you define a accesskey, mention it here. Optional. //* key is the char you want for the accesskey. Optional. //* after is the id of the button you want to follow this one. Optional. var na = document.createElement('a'); na.href = url; na.appendChild(document.createTextNode(name)); var li = document.createElement('li'); if(id) li.id = id; li.appendChild(na); var tabs = document.getElementById(where).getElementsByTagName('ul')[0]; if(after) { tabs.insertBefore(li,document.getElementById(after)); } else { tabs.appendChild(li); } if(id) { if(key && title) { ta[id] = [key, title]; } else if(key) { ta[id] = [key, '']; } else if(title) { ta[id] = ['', title];} } // re-render the title and accesskeys from existing code in wikibits.js akeytt(); return li; } addOnloadHook(function () { // add onload handler using code from wikibits.js var title; if (!(title = document.getElementById('t-whatlinkshere') )) return; if (!(title = title.getElementsByTagName('a')[0] )) return; if (!(title = title.href )) return; if (!(title = title.replace(/^.*title=Spezial:Whatlinkshere&target=/, '') )) return; if (!(title = title.replace(/^(Diskussion|Benutzer|Wikipedia|Bild|MediaWiki|Vorlage|Hilfe|Kategorie|Portal)(_Diskussion)?:/, '') )) return; if (!(title = title.replace(/("|%22)/g, '') )) return; if (!(title = title.replace(/_/g, '%20') )) return; //===jetzt kommt endlich der Google Link==== addLink('p-tb', 'http://www.google.com/search?q=%22'+title+'%22%20-Wikipedia&ie=utf-8&oe=utf-8', 'Google', 't-googlesearch', 'Suche bei Google nach "'+decodeURIComponent(title)+'"', 'G', null); //=========Link fuer Interwiki-Suche ============================== addLink('p-tb', 'http://vs.aka-online.de/cgi-bin/globalwpsearch.pl?search='+title+'&timeout=120&minor=0', 'GlobalWPSearch', 't-interwikisearch', 'Suche bei GlobalWPSearch nach "'+decodeURIComponent(title)+'"', 'I', null); //=========Link fuer Logs ======================================= addLink('p-tb', 'http://de.wikipedia.org/w/index.php?title=Spezial%3ALog&type=&user=&page='+title, 'Logbücher', 't-logsearch', 'Suche in den Logbüchern nach "'+decodeURIComponent(title)+'"', 'L', null); }); //===Ende der Funktion===== //*********************************************************************** // externISBN // // Beim Klicken auf einen ISBN-Link landet man nicht auf der WP-Seite mit // weiterführenden Links, sondern auf der Online-Preisvergleichsseite von // Bookbutler.de. // // Vorlage für diese Funktion: Skript auf en:Wikipedia:WikiProject User scripts/Scripts // (war ursprünglich Direktlink auf Amazon) //*********************************************************************** function externISBN() { for (var i = 0; i < document.links.length; i++) { var ln = document.links[i].href.match(/isbn=(.*)/); if (ln) { document.links[i].href='http://www.bookbutler.de/vergleich/wps/'+RegExp.$1; } } } addOnloadHook(externISBN); // [[:en:User:Lupin/popups.js]] // Main page in English: [[:en:Wikipedia:Tools/Navigation Popups]] document.write('<script type="text/javascript" src="' + 'http://en.wikipedia.org/w/index.php?title=User:Lupin/popups.js' + '&action=raw&ctype=text/javascript&dontcountme=s"></script>'); //*********************************************************************** // APPER's Rechtschreibprüfung (Benutzer:APPER bzw. Benutzer:APPER) //*********************************************************************** //document.write('<SCRIPT SRC="http://de.wikipedia.org/w/index.php?title=Benutzer:APPER/RP/js&action=raw&ctype=text/javascript"><\/SCRIPT>');