[Greasemonkey] Greasemonkey 0.4.1 (The Next Generation)

Hammond, Tony T.Hammond at nature.com
Wed Jul 27 12:03:25 EDT 2005

Hi All:

Simple question (simple person) but how can I get a single GM script to act
with two different behaviours on two separate pages? What I'm currently
doing is modifying the results page on a search, and building some HTML
which gets added into the page, as

main = document.getElementById("content");

function add_smart_link(link, title) {

  var smart_link = document.createElement("div");
  smart_link.innerHTML = '...';

  if (main) {
    main.parentNode.insertBefore(smart_link, main);

What I also want to do is to add a button onto the _previous_ page which
dispatches the search through a simple form.

Any help much appreciated.



Tony Hammond

New Technology, Nature Publishing Group
4 Crinan Street, London N1 9XW, UK 

mailto:t.hammond at nature.com


DISCLAIMER: This e-mail is confidential and should not be used by anyone who is
not the original intended recipient. If you have received this e-mail in error
please inform the sender and delete it from your mailbox or any other storage
mechanism. Neither Macmillan Publishers Limited nor any of its agents accept
liability for any statements made which are clearly the sender's own and not
expressly made on behalf of Macmillan Publishers Limited or one of its agents.
Please note that neither Macmillan Publishers Limited nor any of its agents
accept any responsibility for viruses that may be contained in this e-mail or
its attachments and it is your responsibility to scan the e-mail and 
attachments (if any). No contracts may be concluded on behalf of Macmillan 
Publishers Limited or its agents by means of e-mail communication. Macmillan 
Publishers Limited Registered in England and Wales with registered number 785998 
Registered Office Brunel Road, Houndmills, Basingstoke RG21 6XS   

More information about the Greasemonkey mailing list