Rescue Console

Rescues the console at website refresh to prevent overwriting by the website.

  1. // ==UserScript==
  2. // @name Rescue Console
  3. // @description Rescues the console at website refresh to prevent overwriting by the website.
  4. // @namespace RescueConsole
  5. // @author Tobbe
  6. // @version 1.1
  7. //
  8. // @include *
  9. //
  10. // @run-at document-start
  11. //
  12. // @grant none
  13. // ==/UserScript==
  14.  
  15. // Store the console to window.debugConsole to prevent overwriting by the website.
  16. try {
  17. window.wrappedJSObject.debugConsole = window.console;
  18. } catch(e) {
  19. window.debugConsole = window.console;
  20. }