您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Deletes spam comments on trades and blocks it's sender on https://csgolounge.com/
当前为
//Corresponding blog entry for more info: //https://www.gergely-szabo.com/blog/csgoloungespamblock // ==UserScript== // @name CSGO Lounge Spam Block // @namespace https://www.gergely-szabo.com/ // @version 1.0 // @description Deletes spam comments on trades and blocks it's sender on https://csgolounge.com/ // @author Gergely Szabo // @match https://csgolounge.com/trade?t=* // @grant none // ==/UserScript== (function() { 'use strict'; var messages = document.getElementById("messages"); var repliesText = messages.querySelectorAll('div.msgtxt'); var options = messages.getElementsByClassName("opts"); var keywords = new RegExp('cṣgogem.com|nanotrade.win|lightshoț.com|You can trade it at ↑↑↑|çs.money|çsgolounge.money|imgụr.com'); for(var i=0; i < repliesText.length; i++){ //Goes through the list of replies and if it matches to a known spam pattern then deletes comment and blocks sender. if(keywords.test(repliesText[i].innerText)){ var buttons = options[i].getElementsByClassName("button"); buttons[0].click(); if(buttons.length>1){ buttons[1].click(); } } } })();