Auto Close YouTube Ads

Close and/or Mute YouTube ads automatically!

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

  • --- /tmp/diffy20250502-1320266-6tmo0p 2025-05-02 04:09:58.593393759 +0000
  • +++ /tmp/diffy20250502-1320266-wzckhh 2025-05-02 04:09:58.593393759 +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() {