YouTube Anti-AdBlock Bypass via YouTube Enhancer

A simple method of bypassing YouTube's AdBlock Detection using YouTube Enhancer's "Remove Ads" button. Does not require the use of any external website like similar tools do :)

当前为 2023-10-21 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name YouTube Anti-AdBlock Bypass via YouTube Enhancer
  3. // @namespace https://e-z.bio/yaw
  4. // @version 1.1
  5. // @description A simple method of bypassing YouTube's AdBlock Detection using YouTube Enhancer's "Remove Ads" button. Does not require the use of any external website like similar tools do :)
  6. // @author Yaw
  7. // @match https://www.youtube.com/*
  8. // @run-at document-start
  9. // @license MIT
  10. // @grant none
  11. // ==/UserScript==
  12.  
  13. (function() {
  14. 'use strict';
  15.  
  16. var searchInterval = 800
  17.  
  18. function checkForButton() {
  19. const currentURL = window.location.href;
  20.  
  21. // match pattern url - credits: Zion
  22. if (/https:\/\/www\.youtube\.com\/watch\?.*/.test(currentURL)) {
  23. const button = document.getElementById("efyt-not-interested");
  24.  
  25. if (button) {
  26. button.click();
  27. } else {
  28. console.log("[Bypass] Failed to find button. Retrying in ", searchInterval, " ms")
  29. }
  30. }
  31. }
  32.  
  33. setInterval(checkForButton, searchInterval);
  34. })();