1

I'm using this page that has a very annoying alert(its typical JavaScript alert, so any other hacks are welcome) that is displayed onLoad, can I stop it somehow with GM?

P.S. From what I understand GM is executed after the page has already loaded. Is there any way to click "ok" on the alert or override onLoad?

IAdapter
  • 62,595
  • 73
  • 179
  • 242
  • 1
    Could you provide a a link to the page? – Ryan Doherty Jan 10 '11 at 16:56
  • GM fires at `DOMContentLoaded` [which is before the `load` event](http://stackoverflow.com/questions/2414750/difference-between-domcontentloaded-and-load-events).   Exactly how you can deal with the alert depends precisely on the details of the page.   Provide a link and/or a sufficient code listing. – Brock Adams Jan 10 '11 at 20:55

1 Answers1

3

If the webpage is using the old fashioned method of detecting onLoad, you probably can just do:

unsafeWindow.onload = function() {};

If they are using a JavaScript library to listen for the onLoad or contentReady events I'm not sure how you could override those.

Ryan Doherty
  • 38,580
  • 4
  • 56
  • 63