AdguardTeam / AdGuardMV3

AdGuard browser extension prototype based on the new Manifest V3
https://adguard.com/
GNU General Public License v3.0
144 stars 13 forks source link

Lightweight user debugging view? #1

Closed raed667 closed 2 years ago

raed667 commented 2 years ago

Do you think it would be possible to display the number of blocked requests within the popup itself? Or is it limited to be shown next to the browser icon?

Would it also be possible to display the number of hidden items that are a result of content-scripts ? Or would that be too impactful on performance?

ameshkov commented 2 years ago

Generally, yes, I think this is possible as long as we use webRequest to keep track of what's blocked.

Would it also be possible to display the number of hidden items that are a result of content-scripts ? Or would that be too impactful on performance?

This will indeed be impactful. In the MV2 extension we only keep track of cosmetic rules when the "filtering log" window is open, i.e. when the debug interface is active. With MV3 we'll go the same route eventually.

raed667 commented 2 years ago

Thanks for the reply.

So webRequest would still get a callback even if a request was blocked declaratively?

ameshkov commented 2 years ago

Huh, actually, it seems that I was wrong in my initial assumption, in the current version of Chrome webRequest is not getting triggered specifically for requests that are blocked by declarativeNetRequest.

Hopefully, this is a bug. We'll report it to Chrome devs and see what they say.

ameshkov commented 2 years ago

Okay, forget it, I am not myself in the morning:) Everything works as it should, we'll be able to implement what I suggested in the first comment.

raed667 commented 2 years ago

Awesome ! Thanks for the response. Would you like me to close the issue or keep it open as a reference if you're planning to implement this?

ameshkov commented 2 years ago

Let's close it for now, we have it in our internal tracker anyways:)