Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding support for ABP CSS injections #224

Closed
monzta opened this issue Nov 12, 2024 · 17 comments
Closed

Adding support for ABP CSS injections #224

monzta opened this issue Nov 12, 2024 · 17 comments

Comments

@monzta
Copy link

monzta commented Nov 12, 2024

euronews.com###o-site-hr__leaderboard-wallpaper.u-show-for-xlarge {remove:true;} added in easylist/easylist@99c717f stated to throw errors: https://github.com/easylist/easylist/actions/runs/11801052352/job/32873439085

Seems it doesn't know ABP syntax of {remove:true;}.

@ameshkov
Copy link
Member

Uh, can ABP consider using a different marker for these rules?

Here's the version compatible with AdGuard and uBO:
euronews.com#$##o-site-hr__leaderboard-wallpaper.u-show-for-xlarge {remove:true;}

@monzta
Copy link
Author

monzta commented Nov 12, 2024

Oh, #$# is already reserved for snippet filters. :/

@ameshkov
Copy link
Member

Meh :(

I don't see it documented yet:
https://help.adblockplus.org/hc/en-us/articles/360062733293-How-to-write-filters

Is there any place where this syntax is described? If using #$# is not possible, we'll need to add conversion code to support it on AdGuard side.

@scripthunter7 could you please check this out and create tasks for this syntax support in tsurlfilter and CoreLibs?

@scripthunter7
Copy link
Member

You can disable AGLint for that line temporarily: https://github.com/AdguardTeam/AGLint?tab=readme-ov-file#ignore-single-adblock-rule

@monzta
Copy link
Author

monzta commented Nov 12, 2024

Oh yeah, it's only mentioned here and it links to the page I linked.

@scripthunter7 Great, thanks!

@ameshkov
Copy link
Member

ameshkov commented Nov 12, 2024

@monzta no I meant the {remove:true} syntax, can't find it anywhere in the docs

@monzta
Copy link
Author

monzta commented Nov 12, 2024

@ameshkov oh, of course 🤦🏻‍♂️ This hasn't been added there yet. I'll take care of it.

@scripthunter7
Copy link
Member

@ameshkov Opened issues in tsurlfilter and CL

@monzta
Copy link
Author

monzta commented Nov 13, 2024

fyi #?# filters like example.org#?#div:-abp-has(> div:-abp-properties(width: 44px)) {remove: true;} also work

@scripthunter7
Copy link
Member

@monzta thank you, added to issues

@ameshkov
Copy link
Member

@monzta it seems that it's not just remove: true?
https://www.abptestpages.org/en/abp-testcase-subscription.txt

I see this as well:

abptestpages.org##.testcase-inline-css-ehe {background-color: #c70d2c;}
abptestpages.org#@#.testcase-inline-css-ehe

@monzta
Copy link
Author

monzta commented Nov 14, 2024

@ameshkov You are right. Note that these currently only work for privileged filter lists in ABP.

@Yuki2718
Copy link

Yuki2718 commented Nov 16, 2024

@Yuki2718
Copy link

Yuki2718 commented Nov 16, 2024

You are right. Note that these currently only work for privileged filter lists in ABP.

Does that mean EL is now privileged? I thought only ABP filter is privileged in ABP.

@monzta
Copy link
Author

monzta commented Nov 17, 2024

No, ABP Filters only for CSS inline styles. remove works in any list.

@scripthunter7
Copy link
Member

@monzta If you don't mind, I think this issue could be renamed to something like "Adding support for ABP CSS injections" as I understand it includes both CSS injection and remove

@monzta monzta changed the title AGLint doesn't recognize ABP {remove:true;} syntax Adding support for ABP CSS injections Dec 9, 2024
@monzta
Copy link
Author

monzta commented Dec 9, 2024

@scripthunter7 Sure, done.

adguard pushed a commit that referenced this issue Dec 19, 2024
Squashed commit of the following:

commit 69f7783
Author: jellizaveta <[email protected]>
Date:   Thu Dec 19 18:57:46 2024 +0300

    remove redundant comment

commit b955c44
Author: jellizaveta <[email protected]>
Date:   Thu Dec 19 18:56:49 2024 +0300

    update changelog, add test

commit 688f78c
Author: jellizaveta <[email protected]>
Date:   Thu Dec 19 18:51:48 2024 +0300

    bamp agtree to 2.3.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants