Fake Popup Open Bypass

Tricks sites into thinking popup was successfully opened

  1. // ==UserScript==
  2. // @name Fake Popup Open Bypass
  3. // @namespace elite.popup.bypass
  4. // @version 1.0
  5. // @description Tricks sites into thinking popup was successfully opened
  6. // @match *://*/*
  7. // @grant none
  8. // @run-at document-start
  9. // ==/UserScript==
  10.  
  11. (function () {
  12. 'use strict';
  13.  
  14. const fakeWindow = {
  15. closed: false,
  16. close: () => { fakeWindow.closed = true; },
  17. focus: () => {},
  18. blur: () => {},
  19. location: { href: "" },
  20. document: document,
  21. };
  22.  
  23. const originalOpen = window.open;
  24.  
  25. Object.defineProperty(window, 'open', {
  26. configurable: true,
  27. enumerable: true,
  28. writable: true,
  29. value: function (...args) {
  30. console.log("🧠 Fake popup opened:", args[0]);
  31. return fakeWindow; // pretend popup was opened
  32. }
  33. });
  34.  
  35. // Optional: restore real window.open later
  36. // setTimeout(() => { window.open = originalOpen; }, 5000);
  37. })();