Benutzer:OwenBlacker/vector.js

aus Wikipedia, der freien Enzyklopädie
Zur Navigation springen Zur Suche springen

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
 functionmoreLinks()
 {
 if(navigator.userAgent.indexOf("Opera Mini")>0)return;

 vartabs=document.getElementById('p-cactions').cloneNode(true);
 // don't use the same ids twice- replace the p-cactions id and prepend 'mytabs-' to the li's
 tabs.id='mytabs';
 // needs this to be set from js, it ignores the css width for some reason
 tabs.style.width='100%';
 varlistitems=tabs.getElementsByTagName('LI');
 for(i=0;i<listitems.length;i++){
 if(listitems[i].id)listitems[i].id='mytabs-'+listitems[i].id;
 if(listitems[i].accesskey)listitems[i].accesskey="";
 }
 // drop them at the bottom of the content area
 document.getElementById('column-content').appendChild(tabs);
 }

 functionAddGoogleTranslateLink()
 {
 varwhatLinksHere=document.getElementById('t-whatlinkshere');
 vargLink=whatLinksHere.cloneNode(true);
 gLink.innerText='Translate to English';
 gLink.href='http://translate.google.com/translate?hl=en&ie=UTF-8&sl=de&tl=en&u='+document.location.href;
 whatLinksHere.parent.appendChild(gLink);
 }

 functionexternISBN(){
 for(vari=0;i<document.links.length;i++)
 {
 if(wgPageName!="Special:BookSources"
 &&!(wgTitle=="Book sources"&&wgCanonicalNamespace=="Project"))
 {
 if(document.links[i].href.match(/Special:BookSources\/(.{10,13})$/i))
 {
 document.links[i].href="http://www.amazon.co.uk/o/ASIN/"+RegExp.1ドル+"/bookaid";
 }
 }
 }
 }

 functionfixBadSearches()
 {
 if(navigator.userAgent.indexOf("MSIE")>0)return;

 varelems=document.getElementsByClassName("noarticletext");
 varurl=String(document.location)+'';

 if(
 elems!=null&&elems.length>0
 &&(url.indexOf('+')>0||url.indexOf('%2B')>0)
 &&url.indexOf("autoredirect=true")<0
 &&url.indexOf("monobook.js")<0
 )
 {
 document.location.replace(url.replace(/\+|(%2B)/gi,'_')+"?autoredirect=true");
 }
 }

 $(externISBN);
 //addOnloadHook(moreLinks);
 $(fixBadSearches);
 $(AddGoogleTranslateLink);
Abgerufen von „https://de.wikipedia.org/w/index.php?title=Benutzer:OwenBlacker/vector.js&oldid=209511106"