Benutzer:J*/Userscript.js: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
J* (Diskussion | Beiträge) (Die Seite wurde neu angelegt.) |
J* (Diskussion | Beiträge) |
||
Zeile 1: | Zeile 1: | ||
+ | addOnloadHook( bl2_create ); | ||
+ | function bl2_create() | ||
+ | { | ||
+ | box = null; | ||
+ | try | ||
+ | { | ||
+ | box = document.getElementById("ca-nstab-main").parentNode; | ||
+ | } | ||
+ | catch(e) | ||
+ | { | ||
+ | } | ||
+ | |||
+ | el = document.createElement("LI"); | ||
+ | el.innerHTML = ""; | ||
+ | el.innerHTML += ">"; | ||
+ | el.innerHTML += "<form style='display: inline' onload='bl2_submit(this.bl_box);'>"; | ||
+ | el.innerHTML += "<input name='bl_box' id='bl2_box' type='text' style='background-color: #EEEEEE; border: none; width: 3em; font-size: 80%; color: #555555;' onchange='bl2_change(this);/>"; | ||
+ | el.innerHTML += "</form>"; | ||
+ | |||
+ | box.appendChild(el); | ||
+ | |||
+ | //document.getElementById("bl2_box").change = bl2_change; | ||
+ | //document.getElementById("bl2_box").parentNode.submit = bl2_submit; | ||
+ | } | ||
+ | |||
function bl2_submit ( bl_box ) | function bl2_submit ( bl_box ) | ||
{ | { | ||
Zeile 9: | Zeile 34: | ||
//box.value = bl_box.value.toUpperCase(); | //box.value = bl_box.value.toUpperCase(); | ||
} | } | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Version vom 17. Juni 2008, 23:56 Uhr
addOnloadHook( bl2_create );
function bl2_create()
{
box = null;
try
{
box = document.getElementById("ca-nstab-main").parentNode;
}
catch(e)
{
}
el = document.createElement("LI");
el.innerHTML = "";
el.innerHTML += ">";
el.innerHTML += "<form style='display: inline' onload='bl2_submit(this.bl_box);'>";
el.innerHTML += "<input name='bl_box' id='bl2_box' type='text' style='background-color: #EEEEEE; border: none; width: 3em; font-size: 80%; color: #555555;' onchange='bl2_change(this);/>";
el.innerHTML += "</form>";
box.appendChild(el);
//document.getElementById("bl2_box").change = bl2_change;
//document.getElementById("bl2_box").parentNode.submit = bl2_submit;
}
function bl2_submit ( bl_box )
{
alert("Submit: "+bl_box.value);
}
function bl2_change ( bl_box )
{
alert("change: "+bl_box.value);
//box.value = bl_box.value.toUpperCase();
}