Closed raed667 closed 1 year ago
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 https://github.com/w3c/webextensions/issues/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.
That makes a whole lot of sense, thanks for the insight !
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.
Any feedback/critique on the idea is more than welcome !