„Benutzer:Isnow/vector.js“ – Versionsunterschied
Erscheinungsbild
Inhalt gelöscht Inhalt hinzugefügt
Isnow (Diskussion | Beiträge) K hat „Benutzer:Isnow/monobook.js“ nach „Benutzer:Isnow/vector.js“ verschoben: Benutzer:Isnow/vector.js |
Isnow (Diskussion | Beiträge) if (document.getElementById |
||
| Zeile 9: | Zeile 9: | ||
for (i=0;i<listitems.length;i++) { |
for (i=0;i<listitems.length;i++) { |
||
switch (listitems[i].className) { |
switch (listitems[i].className) { |
||
case 'interwiki-de': |
case 'interwiki-de': |
||
listitems[i].className = 'mylangs-show'; |
listitems[i].className = 'mylangs-show'; |
||
break; |
break; |
||
case 'interwiki-en': |
case 'interwiki-en': |
||
listitems[i].className = 'mylangs-show'; |
listitems[i].className = 'mylangs-show'; |
||
break; |
break; |
||
case 'interwiki-fr': |
case 'interwiki-fr': |
||
listitems[i].className = 'mylangs-show'; |
listitems[i].className = 'mylangs-show'; |
||
break; |
break; |
||
case 'interwiki-ja': |
case 'interwiki-ja': |
||
listitems[i].className = 'mylangs-show'; |
listitems[i].className = 'mylangs-show'; |
||
break; |
break; |
||
case 'interwiki-ko': |
case 'interwiki-ko': |
||
listitems[i].className = 'mylangs-show'; |
listitems[i].className = 'mylangs-show'; |
||
break; |
break; |
||
case 'interwiki-zh': |
case 'interwiki-zh': |
||
listitems[i].className = 'mylangs-show'; |
listitems[i].className = 'mylangs-show'; |
||
break; |
break; |
||
case 'interwiki-de FA': |
|||
listitems[i].className = 'mylangs- |
listitems[i].className = 'mylangs-show'; |
||
break; |
|||
case 'interwiki-en FA': |
|||
listitems[i].className = 'mylangs-show'; |
|||
break; |
|||
case 'interwiki-fr FA': |
|||
listitems[i].className = 'mylangs-show'; |
|||
break; |
|||
case 'interwiki-ja FA': |
|||
listitems[i].className = 'mylangs-show'; |
|||
break; |
|||
case 'interwiki-ko FA': |
|||
listitems[i].className = 'mylangs-show'; |
|||
break; |
|||
case 'interwiki-zh FA': |
|||
listitems[i].className = 'mylangs-show'; |
|||
break; |
|||
case 'interwiki-de GA': |
|||
listitems[i].className = 'mylangs-show'; |
|||
break; |
|||
case 'interwiki-en GA': |
|||
listitems[i].className = 'mylangs-show'; |
|||
break; |
|||
case 'interwiki-fr GA': |
|||
listitems[i].className = 'mylangs-show'; |
|||
break; |
|||
case 'interwiki-ja GA': |
|||
listitems[i].className = 'mylangs-show'; |
|||
break; |
|||
case 'interwiki-ko GA': |
|||
listitems[i].className = 'mylangs-show'; |
|||
break; |
|||
case 'interwiki-zh GA': |
|||
listitems[i].className = 'mylangs-show'; |
|||
break; |
|||
default : |
|||
listitems[i].className = 'mylangs-none'; |
|||
} |
} |
||
} |
} |
||
// drop them at the bottom of the content area |
// drop them at the bottom of the content area |
||
document.getElementById('column-content') |
if (document.getElementById('column-content') != null) { |
||
document.getElementById('column-content').appendChild(langs); |
|||
} // current version |
|||
if (document.getElementById('content') != null) { |
|||
document.getElementById('content').appendChild(langs); |
|||
} // beta version |
|||
} |
} |
||
if (window.addEventListener) window.addEventListener("load",morelangs,false); |
if (window.addEventListener) window.addEventListener("load",morelangs,false); |
||
Version vom 21. Juni 2010, 18:02 Uhr
//Reference: http://meta.wikimedia.org/wiki/User:Fristu/monobook.js
function morelangs() {
var langs = document.getElementById('p-lang').cloneNode(true);
// don't use the same ids twice
langs.id = 'mylangs';
var listitems = langs.getElementsByTagName('LI');
for (i=0;i<listitems.length;i++) {
switch (listitems[i].className) {
case 'interwiki-de':
listitems[i].className = 'mylangs-show';
break;
case 'interwiki-en':
listitems[i].className = 'mylangs-show';
break;
case 'interwiki-fr':
listitems[i].className = 'mylangs-show';
break;
case 'interwiki-ja':
listitems[i].className = 'mylangs-show';
break;
case 'interwiki-ko':
listitems[i].className = 'mylangs-show';
break;
case 'interwiki-zh':
listitems[i].className = 'mylangs-show';
break;
case 'interwiki-de FA':
listitems[i].className = 'mylangs-show';
break;
case 'interwiki-en FA':
listitems[i].className = 'mylangs-show';
break;
case 'interwiki-fr FA':
listitems[i].className = 'mylangs-show';
break;
case 'interwiki-ja FA':
listitems[i].className = 'mylangs-show';
break;
case 'interwiki-ko FA':
listitems[i].className = 'mylangs-show';
break;
case 'interwiki-zh FA':
listitems[i].className = 'mylangs-show';
break;
case 'interwiki-de GA':
listitems[i].className = 'mylangs-show';
break;
case 'interwiki-en GA':
listitems[i].className = 'mylangs-show';
break;
case 'interwiki-fr GA':
listitems[i].className = 'mylangs-show';
break;
case 'interwiki-ja GA':
listitems[i].className = 'mylangs-show';
break;
case 'interwiki-ko GA':
listitems[i].className = 'mylangs-show';
break;
case 'interwiki-zh GA':
listitems[i].className = 'mylangs-show';
break;
default :
listitems[i].className = 'mylangs-none';
}
}
// drop them at the bottom of the content area
if (document.getElementById('column-content') != null) {
document.getElementById('column-content').appendChild(langs);
} // current version
if (document.getElementById('content') != null) {
document.getElementById('content').appendChild(langs);
} // beta version
}
if (window.addEventListener) window.addEventListener("load",morelangs,false);
else if (window.attachEvent) window.attachEvent("onload",morelangs);