uBlockOrigin / uBOL-home

uBO Lite home (MV3)
GNU General Public License v3.0
1.15k stars 46 forks source link

Feature: Admin policy option to enable optimal mode by default #113

Closed lawndoc closed 8 months ago

lawndoc commented 9 months ago

Some websites such as MakeUseOf create non-bypassable popups when you have uBOL with Basic mode installed. Increasing the mode to Optimal will actually get rid of the warning and allow you through to the site without disabling ad blocking. For this reason, Optimal mode is a much better user experience when mass deploying to users in an enterprise setting.

Unless I'm missing something, it doesn't appear to be possible for admins to set the default filtering mode in uBOL when deploying. I'd like to request this feature to be added to the extension.

gorhill commented 9 months ago

Optimal or Complete require a user gesture so that the browser asks the user whether they want to grant the extra permissions, because of this I didn't add the ability to have these as default mode. But if you have documentation that these permissions can be preset by admins such that the extension requesting those permissions won't result in a alert box by the browser, I can add them as choices.

lawndoc commented 9 months ago

Ah I forgot about that part. I'll do some research to see if this is possible.

lawndoc commented 9 months ago

I did a procmon trace while changing the Site Access setting, and it looks like Edge is writing to HKCU\Software\Microsoft\Edge\PreferenceMACs\Default\extensions.settings\ddkjiahejlhfcafbddmgiahcphecmpfh, but the REG_SZ value is just a hash. So it appears that the setting is probably getting stored in a LevelDB somewhere.

It's probably not feasible if we have to patch a particular ldb entry on every host we want to push this to. At least it feels a little sinful at this point.

There was a bunch of other stuff happening with edge in the PML file, but I'm not familiar enough with Chromium to know if something else should have stood out. I'd be happy to share the PML with you via email if you wanted to take a look yourself in case I missed something.

lawndoc commented 8 months ago

It looks like it's not going to be possible to remove the permission grant prompt without an update to the manifest. Thanks for entertaining the idea, but it appears to be incompatible with the goal of not granting those permissions by default.

gorhill commented 4 months ago

Related webextensions issue: https://github.com/w3c/webextensions/issues/260

gorhill commented 1 week ago

I opened an issue in Chrome isse tracker: https://issues.chromium.org/issues/374073122