View difference between Paste ID: 7syK4LuG and zP4T3vZF
SHOW: | | - or go back to the newest paste.
1
// ==UserScript==
2
// @name         DLP Ignore++
3
// @version      0.2
4-
// @description  Ignore those wankers ScottPress and Arthellion
4+
// @description  Ignore harder than ever before
5
// @author       BTT
6
// @match        https://forums.darklordpotter.net/*
7
// @grant        none
8
// @require      https://d3js.org/d3.v4.min.js
9
// ==/UserScript==
10
11-
function ignoreScott(t){
11+
function ignoreUser(t){
12-
    if (t.attr("data-author") === "ScottPress" || t.attr("data-author") === "Arthellion"){
12+
    if (t.attr("data-author") === "user1" || t.attr("data-author") === "Arthellion"){
13
        t.style("display", "none");
14
    }
15
}
16
17
(function() {
18
    'use strict';
19
20-
    d3.selectAll(".message").each(function(d){ ignoreScott(d3.select(this)); });
20+
    d3.selectAll(".message").each(function(d){ ignoreUser(d3.select(this)); });
21-
    d3.selectAll(".discussionListItem").each(function(d){ ignoreScott(d3.select(this)); });
21+
    d3.selectAll(".discussionListItem").each(function(d){ ignoreUser(d3.select(this)); });
22-
    var blockedIDs = ['38995'];
22+
    var blockedIDs = ['bleh','blah'];
23
    d3.selectAll(".PreviewTooltip").each(function(d){
24
        var t = d3.select(this);
25
        var threadnum = t.attr("href");
26
        threadnum = threadnum.substring(threadnum.indexOf(".") + 1);
27
        threadnum = threadnum.substring(0, threadnum.indexOf("/"));
28
        if (blockedIDs.includes(threadnum)){
29
            d3.select(this.parentNode.parentNode.parentNode.parentNode).style("display", "none");
30
        }
31
    });
32
})();