Remove inoreader ADS

Remove inoreader.com's advertisement in reading list, and upgrade button.

目前為 2015-05-19 提交的版本,檢視 最新版本

  1. // ==UserScript==
  2. // @name Remove inoreader ADS
  3. // @description Remove inoreader.com's advertisement in reading list, and upgrade button.
  4. // @version 3.0
  5. // @grant none
  6. // @include https://www.inoreader.com/feed/*
  7. // @include https://www.inoreader.com/folder/*
  8. // @include https://www.inoreader.com/
  9. // @include http://www.inoreader.com/*
  10. // @include https://www.inoreader.com/all_articles
  11. // @include https://www.inoreader.com/starred
  12. // @include https://www.inoreader.com/dashboard
  13. // @include https://www.inoreader.com/trending
  14. // @include https://www.inoreader.com/liked
  15. // @include https://www.inoreader.com/commented
  16. // @include https://www.inoreader.com/recent
  17. // @include https://www.inoreader.com/web_pages
  18. // @include https://www.inoreader.com/channel
  19. // @include https://www.inoreader.com/my_channel
  20. // @namespace https://raw.githubusercontent.com/Hacksign/configs/master/firefox/plugins/greasemonkey/inoreader.user.js
  21. // ==/UserScript==
  22. tools_div = document.getElementById('sb_rp_tools');
  23. if (tools_div) {
  24. tools_div.style.right = '90px';
  25. }
  26. notifications_div = document.getElementById('sb_rp_notifications');
  27. if (notifications_div) {
  28. notifications_div.style.right = '50px';
  29. }
  30. gear_div = document.getElementById('sb_rp_gear');
  31. if (gear_div) {
  32. gear_div.style.right = '10px';
  33. }
  34. upgrade_div = document.getElementById('sb_rp_upgrade');
  35. if (upgrade_div) {
  36. document.getElementById('sb_rp_upgrade').style.display = 'none';
  37. }
  38. reader_pane_div = document.getElementById('reader_pane');
  39. if (reader_pane_div) {
  40. reader_pane_div.addEventListener('DOMNodeInserted', function (e) {
  41. if (e.originalTarget.id && e.originalTarget.id.indexOf('leaderboard_ad-') != - 1) {
  42. e.originalTarget.parentNode.removeChild(e.originalTarget);
  43. } else if (e.originalTarget.classList && e.originalTarget.classList.contains('ad_title')) {
  44. e.originalTarget.parentNode.removeChild(e.originalTarget);
  45. } else if (e.originalTarget.classList && e.originalTarget.classList.contains('dashboard_gadgets')) {
  46. //find and remove ads div in dashboard page
  47. sub_divs = e.originalTarget.getElementsByTagName('div');
  48. for (i = 0; i < sub_divs.length; ++i) {
  49. if (sub_divs[i].classList && sub_divs[i].classList.contains('header_control')) {
  50. if (!sub_divs[i].innerHTML.trim()) {
  51. e.originalTarget.parentNode.removeChild(e.originalTarget);
  52. }
  53. }
  54. }
  55. }
  56. }, false);
  57. }
  58. content_div = document.getElementById('three_way_contents');
  59. if (content_div) {
  60. content_div.addEventListener('scroll', function () {
  61. if (content_div.scrollTop != 0 && !document.getElementById('_gm_hacksign_topbar')) {
  62. var topbar = document.createElement('div');
  63. topbar.id = '_gm_hacksign_topbar';
  64. topbar.style.background = 'rgba(0, 0, 0, 0.3) none repeat scroll 0px 0px';
  65. topbar.style.position = 'fixed';
  66. topbar.style.textAlign = 'center';
  67. topbar.style.right = '20px';
  68. topbar.style.bottom = '10px';
  69. topbar.style.lineHeight = '40px';
  70. topbar.style.cursor = 'pointer';
  71. topbar.style.width = '40px';
  72. topbar.style.height = '40px';
  73. topbar.innerHTML = '^';
  74. topbar.onclick = function () {
  75. var y = content_div.scrollTop;
  76. var timer = setInterval(function () {
  77. y = y - y/6;
  78. if (y < 50) {
  79. y = 0;
  80. content_div.scrollTo(0, y);
  81. clearInterval(timer);
  82. }
  83. content_div.scrollTo(0, y);
  84. }, '25');
  85. };
  86. content_div.appendChild(topbar);
  87. } else if (content_div.scrollTop == 0 && document.getElementById('_gm_hacksign_topbar')) {
  88. content_div.removeChild(document.getElementById('_gm_hacksign_topbar'));
  89. }
  90. });
  91. content_div.addEventListener('DOMNodeInserted', function (e) {
  92. if (e.originalTarget.id && e.originalTarget.id.indexOf('article_full_contents') != - 1) {
  93. e.originalTarget.addEventListener('DOMNodeInserted', function (f) {
  94. if (f.originalTarget.classList && f.originalTarget.classList.contains('ad_title')) {
  95. f.originalTarget.parentNode.removeChild(f.originalTarget);
  96. }
  97. if (f.originalTarget.attributes.length == 0 && f.originalTarget.childNodes.length != 0) {
  98. for (i = 0; i < f.originalTarget.childNodes.length; ++i) {
  99. if (f.originalTarget.childNodes[i].id.indexOf('inner_ad-') != - 1) {
  100. f.originalTarget.childNodes[i].style.display = 'none';
  101. }
  102. }
  103. }
  104. if (f.originalTarget.classList && f.originalTarget.classList.contains('ad_footer_remove')) {
  105. f.originalTarget.parentNode.removeChild(f.originalTarget);
  106. }
  107. }, false);
  108. }
  109. }, false);
  110. }

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址