<div dir="ltr">[Sent here via: <a href="https://github.com/mdn/webextensions-examples/issues/271">https://github.com/mdn/webextensions-examples/issues/271</a>]<br><br><p>There is a page on the Mozilla wiki about <a href="https://developer.mozilla.org/en-US/Add-ons/Overlay_Extensions/XUL_School/Intercepting_Page_Loads">Intercepting Page Loads</a> - unfortunately, this is of course now outdated, but I have no idea how to port these concepts.</p>
<p>The problem is that <code>webRequest</code> 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.</p>
<p>Is there a way to intercept a deliberately loaded page before it loads, without having to inspect in-transit HTTP requests?</p><p>For context, this is for a new ad-blocking project: <a href="https://github.com/Miserlou/Poop">https://github.com/Miserlou/Poop</a> - 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.</p><p>Thanks very much!</p><p>R<br></p><p><br></p><p>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!<br></p></div>