FlandreDaisuki / Patchouli

An image searching and browsing tool on pixiv
MIT License
80 stars 6 forks source link

Fix third party addons that perform iframe injection #43

Closed alexwh closed 5 years ago

alexwh commented 5 years ago

Changes introduced in commit https://github.com/FlandreDaisuki/Patchouli/commit/cefadf484679fcf233523087ecef0cf8b65c4e05 breaks 3rd party addons by hiding all iframe elements. e.g. yomichan, and potentially other userscripts.

This PR removes the overzealous CSS rule.

FlandreDaisuki commented 5 years ago

I think you can use Stylus[chrome][firefox] or xStyle[chrome][firefox] rather than reveal all iframes that usually for ad purpose.

alexwh commented 5 years ago

Not with the !important property, afaik. To be honest, this userscript shouldn't really be doing any of the ad hiding anyway, instead leave that job to adblocking extensions. At the very least, rather than flat out nuking every iframe on the page, find some valid identifiers that the site uses and block those instead in your selector.

FlandreDaisuki commented 5 years ago

OK, you are right. I'll fix it. Thanks for the feedback.

alexwh commented 5 years ago

No problem, thanks for merging.

FlandreDaisuki commented 5 years ago

@alexwh I push the fixed version in dist/ that not only pixiv.override.css but also lib/pixiv.js need to delete the iframe.