Reddit Robin Filter

Filters comments. edit the filter array to add more filters. works on usernames and chat.

目前為 2016-04-01 提交的版本,檢視 最新版本

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         Reddit Robin Filter
// @namespace    http://kmcgurty.com
// @version      1
// @description  Filters comments. edit the filter array to add more filters. works on usernames and chat.
// @author       Kmc - [email protected]
// @match        https://www.reddit.com/robin/
// ==/UserScript==

var filter = ["卐", "ヽ༼ຈل͜ຈ༽ノ", "[Robin Autovoter", "voted to", "GREAT again", "Antrix_of_Hate"];
 
var filterInterval = setInterval(doFilter, 50);
 
function doFilter(){
    for(var i = 0; i < filter.length; i++){
        var divs = $(".robin-message:contains('" + filter[i] + "')");
   
        for(var j = 0; j < divs.length; j++){
            $(divs[j]).find(".robin-message--message").replaceWith("<span class='deleted' style='color: rgba(0,0,0, .4);'>&#x3c;deleted&#x3e;</span>");
        }
    }
}
 
jQuery.expr[':'].Contains = function(a,i,m){
     return jQuery(a).text().toUpperCase().indexOf(m[3].toUpperCase())>=0;
};