Scrolller.com Adblocker

Blocks Ads and the Get Premium Popup

当前为 2023-05-06 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Scrolller.com Adblocker
  3. // @name:de Scrolller.com Adblocker
  4. // @version 1.0.0
  5. // @description Blocks Ads and the Get Premium Popup
  6. // @description:de Blockiert Werbungen und das Get Premium Popup
  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. // @run-at document-start
  14. // ==/UserScript==
  15.  
  16. (function () {
  17. 'use strict';
  18.  
  19. const old_window_top_fetch = window.top.fetch;
  20.  
  21. window.top.fetch = function(...args) {
  22. return new Promise(async (resolve, reject) => {
  23. if (args[1].body.indexOf("AffiliateQuery") != -1) {
  24. reject();
  25. } else {
  26. resolve(await old_window_top_fetch.apply(null, args));
  27. }
  28. });
  29. };
  30.  
  31. const s = document.createElement("style");
  32. s.innerHTML = `.popup {
  33. display: none;
  34. }`;
  35. document.head.append(s);
  36. })();