killermist

Harrison no-nags

Oct 31st, 2020
833
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name        No Nagging
  3. // @description Disables nagging on harrison.edu
  4. // @version     1.0
  5. // @include     *://harrison.edu/*
  6. // @include     *://*.harrison.edu/*
  7. // @run-at      document-start
  8. // ==/UserScript==
  9.  
  10. var script = document.createElement('script');
  11. var style = document.createElement('style');
  12.  
  13. script.appendChild(document.createTextNode(
  14.     'window.alert=function(){};' +
  15.     'window.confirm=function(){};'
  16. ));
  17.  
  18. style.appendChild(document.createTextNode(
  19.     '.topmenubar{display:none;}'
  20. ));
  21.  
  22. var interval = setInterval(function() {
  23.     if (document.head) {
  24.         document.head.appendChild(script);
  25.         document.head.appendChild(style);
  26.         clearInterval(interval);
  27.     }
  28. }, 1);
  29.  
  30.  
RAW Paste Data