Strib script

Removes the pay wall on StarTribune.com

  1. // ==UserScript==
  2. // @name Strib script
  3. // @namespace www.schmidthole.com
  4. // @description Removes the pay wall on StarTribune.com
  5. // @include htt*://www.startribune.com/*
  6. // @version 1.13
  7. // @grant none
  8. // ==/UserScript==
  9.  
  10. console.log('Strib script init');
  11.  
  12. var node = document.getElementById('cboxWrapper');
  13. if (node != null) {
  14. node.parentNode.parentNode.removeChild(node.parentNode);
  15. console.log('Strib script hid modal window!');
  16.  
  17. node = document.getElementById('cboxOverlay');
  18. if (node != null) {
  19. node.parentNode.removeChild(node);
  20. console.log('Strib script hid overlay!');
  21. }
  22.  
  23. var checkBodyStyle = function () {
  24. if (document.body.style.overflow === 'hidden') {
  25. document.body.style.overflow = 'auto';
  26. console.log('Strib script fixed scrolling!');
  27. window.clearInterval(checkInterval);
  28.  
  29. console.log('Strib script done!');
  30. }
  31. };
  32.  
  33. var checkInterval = window.setInterval(checkBodyStyle, 1000);
  34. }