Disable javascript alert boxs

A simple userscript that defeats and disable the javascript alert boxes

  1. // ==UserScript==
  2. // @name Disable javascript alert boxs
  3. // @namespace Disable javascript alert boxs
  4. // @description A simple userscript that defeats and disable the javascript alert boxes
  5. // @author SMed79
  6. // @version 1.0
  7. // @icon http://i.imgur.com/EMCvngV.png
  8. // @run-at document-start
  9. // @include http://*
  10. // @include https://*
  11. // @grant none
  12. // ==/UserScript==
  13.  
  14. window.alert_ = window.alert;
  15. window.alert = function(a) {
  16. console.log.call(this, a);
  17. }
  18.  
  19. setTimeout(function() {
  20. window.alert = window.alert_;
  21. delete window.alert_;
  22. }, 5000);