Auto Close YouTube Ads

Close and/or Mute YouTube ads automatically!

< 脚本Auto Close YouTube Ads的反馈

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

§
发表于:2018-02-23
编辑于:2018-02-23

[pull request]: console error messages

Hi, I was seeing a console error message, which was kind of annoying as i was also watching that console for other messages...

So i changed the function waitAndClick on line 190, adding a conditional:

    waitAndClick('a.close-button', function(btn) {
        if(Util.q('div.recall-button')){
            Util.q('div.recall-button').remove();
        }
    })

Can you commit back into Master? or How do i make a pull request?

Error message:

userscript.html?id=fb325494-3fb0-4181-9762-f2ce3259db8f:191 Uncaught TypeError: Cannot read property 'remove' of null
    at eval (chrome-extension://dhdgffkkebhmkfjojejmpbldmpobfkfo/userscript.html?id=fb325494-3fb0-4181-9762-f2ce3259db8f:191:40)
    at Window.eval (chrome-extension://dhdgffkkebhmkfjojejmpbldmpobfkfo/userscript.html?id=fb325494-3fb0-4181-9762-f2ce3259db8f:233:9)
    at <anonymous>:2:120
    at T.e.string.f.function.c.(anonymous function) (eval at exec_fn (:1:108), <anonymous>:51:390)

发表回复

登录(不可用)以发表回复。

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址