Prerequisites
Description
From AdGuard's KB Allowed Pre-Processor Directive List they use additional AdGuard product specific directives in special cases that uBO doesn't recognize.
I'd like to use the adguard_app_ios directive to conditionally load a sublist in Web Annoyances Ultralist only in the iOS AdGuard environment (Due to iOS not allowing CSS modifications and needing to remove some companion filters that make the page incorrect render when the CSS rules don't get loaded) but uBO doesn't recognize the adguard_app_ios directive and then loads the sublist wrapped in directive not recognized that I only want to conditionally load when it is iOS AdGuard envionment.
The same behavior is observed if when only loading the sublist directly - The filters wrapped in the unrecognized directive gets loaded because uBO just ignores the directive rather than recognize the directive as false and treat everything until the closing !#endif as not to be loaded.
-
If uBO encounters a directive it doesn't understand does it make more sense to throw out all content between the invalid directive and the closing !#endif?
-
Is it possible to add additional directives that uBO will recognize to mirror AdGuard used directives? I can elaborate more on what issue this specific sublist fixes (screenshots, video) if you'd like.
adguard_app_mac -- AG for Mac
adguard_app_android -- AG for Android
adguard_app_ios -- AG for iOS
adguard_ext_safari -- AG browser extension for Safari
adguard_ext_android_cb -- AG content blocker for Samsung/Yandex
Related:
yourduskquibbles/webannoyances#241
A specific URL where the issue occurs
N/A
Steps to Reproduce
- Add custom list
https://raw.githubusercontent.com/yourduskquibbles/webannoyances/master/ultralist.txt
- Observe Logger is loading sublist
filters/adguard_app_ios_exclusion_filters.txt wrapped in invalid directive adguard_app_ios
- Unsubscribe from custom list
https://raw.githubusercontent.com/yourduskquibbles/webannoyances/master/ultralist.txt
- Add custom list
https://raw.githubusercontent.com/yourduskquibbles/webannoyances/master/filters/adguard_app_ios_exclusion_filters.txt
- Observe logger loads the custom filters wrapped in invalid directive
adguard_app_ios
Expected behavior:
uBO ignores everything inside of invalid !#if directive until closing !#endif
Actual behavior:
uBO ignores only the 1 line of the invalid directive and proceeds to load content within the invalid !#if statement
Your environment
- uBlock Origin version: 1.29.1b0
- Browser Name and version: Firefox Nightly
- Operating System and version:
Prerequisites
Description
From AdGuard's KB Allowed Pre-Processor Directive List they use additional AdGuard product specific directives in special cases that uBO doesn't recognize.
I'd like to use the
adguard_app_iosdirective to conditionally load a sublist in Web Annoyances Ultralist only in the iOS AdGuard environment (Due to iOS not allowing CSS modifications and needing to remove some companion filters that make the page incorrect render when the CSS rules don't get loaded) but uBO doesn't recognize theadguard_app_iosdirective and then loads the sublist wrapped in directive not recognized that I only want to conditionally load when it is iOS AdGuard envionment.The same behavior is observed if when only loading the sublist directly - The filters wrapped in the unrecognized directive gets loaded because uBO just ignores the directive rather than recognize the directive as false and treat everything until the closing
!#endifas not to be loaded.If uBO encounters a directive it doesn't understand does it make more sense to throw out all content between the invalid directive and the closing
!#endif?Is it possible to add additional directives that uBO will recognize to mirror AdGuard used directives? I can elaborate more on what issue this specific sublist fixes (screenshots, video) if you'd like.
adguard_app_mac-- AG for Macadguard_app_android-- AG for Androidadguard_app_ios-- AG for iOSadguard_ext_safari-- AG browser extension for Safariadguard_ext_android_cb-- AG content blocker for Samsung/YandexRelated:
yourduskquibbles/webannoyances#241
A specific URL where the issue occurs
N/A
Steps to Reproduce
https://raw.githubusercontent.com/yourduskquibbles/webannoyances/master/ultralist.txtfilters/adguard_app_ios_exclusion_filters.txtwrapped in invalid directiveadguard_app_ioshttps://raw.githubusercontent.com/yourduskquibbles/webannoyances/master/ultralist.txthttps://raw.githubusercontent.com/yourduskquibbles/webannoyances/master/filters/adguard_app_ios_exclusion_filters.txtadguard_app_iosExpected behavior:
uBO ignores everything inside of invalid
!#ifdirective until closing!#endifActual behavior:
uBO ignores only the 1 line of the invalid directive and proceeds to load content within the invalid
!#ifstatementYour environment