Auto Close YouTube Ads

Close and/or Mute YouTube ads automatically!

Antigo: v1.1.13 - 01/05/2016 - updated to handle newest change to waitForElems (.stop())
Novo: v1.1.14 - 13/08/2016 - fix changing of MUTE setting

  • --- /tmp/diffy20250502-1440804-cmgyhi 2025-05-02 23:12:20.997176419 +0000
  • +++ /tmp/diffy20250502-1440804-ao8d6 2025-05-02 23:12:20.998176429 +0000
  • @@ -1,7 +1,7 @@
  • // ==UserScript==
  • // @name Auto Close YouTube Ads
  • // @namespace http://fuzetsu.acypa.com
  • -// @version 1.1.13
  • +// @version 1.1.14
  • // @description Close and/or Mute YouTube ads automatically!
  • // @author fuzetsu
  • // @match https://*.youtube.com/*
  • @@ -67,11 +67,13 @@
  • var SCRIPT_NAME = 'Auto Close YouTube Ads';
  • var SEC_WAIT = parseInt(Util.storeGet('SEC_WAIT'));
  • -var MUTE_AD = Util.storeGet('MUTE_AD') || true;
  • +var MUTE_AD = Util.storeGet('MUTE_AD');
  • var MUTE_BUTTON_SELECTOR = '.ytp-mute-button';
  • var ticks = [];
  • var videoUrl;
  • +if(!MUTE_AD && MUTE_AD !== false) MUTE_AD = true;
  • +
  • if(!SEC_WAIT && SEC_WAIT !== 0) SEC_WAIT = 3;
  • function waitForAds() {