Steam Reviews Filter

remove some reviews contain(s) key words

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

You will need to install an extension such as Tampermonkey to install this script.

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         Steam Reviews Filter
// @description  remove some reviews contain(s) key words
// @author       desc_inno
// @namespace    https://github.com/desc70865/Steam-Reviews-Filter
// @supportURL   https://github.com/desc70865/Steam-Reviews-Filter/issues
// @version      0.2.1
// @icon         https://store.steampowered.com/favicon.ico
// @match        https://steamcommunity.com/app/*/reviews*
// @match        https://store.steampowered.com/app/*
// @match        https://store.steampowered.com/
// @grant        none
// ==/UserScript==

(function() {
    var flag = location.href.split('/')[2] == "steamcommunity.com";
    if(flag){
        window.setInterval(CheckForMoreContent, 3000);
    };
    remove(flag);
    window.setInterval(function(){ remove(flag); }, 3000); // 可按需设置刷新间隔
})();

function remove(flag){
    var reviews;
    var reg_filter = /我是傻逼/g; // 在此设置屏蔽关键字,多个用|隔开,形如: /我是傻A|我是傻B|我是傻C/g
    if(flag){
        reviews = document.querySelectorAll('.apphub_CardTextContent');
    }else{
        reviews = document.querySelectorAll('.content');
    };
    reviews.forEach(x => {
        let t = x.innerText.match(reg_filter)!=null;
        if(t){
            x.hidden = true;
        };
    });
};