[Greasemonkey] Adding an entry to a menu
M-E D
artsucks at gmail.com
Wed Feb 22 14:07:56 EST 2006
On 2/22/06, Vectorspace <vectorspace at ntlworld.com> wrote:
> Here's how I'd do it:
>
> newItem=document.createElement("a");
> newItem.setAttribute("href","new entry link");
> newItem.setAttribute("style","border-bottom: 1px solid #6A9CCA;");
> newItem.innerHTML="new entry name";
> document.getElementById("sections").appendChild(newItem);
>
> (Replace "new entry link" with the link for the new entry, and replace
> "new entry name" with the name of the new entry.)
Thanks a lot, this is exactly what I needed.
Have a nice day...
Marc
More information about the Greasemonkey
mailing list