Skip to content
This repository has been archived by the owner on Jul 12, 2024. It is now read-only.

[PoC] Show basic stats #2

Closed
wants to merge 1 commit into from
Closed

[PoC] Show basic stats #2

wants to merge 1 commit into from

Conversation

raed667
Copy link

@raed667 raed667 commented Sep 1, 2022

This is just some toy code thrown together rapidly to test the concept

I managed to display some basic stats about resources blocked.

Pretty sure the implementation is missing a few things since the count from the engine doesn't strictly match what the declarative badge is showing.

image

Any feedback/critique on the idea is more than welcome !

@ameshkov
Copy link
Member

ameshkov commented Sep 1, 2022

Cool! The approach is pretty much what we were thinking about.

The only downside I am seeing is that there's the second tsurlfilter engine instance when we already have one up for cosmetic rules, we'll probably implement it as a part of tswebextension.

Also, when Chrome finally comes up with w3c/webextensions#170 we'll need to revamp the whole design once again. tsurlfilter will be moved to the offscreen document instance and kept alive all the time and we'll get another layer of messaging: content script/popup <-> service worker <-> offscreen document.

@raed667
Copy link
Author

raed667 commented Sep 1, 2022

That makes a whole lot of sense, thanks for the insight !

@raed667 raed667 closed this Sep 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants