Automatic Button Click

Closes the "Adblocker Enabled" notification for you.

  1. // ==UserScript==
  2. // @name Automatic Button Click
  3. // @author Rahatul Ghazi | ChatGPT
  4. // @description Closes the "Adblocker Enabled" notification for you.
  5. // @version 1.0
  6. // @license MIT
  7. // @match https://intro-hd.net/*
  8. // @grant none
  9. // @namespace https://greasyfork.org/users/1226730
  10. // ==/UserScript==
  11.  
  12. (function() {
  13. 'use strict';
  14.  
  15. let buttonClicked = false;
  16.  
  17. function clickButton() {
  18. if (buttonClicked) {
  19. return; // Stop checking if the button has been clicked
  20. }
  21.  
  22. let button = document.querySelector('.mdpDeblocker-close');
  23. if (button) {
  24. button.click();
  25. buttonClicked = true; // Set the flag to true after clicking
  26. } else {
  27. setTimeout(clickButton, 1000); // Check again in 1 second
  28. }
  29. }
  30.  
  31. // Wait for the page to load fully
  32. window.addEventListener('load', function() {
  33. clickButton(); // Start checking for the button
  34. });
  35. })();