开发者

How to override onLoad?

开发者 https://www.devze.com 2023-02-03 23:38 出处:网络
I\'m using this page that has a very annoying alert(its typical JavaScript alert, 开发者_C百科so any other hacks are welcome) that is displayed onLoad, can I stop it somehow with GM?

I'm using this page that has a very annoying alert(its typical JavaScript alert, 开发者_C百科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?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消