Filter GamesDoneQuick (AGDQ, SGDQ) Twitch chat.

Removes chat messages with emotes only, UPPERCASE ONLY and user notices.

// ==UserScript==
// @name         Filter GamesDoneQuick (AGDQ, SGDQ) Twitch chat.
// @namespace    https://gamesdonequick.com/
// @version      0.5
// @description  Removes chat messages with emotes only, UPPERCASE ONLY and user notices.
// @author       ciscoheat
// @match        https://www.twitch.tv/gamesdonequick*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    setInterval(function() {
        var messages = document.querySelectorAll('.chat-line__message');
        [].forEach.call(messages, function(message) {
            var node = message.querySelector('span[data-a-target="chat-message-text"]');
            var msg = node ? node.innerText : null;
            //console.log(msg);
            if(!node || (msg.toUpperCase() == msg ||
                       msg == "SourPls" ||
                       msg.match(/^([A-Z][a-z]+)+$/) !== null)
            ) {
                message.style.display = "none";
            }
       });

        var notices = document.querySelectorAll('.user-notice-line');
        [].forEach.call(notices, function(notice) {
            notice.style.display = "none";
        });
     }, 1);
})();
长期地址
遇到问题?请前往 GitHub 提 Issues,或加Q群1031348184

赞助商

Fishcpy

广告

Rainyun

注册一下就行

Rainyun

一年攒够 12 元