I was fixing up an extension that was written for Firefox 2 to work with Firefox 3. One of the changes was to use:
window.getBrowser().addEventListener("load", checkURL, true);
instead of going through just window.
The only problem is that the "load" event seems to occur more than once per page load. I have also tried listening for "DOMContentLoaded" but with similar results.
Is there a way to make sure to execute the script only once per page load? If it matters, the pages I am loading are forum pages from forums.somethingawful.com .