🏠 返回首頁 

Greasy Fork is available in English.

Remove ad for Reader Mode Pro in ReaderMode extension

Removes bottom right block advertising "Reader Mode Pro", the paid version of readermode.io

  1. // ==UserScript==
  2. // @name Remove ad for Reader Mode Pro in ReaderMode extension
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1
  5. // @description Removes bottom right block advertising "Reader Mode Pro", the paid version of readermode.io
  6. // @author https://greasyfork.org/en/users/728793-keyboard-shortcuts
  7. // @match https://*/*
  8. // @match http://*/*
  9. // @icon https://lh3.googleusercontent.com/enMBRM7MzaKfxzyEJpzH9KIlyxcs0T2kkqteBVvTF1ti1ESTgBb4Ox818fqhUM86J0JaNktU6wFvMSSUf9JhAwPWKg=w256-h256-e365-rj-sc0x00ffffff
  10. // @grant none
  11. // @license MIT
  12. // ==/UserScript==
  13. /* jshint esversion: 6 */
  14. (function() {
  15. // Written by a Reader Mode user who's annoyed enough at the constant advertising to write a script to remove it.
  16. 'use strict';
  17. var readerProTimer = null;
  18. readerProTimer = setInterval(function() {
  19. const ids = ['cr-pro-features-modal', 'cr-pro-features-tooltip'];
  20. const iframes = Array.from(document.getElementsByTagName('iframe')).filter(iframe => iframe.contentDocument);
  21. for (var iframe of iframes) {
  22. for (var id of ids) {
  23. const el = iframe.contentDocument.getElementById(id); // Reader Mode creates an iframe, so we have to look for this element in there.
  24. if (el) {
  25. el.remove();
  26. clearInterval(readerProTimer);
  27. }
  28. }
  29. }
  30. }, 1000);
  31. })();