// ==UserScript== // @name Filter Kick emojis, words & Set Character Limit // @namespace no // @version 0.3 // @description will remove all emojis and limit the messages to 75 characters ( you can change filters below) // @author restrictedword (discord) // @match https://kick.com/* // @icon https://www.google.com/s2/favicons?sz=64&domain=kick.com // @grant none // @license MIT // @downloadURL https://update.greasyfork.icu/scripts/468841/Filter%20Kick%20emojis%2C%20words%20%20Set%20Character%20Limit.user.js // @updateURL https://update.greasyfork.icu/scripts/468841/Filter%20Kick%20emojis%2C%20words%20%20Set%20Character%20Limit.meta.js // ==/UserScript== ! function() { "use strict"; console.log("Chat Optimization script loaded."); const e = { characterLimit: 75, whitelistedEmojis: ["emojiExample", "emojiOther"], blockedWords: ["word1", "Word1", "Word 1"] }; function t() { const o = e.whitelistedEmojis.length, n = e.blockedWords.length; document.querySelectorAll(".chat-entry").forEach((t => { const c = t.querySelectorAll('[data-emote-name*="emoji"]'), r = t.querySelector(".chat-entry-content"), l = o > 0 && Array.from(c).some((t => t.getAttribute("data-emote-name").includes(e.whitelistedEmojis))), i = r && r.textContent.length > e.characterLimit, s = n > 0 && e.blockedWords.some((e => r && r.textContent.trim().includes(e))); (c.length > 0 && !l || i || s) && t.remove() })); 0 === document.querySelectorAll(".chat-entry").length && setTimeout(t, 2e3) } console.log("Waiting for DOM content to load..."), window.onload = () => { console.log("DOM content loaded."), t(), function() { const e = new MutationObserver((e => { for (const o of e) "childList" === o.type && t() })), o = document.querySelector(".chat-container"); o ? (e.observe(o, { childList: !0, subtree: !0 }), console.log("Observer set up.")) : console.log("Chat container not found.") }() } }();