Benutzer:Aggroblut/common.js: Unterschied zwischen den Versionen
Aus SchnuppTrupp
Zeile 10: | Zeile 10: | ||
} | } | ||
− | function verlinkung( | + | function verlinkung(link){ |
− | document.getElementById("left-navigation").getElementsByTagName("ul")[0].innerHTML = document.getElementById("left-navigation").getElementsByTagName("ul")[0].innerHTML+"<li><span><a href=\ | + | document.getElementById("left-navigation").getElementsByTagName("ul")[0].innerHTML = document.getElementById("left-navigation").getElementsByTagName("ul")[0].innerHTML+parse("<li><span><a href=\%s\" title=\"Zur englischen RuneScape.Wiki\" style=\"background: url('https://i.imgur.com/VOjLOQr.png') no-repeat center;background-size: auto;background-size: 25px;width: 25px;overflow:hidden;\"></a></span></li>", link); |
} | } |
Version vom 16. März 2019, 18:53 Uhr
switch (document.getElementById("firstHeading").getElementsByTagName("span")[0].innerHTML) { case "Hauptseite": verlinkung("https://runescape.wiki"); break; case "Aggroblut": console.log("hi"); break; default: console.log("test"); } function verlinkung(link){ document.getElementById("left-navigation").getElementsByTagName("ul")[0].innerHTML = document.getElementById("left-navigation").getElementsByTagName("ul")[0].innerHTML+parse("<li><span><a href=\%s\" title=\"Zur englischen RuneScape.Wiki\" style=\"background: url('https://i.imgur.com/VOjLOQr.png') no-repeat center;background-size: auto;background-size: 25px;width: 25px;overflow:hidden;\"></a></span></li>", link); }