[Greasemonkey] Changing Body Background and Cursor
Adnan Siddiqi
volatil3_ at hotmail.com
Sun Jan 14 11:13:26 PST 2007
Hello
I am newbie in GM and I am working on a script . I have made two functions,
one is called on load event which generates div with a link, the other
function which changes the background and cursor shape of body.
I am calling following function on Clickevent.
var placeMark=function(){
var enclosedDIv="<div id=\"bbody\" style=\"cursor:help\">
"+bodyTag.innerHTML + "</div>";
//bodyTag.style="background:red";
bodyTag.innerHTML =enclosedDIv;
window.document.getElementById("bbody").style.backgroundColor="green";
window.document.style.backgroundColor="green";
}
it does make body background green and then goes away. I checked generated
HTML source but it doesn't newly added Div with id "bbody". How do I solve
it?
Thanks
-adnan
_________________________________________________________________
Dave vs. Carl: The Insignificant Championship Series. Who will win?
http://clk.atdmt.com/MSN/go/msnnkwsp0070000001msn/direct/01/?href=http://davevscarl.spaces.live.com/?icid=T001MSN38C07001
More information about the Greasemonkey
mailing list