„Benutzer:FGodard/vector.js“ – Versionsunterschied
Erscheinungsbild
Inhalt gelöscht Inhalt hinzugefügt
Keine Bearbeitungszusammenfassung |
Keine Bearbeitungszusammenfassung |
||
Zeile 10: | Zeile 10: | ||
var links = new Array(); |
var links = new Array(); |
||
links[0] = new Array(2); |
links[0] = new Array(2); |
||
links[0][0] = " |
links[0][0] = "Wikipedia:Auskunft"; |
||
links[0][1] = " |
links[0][1] = "Auskunft"; |
||
links[1] = new Array(2); |
links[1] = new Array(2); |
||
links[1][0] = " |
links[1][0] = "Wikipedia:Fragen zur Wikipedia"; |
||
links[1][1] = " |
links[1][1] = "Fragen zur Wikipedia"; |
||
links[2] = new Array(2); |
links[2] = new Array(2); |
||
links[2][0] = " |
links[2][0] = "#"; |
||
links[2][1] = " |
links[2][1] = "Top"; |
||
links[3] = new Array(2); |
|||
links[3][0] = "Wikipedia:Löschkandidaten"; |
|||
links[3][1] = "Löschkandidaten"; |
|||
links[4] = new Array(2); |
|||
links[4][0] = "WP:T/FR"; |
|||
links[4][1] = "Stammtisch FR"; |
|||
links[5] = new Array(2); |
|||
links[5][0] = "Wikipedia:Freiburg im Breisgau/FReview"; |
|||
links[5][1] = "FRreview"; |
|||
links[6] = new Array(2); |
|||
links[6][0] = "Wikipedia:Auskunft"; |
|||
links[6][1] = "Auskunft"; |
|||
links[7] = new Array(2); |
|||
links[7][0] = "Wikipedia:Fragen zur Wikipedia"; |
|||
links[7][1] = "Fragen zur Wikipedia"; |
|||
links[8] = new Array(2); |
|||
links[8][0] = "#"; |
|||
links[8][1] = "Top"; |
|||
linksLength = links.length; |
linksLength = links.length; |
||
Zeile 43: | Zeile 25: | ||
contribiuteUl[0].appendChild(li); |
contribiuteUl[0].appendChild(li); |
||
var a = document.createElement("a"); |
var a = document.createElement("a"); |
||
if (i!= |
if (i!=2) a.setAttribute("href", linksPrefix+links[i][0]); |
||
else a.setAttribute("href", links[i][0]); |
else a.setAttribute("href", links[i][0]); |
||
a.setAttribute("title", links[i][1]); |
a.setAttribute("title", links[i][1]); |
Aktuelle Version vom 14. März 2023, 16:03 Uhr
/*
* addContributeLinks
* Ergänzt ein paar Links im Mitmachen-Linkbereich.
*/
function addContributeLinks() {
var contribiuteUl = document.getElementById("p-tb").getElementsByTagName("ul");
var linksPrefix = "http://de.wikipedia.org/wiki/";
var links = new Array();
links[0] = new Array(2);
links[0][0] = "Wikipedia:Auskunft";
links[0][1] = "Auskunft";
links[1] = new Array(2);
links[1][0] = "Wikipedia:Fragen zur Wikipedia";
links[1][1] = "Fragen zur Wikipedia";
links[2] = new Array(2);
links[2][0] = "#";
links[2][1] = "Top";
linksLength = links.length;
for (var i=0; i < linksLength; ++i) {
var li = document.createElement("li");
li.classList.add("mw-list-item");
contribiuteUl[0].appendChild(li);
var a = document.createElement("a");
if (i!=2) a.setAttribute("href", linksPrefix+links[i][0]);
else a.setAttribute("href", links[i][0]);
a.setAttribute("title", links[i][1]);
li.appendChild(a);
var aText = document.createTextNode(links[i][1]);
a.appendChild(aText);
}
}
// onload
$(addContributeLinks);