Generous Gazette

Removes paywall on Colorado Springs based Gazette newspaper.

当前为 2016-10-14 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Generous Gazette
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.0
  5. // @description Removes paywall on Colorado Springs based Gazette newspaper.
  6. // @author thebspatrol
  7. // @match http*://gazette.com/*
  8. // @match http*://*.gazette.com/*
  9. // @grant none
  10. // ==/UserScript==
  11.  
  12. (function() {
  13. 'use strict';
  14. var _html;
  15. function pollPage(){
  16. _html = document.getElementsByClassName("troyShow")[0];
  17. if (_html !== undefined){
  18. console.log("paywall caught!");
  19. _html.classList.remove("troyShow");
  20. clearInterval(interval);
  21. }
  22. }
  23. var interval = setInterval(pollPage, 250);
  24. })();