Open Bug 1331486 Opened 8 years ago Updated 2 years ago

Ability to add and remove URLs from tracking protection

Categories

(WebExtensions :: Request Handling, defect, P5)

defect

Tracking

(firefox53 affected)

Tracking Status
firefox53 --- affected

People

(Reporter: andy+bugzilla, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: triaged)

It would be great if a WebExtension could add more URLs to tracking protection. It could also remove them, but only if they were added by the WebExtension themselves. I think this would be great for our ad blocking and privacy add-ons. Just "adding a URL to tracking protection" is a naively simple statement, so I'll let Francois expand on that, maybe point to an API we could use... or have to build one.
Flags: needinfo?(francois)
See Also: → 1330109
Priority: -- → P5
Whiteboard: triaged
(In reply to Andy McKay [:andym] from comment #0) > Just "adding a URL to tracking protection" is a naively simple statement, so > I'll let Francois expand on that, maybe point to an API we could use... or > have to build one. We don't have an easy way to inject URLs into the URL Classifier, so we'd have to build a new API for it. Christoph and I prototyped that in this patchset and add-on: https://bitbucket.org/fmarier/mozilla-central-mq-content-blocking/src https://github.com/fmarier/urlclassifier-webextension
Flags: needinfo?(francois)
Luke, you did some work on this with your Tracking Protection add-on, would this have helped? What kind of API would you have liked?
Flags: needinfo?(lcrouch)
Hmm ... I only did origins - not full URLs. I just used browser.storage.local.set({allowedHosts: }); If I were to extrapolate a more general-purpose private-browsing list, it might start with a new browser.privacy.services.privateBrowsingAllowedHosts object? browser.privacy.services.privateBrowsingAllowedHosts (returns array or object) browser.privacy.services.privateBrowsingAllowedHosts.add(host); browser.privacy.services.privateBrowsingAllowedHosts.remove(host); ?
Flags: needinfo?(lcrouch)
See Also: → 1345158
Product: Toolkit → WebExtensions
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.