Block Popup

This script will block all popup.

  1. // ==UserScript==
  2. // @name Block Popup
  3. // @namespace Block Popup
  4. // @include *
  5. // @version 1
  6. // @grant none
  7. // @run-at document-start
  8. // @description This script will block all popup.
  9. // ==/UserScript==
  10.  
  11. function NoOpen(e){return 1}
  12. parent.open=NoOpen;
  13. this.open=NoOpen;
  14. window.open=NoOpen;
  15. open=NoOpen;
  16.  
  17. window.open = function(){
  18. return;
  19. }
  20.  
  21. open = function(){
  22. return;
  23. }
  24.  
  25.  
  26. this.open = function(){
  27. return;
  28. }
  29.  
  30.  
  31. parent.open = function(){
  32. return;
  33. }