AdguardTeam / AdguardAssistant

Adguard Assistant userscript
GNU General Public License v3.0
148 stars 19 forks source link

Rule `@@||example.org^$important,document,app=firefox.exe` doesn't display as whitelisted #361

Closed contribucious closed 2 years ago

contribucious commented 2 years ago

Hello,  

Maybe this is simply due to a technical limitation, but in my opinion these two whitelisting rules below should produce the same result (i.e. AdGuard Browser Assistant icon displayed in gray and text "Protection is disabled" / "Disabled on this website" displayed in the extension). Currently, only the first rule does this.

:warning: This is only aesthetic and informational because the whitelisting takes place in fact (in AdGuard).    

Rule n°1 used

@@||example.org^$important,document

  Rule1 Correct result produced.    

Rule n°2 used instead

@@||example.org^$important,document,app=firefox.exe

  Rule2 Correct result not produced. Should be like the previous screenshot.      

:information_source: AdGuard Browser Assistant version: 1.1.16 (used on Firefox 93.0) :information_source: AdGuard version: 7.7 :information_source: OS information: Windows 10 (21H1) :bulb: Other information ⊳ Location of the tested rules: "User rules" filter in AdGuard

:memo: Note: Same problem with other browsers too, at least with Microsoft Edge (using app=msedge.exe) — 1.1.11 is currently the latest version for this browser.

   

Thanks in advance. :thumbsup:

contribucious commented 2 years ago

Basically, I think the problem should be broken down into two parts:

 

View content …   ## The _informational_ part Corresponds to the color of the shield icon (green or gray) as well as to the following texts: "Protection is enabled / disabled" and "Enabled / Disabled on this website". :arrow_right: This part must **always** correspond to reality. _Use of complex rules by the user or not._   ## The _action_ part This part is about the toggle button and can be more problematic to manage. A standard whitelisting rule can continue to be deleted via this toggle button as currently, but a more complex user rule such as: - `@@||example.org^$important,document,app=firefox.exe` - `@@||example.*^$important,document` … will need to be managed smarter. > :memo: Note that this second example is currently handled in a surprising way. Try it out for yourself.   #### This can include: - **(case of the first example)** "duplicating the rule + adding `,badfilter`" (the on/off button will therefore create/delete that rule instead, preserving the potentially complex rule the user had manually created); - **(case of the second example)** adding an additional rule with a narrower spectrum, removing whitelisting for the current specific domain only, insofar as this is technically possible; **(*)** - … ###### (*) Not sure if this is possible as it stands though, as even the standalone [AdGuard Browser extension](https://adguard.com/en/adguard-browser-extension/overview.html) has currently opted for a complete removal of the user rule despite the wildcard in it — which can be unwanted, so at least the solution of a warning to the user would then be advised (i.e. situation considered not easily manageable, so see below).   :arrow_right_hook: And if the situation is not easily manageable, simply put the toggle button either in a deactivated state or better, in a special/intermediate state (neither green positioned on the right, nor gray positioned on the left, but orange positioned in the middle). Put a tooltip on it with a short sentence explaining the thing on mouseover and a click action displaying a div in the extension (about 80-90% the size of the extension) with either a drop-down list or better, a multiple vertical choice of detailed actions (including "Nothing." as default choice and/or a Cancel button). This will list to the user the problematic rule(s) concerned and the consequences of removing or deactivating a rule with a wider spectrum (multi-domain) for example, etc.     ___ #### Thoughts on this? :thought_balloon: ###### As rather technical, cc @ameshkov.
contribucious commented 2 years ago

:arrow_right: Sorry, wrong repo. Should have been published there: https://github.com/AdguardTeam/BrowserAssistant/issues

Please transfer this issue accordingly. Thanks. :thumbsup:  


EDIT: It seems that when an issue is moved by you via ZenHub, all our posts are condensed into one (which we no longer seem able to edit because posted by the person from the AdGuard team, example here — moved from here).

I will therefore manually recreate all of this in the appropriate repository myself. Please reapply the appropriate labels and assignees accordingly (on this one and on that one over there). Thank you for your understanding. And sorry again for the mistake.