简体   繁体   中英

is there a way to pause (and later unpause) all running js scripts on a 3rd party site using greasemonkey?

tl;dr -- is this possible to pause or stop all running js on the page, using greasemonkey?

here is the situation: i hate how, when watching videos on fb, they stutter. i am 99% sure the stutter is caused by the excessive amounts of js running in the background (providing all the realtime page updates)

here is what i want to do: create some code that will pause all js execution (i will attach it to a button or possibly autodetect when a video is playing) -- and then later resume execution (after video is done)(this part is not essential, i can always reload the page)

Now i know i can use an addon like noscript to pause-unpause but it would be nice if i could have something automagic (and alot more slimline)

No, there is no easy general-purpose Greasemonkey solution to stop or block the execution of a web page's scripts. Greasemonkey can add, but not remove, javascript. Opera's way beefier User Javascript system can do both.

/ Greasemonkey co-maintainer

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM