Strict Mode

Is there a way to create an extension that would use JS or JQuery to search HTML/CSS and detect URLS, compare those URLs with the domain you’re currently on. If they do not match, replace with loopback. Doing all of this before DOM is written (so the sites aren’t visited).

What about using the WebRequest API? You can listen for onBeforeRequest to look at the details of a request about to be made, check if the resource’s domain is the same as the site’s, and block it if not.

Lightbeam uses this to identify and visualize third party requests.

1 Like