NanoAdblocker / NanoCore

An adblocker
GNU General Public License v3.0
458 stars 22 forks source link

Add a way to inject user stylesheet rules #243

Open jspenguin2017 opened 5 years ago

jspenguin2017 commented 5 years ago

I don't want to break the DOM Inspector, but user stylesheet is sometimes required.

See also: https://github.com/MajkiIT/polish-ads-filter/issues/12101

hawkeye116477 commented 5 years ago

Also GDPR can't be hidden on https://sportowefakty.wp.pl without userCSS, cuz it has inline style with overflow: hidden !important.

krystian3w commented 5 years ago

And wp.pl##+js(addEventListener-defuser.js, DOMContentLoaded, default.setTimeout) still block load more comments ("Pokaż więcej komentarzy (79)").

https://sportowefakty.wp.pl/skoki-narciarskie/806617/79-comments-are-hidden

jspenguin2017 commented 5 years ago

This issue is non-trivial. I recommend you to create an Userscript to remove the inline styles.

I'll add non-annoyance rules to Nano Defender for now.

hawkeye116477 commented 5 years ago

Ok, I was rather hoping to solve this problem in Nano Adblocker. Anyway currently we have another solution in our special extension, we just search for button with specific text and click on it :smile:.

jspenguin2017 commented 5 years ago

What I probably will do is to add a new compiler directive (!#nano-use-usercss?), which will force the next rule to become injected via UserCSS.

Things to consider: