I made a chrome extension for this purpose called Js-Injector . It is available from github at https://github.com/shahverdy/JS-Injector . Unfortunately, I cannot deploy it to the Chrome Web Store due to U.S. sanctions in my country. There are several examples of extensions for this purpose that you can easily work with.
In Js-Injector, you can add the following code for your site:
$(function(){ $("a[href='ad.com']").remove(); })
EDIT . There are other extensions, such as Tampermonkey. But there are some important issues to consider when choosing the right extension:
- Js-Injector is really easy to use.
- Js-Injector has an import / export feature available for your scripts.
- There are some predefined examples, so you can choose to use them without writing any codes.
- Js-Injector is really bright.
- Js-Injector runs scripts for each website in its own area, so it does not consume as much RAM / CPU
Mostafa shahverdy
source share