Close eBay Pop-up

Automatically close eBay pop-up

  1. // ==UserScript==
  2. // @name Close eBay Pop-up
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1
  5. // @description Automatically close eBay pop-up
  6. // @author Your Name
  7. // @match https://*.ebay.com/*
  8. // @grant none
  9. // @license MIT
  10. // ==/UserScript==
  11.  
  12. (function() {
  13. 'use strict';
  14.  
  15. // Wait for the pop-up to appear
  16. var waitForPopUp = setInterval(function() {
  17. // Check if the pop-up is present
  18. var popUp = document.querySelector('.lightbox-dialog__window');
  19. if (popUp) {
  20. // Find the close button element and click it
  21. var closeButton = document.querySelector('.lightbox-dialog__close');
  22. if (closeButton) {
  23. closeButton.click();
  24. clearInterval(waitForPopUp); // Stop checking once the pop-up is closed
  25. }
  26. }
  27. }, 1000); // Check every 1 second
  28. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址