Strib script

Removes the pay wall on StarTribune.com

当前为 2014-10-21 提交的版本,查看 最新版本

  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.11
  7. // ==/UserScript==
  8.  
  9. console.log('Strib script init');
  10.  
  11. var node = document.getElementById('cboxWrapper');
  12. if (node != null) {
  13. node.parentNode.parentNode.removeChild(node.parentNode);
  14. console.log('Strib script hid model window!');
  15.  
  16. node = document.getElementById('cboxOverlay');
  17. if (node != null) {
  18. node.parentNode.removeChild(node);
  19. console.log('Strib script hid overlay!');
  20. }
  21.  
  22. var checkBodyStyle = function () {
  23. if (document.body.style.overflow === 'hidden') {
  24. document.body.style.overflow = 'auto';
  25. console.log('Strib script fixed scrolling!');
  26. window.clearInterval(checkInterval);
  27.  
  28. console.log('Strib script done!');
  29. }
  30. };
  31.  
  32. var checkInterval = window.setInterval(checkBodyStyle, 1000);
  33. }