Auto Close YouTube Ads

Close and/or Mute YouTube ads automatically!

Old: v1.1.4 - 2015-04-17 - changed script description
New: v1.1.5 - 2015-04-22 - adjusted video url regex to handle case where video parameter isn't the first one

  • --- /tmp/diffy20250429-307675-s063m2 2025-04-29 15:32:49.613368818 +0000
  • +++ /tmp/diffy20250429-307675-e1k5b4 2025-04-29 15:32:49.613368818 +0000
  • @@ -1,7 +1,7 @@
  • // ==UserScript==
  • // @name Auto Close YouTube Ads
  • // @namespace http://fuzetsu.acypa.com
  • -// @version 1.1.4
  • +// @version 1.1.5
  • // @description Closes YouTube ads automatically after a short pause
  • // @author fuzetsu
  • // @match https://*.youtube.com/*
  • @@ -124,7 +124,7 @@
  • if(window.self === window.top) {
  • - waitForUrl(/^https:\/\/www\.youtube\.com\/watch\?v=.+/, function() {
  • + waitForUrl(/^https:\/\/www\.youtube\.com\/watch\?.*v=.+/, function() {
  • if(videoUrl && location.href !== videoUrl) {
  • Util.log('Changed video, removing old wait');
  • Util.clearTicks(ticks);