您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
把不想看到的资源从列表中抹去 动漫花园 (share.dmhy.org)
当前为
// ==UserScript== // @name dmhy block // @namespace https://github.com/tautcony // @license GPL version 3 // @encoding utf-8 // @version 0.02 // @date 2017/12/30 // @modified 2017/12/30 // @description 把不想看到的资源从列表中抹去 动漫花园 (share.dmhy.org) // @author TautCony // @match *://share.dmhy.org/* // @run-at document-end // ==/UserScript== const UserBlockList = [693146, 585619]; const KeyWordBlockList = ["2的召唤", "2的召喚", "浩天个人发布"]; const IndexOfTitle = 2; const IndexOfUserID = 8; let RemoveUsersInBlockList = () => { const tableList = $("table#topic_list tbody tr"); tableList.each((index, elem) => { const tds = $(elem).find("td"); const id = parseInt($(tds[IndexOfUserID]).find("a").attr("href").split("/").slice(-1)[0], 10); const title = $(tds[IndexOfTitle]).text().trim().split("\n")[0]; if (UserBlockList.indexOf(id) >= 0) { console.log(`Remove ${title} because of it was published by userid=${id}`); $(elem).remove(); return; } for (const keyWord of KeyWordBlockList) { if (title.indexOf(keyWord) >= 0) { console.log(`Remove ${title} because of its title contains key word="${keyWord}"`); $(elem).remove(); return; } } }); }; RemoveUsersInBlockList(); $("th.{sorter:.'text'}.header").click(() => { setTimeout(RemoveUsersInBlockList, 500); });