wingman-jr-addon / wingman_jr

This is the official repository (https://github.com/wingman-jr-addon/wingman_jr) for the Wingman Jr. Firefox addon, which filters NSFW images in the browser fully client-side: https://addons.mozilla.org/en-US/firefox/addon/wingman-jr-filter/ Optional DNS-blocking using Cloudflare's 1.1.1.1 for families! Also, check out the blog!
https://wingman-jr.blogspot.com/
Other
35 stars 6 forks source link

Get Blocked Count for current page? #168

Open sensitivecereal opened 2 years ago

sensitivecereal commented 2 years ago

Hi,

is there anyway to access the current page's blocked count using JS? Thanks in advance.

wingman-jr-addon commented 2 years ago

Currently, no. Possible, I think so.

The way this addon works isn't naturally "page-based" as it just sees all the requests. However, the filtering request has this thing called documentUrl that could be used for this purpose. It's one of those things I've kicked around but have never done anything with - there's a stub over at #59 with this intent.

What is your intent here? Have the badge show only the blocked images for the given page rather than overall?

sensitivecereal commented 2 years ago

Yep, precisely that.

wingman-jr-addon commented 2 years ago

Hmm, one more followup question. Would you naturally expect that the blocked image count should be for that page specifically, or the domain as a whole during your current browsing session?