• Status: Open
  • Priority: Low
  • Security: Public
  • Views: 34
  • Last Modified:

Intercept websites JavaScript with Chrome extension?

How to intercept websites JavaScript in Chrome... basically I want to prevent JavaScript links that open in a new window on all or specific websites. Because usually these types of links are spam.

There are extensions for Chrome which allow you to inject JavaScript (like "Custom JavaScript for websites"), but is it possible?
bbaoIT ConsultantCommented:
what's your ultimate goal of the question?

to block spam links on pages shown by Chrome? if this is your goal, you really no need to do the same thing in a complicated way. just install an extension like NoScript to stop JavaScript of specific sites, AdBlock to stop ads from known sources.
intoxicated_curveballAuthor Commented:
The ultimate goal is as I said "prevent JavaScript links that open in a new window on all or specific websites".

Disabling JavaScript is not a solution because it makes most  websites no longer function effectively. It is needed to intercept any function or event listener that wants to open links in new windows and block them... some how.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now