CSS: meteoblue.com

Corrections to UI of meteoblue.com

< 脚本 CSS: meteoblue.com 的反馈

评价:好评 - 脚本运行良好

§
发布于:2022-03-01

Can you please add script to remove anti-adblock popin?
document.querySelector('body').classList.remove('unblock'); should do the trick.
Thanks anyway for your work

max44作者
§
发布于:2022-03-01

Thank you for suggestion. I'll do it, but maybe a day later - I'm far from my PC now.

§
发布于:2022-03-01

Thanks! No hurry

max44作者
§
发布于:2022-03-02

Well, I did this. It turned that remove('unblock') was not enough. I had to add more css to remove all the effects of adblock warning

§
发布于:2022-03-02

That's weird cause when you remove the class on the body, you shouldn't need to add CSS (why add CSS on a removed class?).
IMHO it occurs when your script run too quickly and the page don't have the unblock class set on the body yet.
Your code handle both case which is perfect :)
Thanks a lot!

max44作者
§
发布于:2022-03-03

> IMHO it occurs when...

Yes, you are right. Sometimes class removal worked, but sometimes not. I made a lot of experiments, but was not able to imagine how to handle it. So, finally I desided to relax and just added "redundant" code to cope with both cases :)

§
发布于:2022-03-03

The dirty workaround for this is to use a setTimeout function.
Not sure that to use document.addEventListener('DOMContentLoaded', myFunction); can help

发布留言

登录(不可用)以发布留言。

长期地址
遇到问题?请前往 GitHub 提 Issues。