AdguardBrowserExtension icon indicating copy to clipboard operation
AdguardBrowserExtension copied to clipboard

Compatibility with uBlock Origin's "!#if env_mobile" syntax

Open MasterKia opened this issue 3 years ago • 11 comments

Related issue: https://github.com/AdguardTeam/AdguardBrowserExtension/issues/1971

I remember @ameshkov saying that "AdGuard is aiming to have full compatibility with uBO's extended syntax to make life easier for filterlist maintainers", but it turns out that's not the case.

As described here, uBO supports !#if env_mobile condition but AdGuard ignores anything in between the !#if env_mobile block. For now I just got rid of the "env_mobile" but it might become problematic in future.

Reproduced in Firefox Mobile using AdGuard add-on 4.0.204.

cc @DandelionSprout @maximtop

MasterKia avatar Jul 27 '22 18:07 MasterKia

Hi, Ok, we will take a look.

maximtop avatar Jul 28 '22 08:07 maximtop

Maybe dropped due no exist folder "extension/mobile/firefox" on adtidy.

krystian3w avatar Jul 28 '22 12:07 krystian3w

For now I've resorted to using !#if (adguard_app_android || adguard_app_ios) which is inaccurate since it can't target mobile Firefox users who use the AdGuard add-on.

MasterKia avatar Jan 03 '23 06:01 MasterKia

Yandex Mobile and Kiwi Mobile may also support install crx MV2/MV3 extension.

Along the way, something ungoogled-Chromium also tried to make computer extensions work, but they rather withdrew support (even as someone made a long manual on how to install and update).

Still supposedly some other browser with some CRX support came to Google Play.

krystian3w avatar Jan 03 '23 08:01 krystian3w

Note, that we'll also need this in CoreLibs.

ameshkov avatar Mar 14 '23 13:03 ameshkov

I am curious uBo !#if env_firefox works properly when using Windows/macOS/Android apps (assuming that any interference will skuct that the corruption is reproducible in Chromium and Safari)?

krystian3w avatar Mar 14 '23 13:03 krystian3w

It's ignored, pre-processor directives are applied when the rules are downloaded, and not in runtime when AG does content filtering.

ameshkov avatar Mar 14 '23 13:03 ameshkov