Universal AdBlock Bypass (Beta)

Attempts to bypass ad-blocker detection on all websites

当前为 2025-04-29 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Universal AdBlock Bypass (Beta)
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.0
  5. // @description Attempts to bypass ad-blocker detection on all websites
  6. // @author Snow2122
  7. // @license MIT
  8. // @match *://*/*
  9. // @grant none
  10. // ==/UserScript==
  11.  
  12. (function() {
  13. 'use strict';
  14.  
  15. // Match all websites
  16. // @match *://*/*
  17.  
  18. // Override common ad-blocker detection variables and functions
  19. window.ai_adb_active = true;
  20. window.ai_adb_action = 0;
  21. window.ai_adb_undetected = function() {
  22. document.querySelector('body')?.setAttribute('data-data-mask', 'clear');
  23. if (typeof window.ai_adb_undetected_actions === 'function') {
  24. window.ai_adb_undetected_actions(0);
  25. }
  26. };
  27.  
  28. // Simulate successful ad script loading
  29. const originalFetch = window.fetch;
  30. window.fetch = function(url, options) {
  31. if (url.includes('pagead') || url.includes('ads.') || url.includes('doubleclick')) {
  32. return Promise.resolve(new Response('OK', { status: 200 }));
  33. }
  34. return originalFetch.apply(this, arguments);
  35. };
  36.  
  37. // Remove ad-blocker overlays and messages
  38. function removeAdBlockElements() {
  39. const overlays = document.querySelectorAll('ins > div, .ad-block-message, #adblock-overlay, .ai-adb-overlay');
  40. const messages = document.querySelectorAll('section > div, .adblock-notice, .ai-adb-message-window');
  41. overlays.forEach(el => el.remove());
  42. messages.forEach(el => el.remove());
  43. }
  44.  
  45. // Clear ad-blocker related cookies
  46. function clearCookies() {
  47. const cookies = ['aiADB', 'aiADB_PV', 'aiADB_PR', 'adblock_detected'];
  48. cookies.forEach(cookie => {
  49. document.cookie = `${cookie}=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;`;
  50. });
  51. }
  52.  
  53. // Ensure content visibility
  54. function restoreContent() {
  55. document.querySelectorAll('.ai-adb-hide, .adblock-hidden').forEach(el => {
  56. el.style.display = 'block';
  57. el.style.visibility = 'visible';
  58. el.classList.remove('ai-adb-hide', 'adblock-hidden');
  59. });
  60. document.querySelectorAll('.ai-adb-show, .adblock-show').forEach(el => {
  61. el.style.display = 'none';
  62. el.classList.remove('ai-adb-show', 'adblock-show');
  63. });
  64. }
  65.  
  66. // Initialize bypass
  67. function init() {
  68. clearCookies();
  69. removeAdBlockElements();
  70. restoreContent();
  71. if (typeof window.ai_adb_undetected === 'function') {
  72. window.ai_adb_undetected(0);
  73. }
  74. }
  75.  
  76. // Run when DOM is loaded
  77. if (document.readyState === 'loading') {
  78. document.addEventListener('DOMContentLoaded', init);
  79. } else {
  80. init();
  81. }
  82.  
  83. // Observe for dynamically added elements
  84. const observer = new MutationObserver((mutations) => {
  85. mutations.forEach(() => {
  86. removeAdBlockElements();
  87. restoreContent();
  88. });
  89. });
  90.  
  91. observer.observe(document.body, { childList: true, subtree: true });
  92. })();