Scrolller.com Adblocker

Blocks Ads and the Premium, Adblock & Bandwidth Popup on Scrolller.com

  1. // ==UserScript==
  2. // @name Scrolller.com Adblocker
  3. // @name:de Scrolller.com Werbeblocker
  4. // @version 1.0.5
  5. // @description Blocks Ads and the Premium, Adblock & Bandwidth Popup on Scrolller.com
  6. // @description:de Blockiert Werbung und das Premium, Adblock & Bandwith Popup auf Scrolller.com
  7. // @icon https://scrolller.com/assets/favicon-16x16.png
  8. // @author TalkLounge (https://github.com/TalkLounge)
  9. // @namespace https://github.com/TalkLounge/scrolller.com-adblocker
  10. // @license MIT
  11. // @match https://scrolller.com/*
  12. // @grant none
  13. // ==/UserScript==
  14.  
  15. (function () {
  16. 'use strict';
  17.  
  18. const s = document.createElement("style");
  19. s.innerHTML = `.popup:has(#recommendations__popup) {
  20. display: none;
  21. }
  22.  
  23. /* General: Anti-Adblock Popup */
  24. .popup:has(svg[width=80]) {
  25. display: none;
  26. }
  27.  
  28. /* General: Premium Popup */
  29. .popup:has(img[src*=cat]) {
  30. display: none;
  31. }
  32.  
  33. /* Feed: Bandwidth Popup */
  34. .popup:has([class^=_description]) {
  35. display: none;
  36. }
  37.  
  38. /* Feed: Upgrade for the Ultimate Experience! Popup */
  39. .popup:has([class^=body_description]) {
  40. display: none;
  41. }
  42.  
  43. /* Feed: Inline Ads */
  44. [class^=verticalView_container] a[aria-label='Ad Link'] {
  45. visibility: hidden;
  46. }
  47.  
  48. /* Feed: Inline Ads */
  49. main div:has(>div>div>iframe), [class^=verticalView_container] div:has(>div>div>iframe) {
  50. visibility: hidden;
  51. }
  52.  
  53. /* Post: Banner Ad */
  54. #fullscreen-view a[class^=FullscreenView_adLink] {
  55. display: none;
  56. }
  57.  
  58. /* Post: Right Bottom Corner Circle Ad */
  59. #fullscreen-view button:has(>div>img[src^='/assets/fullscreen']) {
  60. display: none;
  61. }
  62.  
  63. /* Legacy */
  64. .popup:has([class^=PremiumCTAPopup]) {
  65. display: none;
  66. }`;
  67. document.head.append(s);
  68.  
  69. const old_window_top_fetch = window.top.fetch;
  70. window.top.fetch = function () {
  71. if (arguments[1] && arguments[1].body && arguments[1].body.indexOf("AffiliateQuery") != -1) {
  72. return;
  73. }
  74.  
  75. return old_window_top_fetch.apply(this, arguments);
  76. };
  77. })();