0.98.8Accidentally busted playlisting in previous version. Working again. Changed array notation to faster oneE.g., usecolor : ["Enable colors", GM_getValue("usecolor", true), "Choose this option if you want to use colors at all."],to: usecolor : new Array("Enable colors", GM_getValue("usecolor", true), "Choose this option if you want to use colors at all."),Incorporated a "create" function to massively reduce codefunction create(A, B, C) {
A = document.createElement(A);
if(B) for(var b in B) {
var cur=B[b];
if(b.indexOf("on")==0)
A.addEventListener(b.substring(2), cur, false);
else if(b=="style")
for(var s in cur)
A.style[s] = cur[s];
else
A[b]=B[b];
}
if(C) for(var i=0; i<C.length; ++i) A.appendChild(C[i]);
return A;
}Added links to the option dialogoptionBox.appendChild(create("span",
{
id : "myLinks"
}, new Array(
document.createTextNode("Script links: "),
create("a", {
href : "http://userscripts.org/scripts/show/31864",
textContent : "homepage"
}),
document.createTextNode(" | "),
create("a", {
href : "http://userscripts.org/users/avindra",
textContent : "author"
}),
document.createTextNode(" | "),
create("a", {
href : "http://userscripts.org/scripts/discuss/31864",
textContent : "forums"
}),
document.createTextNode(" | "),
create("a", {
href : "#",
textContent : "check for update",
onclick : function(e) {
e.preventDefault();
update(true);
}
})
)
));
|