Using Greasemonkey to prevent script loading

With Greasemonkey, I want to block the loading of images and scripts.

I learned from an existing post that you can use the start-start directive to jump to a script before executing scripts.

Is it possible to use window.addEventListener for a specific event that allows me to find the src = xxx.js and xxx.jpg and remove these src= tags before downloading or block the download?

Note. Here is a list of events that Mozilla supports .

EDIT: I would like to replace blocked downloads with my own scripts or images.

+4
source share

Source: https://habr.com/ru/post/1442570/


All Articles