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==
var UserBlockList = [693146, 585619];
var KeyWordBlockList = ["2的召唤", "2的召喚", "浩天个人发布"];
var IndexOfTitle = 2;
var IndexOfUserID = 8;
var RemoveUsersInBlockList = function () {
var tableList = $("table#topic_list tbody tr");
tableList.each(function (index, elem) {
var tds = $(elem).find("td");
var id = parseInt($(tds[IndexOfUserID]).find("a").attr("href").split("/").slice(-1)[0], 10);
var 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 (var _i = 0, KeyWordBlockList_1 = KeyWordBlockList; _i < KeyWordBlockList_1.length; _i++) {
var keyWord = KeyWordBlockList_1[_i];
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(function () {
setTimeout(RemoveUsersInBlockList, 500);
});