CoreLibs icon indicating copy to clipboard operation
CoreLibs copied to clipboard

Add ext_ubol for !#if condition

Open Yuki2718 opened this issue 9 months ago • 3 comments

Issue Details

Please add the directive which only applies to uBOL and not uBO. I did https://github.com/AdguardTeam/AdguardFilters/commit/6b6e84cf3792f34d165eab258681db732231919e and https://github.com/uBlockOrigin/uAssets/commit/4d44dbede108488b40bf1c41a150793b7650518b, but think the rules may be a bit risky if used outside Japan. Supporting the directive allows us to keep them in the Japanese filters.

Proposed solution

Described

Alternative solution

~~env_mv3 for AdGuard MV3 extension and uBOL will also work. There may be a situation this is more convenient, so consider supporting this too.~~

Yuki2718 avatar Mar 14 '25 15:03 Yuki2718

Maybe the directive should be used alone and reserved as is in uBO version of filters so uBO/uBOL will just interpret it (as already supported). So AG can interpret it just like ext_ublock in practice except that it should not be removed in Filters Compiler.

Yuki2718 avatar Mar 14 '25 16:03 Yuki2718

@Yuki2718 This is not applicable to CoreLibs products since they does not define ext_ variables.

sfionov avatar Mar 14 '25 16:03 sfionov

Sorry, please move to any appropritate place. But now I think, maybe this is not an issue if Filters Compiler leaves !#if ext_ubol ~ !#endif inside !#if ext_ublock ~ !#endif as a mere comment.

Yuki2718 avatar Mar 15 '25 06:03 Yuki2718

@Yuki2718 Sorry I don't know what appropriate place for this task because I don't understand what is it about.

Like adguard extension has ext_ublock is precompiler directives, and you want to add another? Or is it related to FiltersCompiler?

sfionov avatar Jun 02 '25 09:06 sfionov

Yeah, I mixed up two issues. The one is I simply want another directive of ext_ubol, but then I wonder how AdGuard filters for uBO will handle the directive, and this is the another issue.

Yuki2718 avatar Jun 03 '25 04:06 Yuki2718

@Yuki2718 Please also write here It seems it must be handle

Alex-302 avatar Jun 20 '25 12:06 Alex-302

AdGuard supports matching both known and unknown directives. Apps only define adguard, adguard_app_windows (or mac/android), and cap_html_filtering.

I'm closing this issue since there is nothing to do from CoreLibs side

sfionov avatar Jun 20 '25 12:06 sfionov

All right, will open an issue in FiltersCompiler.

Yuki2718 avatar Jun 21 '25 05:06 Yuki2718