Benutzer:J*/Userscript.js: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
J* (Diskussion | Beiträge) |
J* (Diskussion | Beiträge) |
||
Zeile 5: | Zeile 5: | ||
try | try | ||
{ | { | ||
− | box = document.getElementById("ca- | + | box = document.getElementById("ca-watch").parentNode; |
+ | |||
+ | 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; | ||
} | } | ||
catch(e) | catch(e) | ||
{ | { | ||
} | } | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
} | } | ||
Version vom 17. Juni 2008, 23:58 Uhr
addOnloadHook( bl2_create );
function bl2_create()
{
box = null;
try
{
box = document.getElementById("ca-watch").parentNode;
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;
}
catch(e)
{
}
}
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();
}