Benutzer:Rikku/monobook.js: Unterschied zwischen den Versionen

Zur Navigation springen Zur Suche springen
K
test spoilerbutton;
KKeine Bearbeitungszusammenfassung
K (test spoilerbutton;)
Zeile 77:
}
}
}
var link = document.getElementsByName("spoilerbutton")[0];
if(null != link){
link.firstChild.data = "zeige alle Spoiler";
link.href = "javascript:spoilOpenAll()";
link.getAttribute("value").nodeValue = "closed";
}
}
Zeile 98 ⟶ 104:
}
}
}
var link = document.getElementsByName("spoilerbutton")[0];
if(null != link){
link.firstChild.data = "verstecke alle Spoiler";
link.href = "javascript:spoilReset()";
link.getAttribute("value").nodeValue = "open";
}
}
 
Zeile 135 ⟶ 147:
spoiler[j].parentNode.insertBefore(par, spoiler[j]);
}
if(0 < spoiler.length){
spoilReset();
//baue link...
var par = document.createElement("p");
var link = document.createElement("link");
link.href = "javascript:spoilAll()";
var text = document.createTextNode("spoilerbutton");
var value = document.createAttribute("name");
value.nodeValue = "spoilerbutton";
link.setAttributeNode(value);
var value = document.createAttribute("value");
value.nodeValue = "open";
link.setAttributeNode(value);
var style = document.createAttribute("style");
style.nodeValue = "float:right";
link.setAttributeNode(style);
link.appendChild(text);
//insert link...
par.appendChild(link);
var h1 = document.getElementsByTagName("h1")[0];
h1.parentNode.insertBefore(par, h1);
spoilReset();
 
}
}
 
5.367

Bearbeitungen

Navigationsmenü