Rulu.co remove ads

Removes ad links from Rulu.co

当前为 2020-07-27 提交的版本,查看 最新版本

// ==UserScript==
// @name         Rulu.co remove ads
// @namespace    https://gf.qytechs.cn/users/649
// @version      1.0.5
// @description  Removes ad links from Rulu.co
// @author       Adrien Pyke
// @match        *://www.rulu.co/*
// @require      https://gitcdn.link/repo/fuzetsu/userscripts/b38eabf72c20fa3cf7da84ecd2cefe0d4a2116be/wait-for-elements/wait-for-elements.js
// @grant        none
// ==/UserScript==

(() => {
  'use strict';

  const Util = {
    qq(query, context = document) {
      return Array.from(context.querySelectorAll(query));
    }
  };

  const REGEX = /^https?:\/\/rulu\.io\/j\//iu;

  Util.qq('a')
    .filter(link => link.href.match(REGEX))
    .forEach(link => (link.href = link.href.replace(REGEX, '')));

  waitForElems({
    sel: '#d0bf',
    onmatch(overlay) {
      overlay.remove();
    }
  });
})();

QingJ © 2025

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