How to port "Intercepting Page Loads"

Rich Jones miserlou at gmail.com
Thu Aug 24 16:24:58 UTC 2017


[Sent here via: https://github.com/mdn/webextensions-examples/issues/271]

There is a page on the Mozilla wiki about Intercepting Page Loads
<https://developer.mozilla.org/en-US/Add-ons/Overlay_Extensions/XUL_School/Intercepting_Page_Loads>
- unfortunately, this is of course now outdated, but I have no idea how to
port these concepts.

The problem is that webRequest does not differential between items loaded
on a page and the load of a deliberately-visited page itself. I've read
through all of the events in the examples repo/docs and I don't see anyway
to differentiate between page loads and contents on a page.

Is there a way to intercept a deliberately loaded page before it loads,
without having to inspect in-transit HTTP requests?

For context, this is for a new ad-blocking project:
https://github.com/Miserlou/Poop - the issue is that I'd like to
selectively disable the plugin via visiting urls with a `#showpoop` anchor,
so I need this feature to be able to dynamically disable my filtering.

Thanks very much!

R


PS - It's 2017, and Mozilla is a security-minded company - can you PLEASE
switch to mailing list software/configuration which doesn't a) store my
password in plaintext and b) friggin' email it back to me in plaintext for
no reason! What the heck guys!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/dev-addons/attachments/20170824/817df8a7/attachment.html>


More information about the Dev-addons mailing list