Woomy Additional Emojis

Adds additional emojis to woomy chat!

// ==UserScript==
// @name         Woomy Additional Emojis
// @namespace    http://tampermonkey.net/
// @version      1.1
// @description  Adds additional emojis to woomy chat!
// @author       PowfuArras // Discord: @xskt
// @match        *://*.woomy.app/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=woomy.app
// @grant        none
// @run-at       document-start
// @license      FLORRIM DEVELOPER GROUP LICENSE (https://github.com/Florrim/license/blob/main/LICENSE.md)
// ==/UserScript==

(function() {
    "use strict";
    const emojis = new Map([
        ["100", "💯"],
        ["hundred", "💯"],
        ["grinning", "😀"],
        ["grin", "😁"],
        ["joy", "😂"],
        ["rofl", "🤣"],
        ["smiley", "😃"],
        ["smile", "😄"],
        ["sweatsmile", "😅"],
        ["laughing", "😆"],
        ["kissing", "😗"],
        ["hearteyes", "😍"],
        ["sunglasses", "😎"],
        ["yum", "😋"],
        ["blush", "😊"],
        ["wink", "😉"],
        ["kissingsmilingeyes", "😙"],
        ["kissingclosedeyes", "😚"],
        ["relaxed", "☺"],
        ["slightlysmilingface", "🙂"],
        ["hugging", "🤗"],
        ["starstruck", "🤩"],
        ["thinking", "🤔"],
        ["facewithraisedeyebrow", "🤨"],
        ["openmouth", "😮"],
        ["anguished", "😥"],
        ["persevere", "😣"],
        ["smirk", "😏"],
        ["facewithrollingeyes", "🙄"],
        ["nomouth", "😶"],
        ["expressionless", "😑"],
        ["facewithoutmouth", "😐"],
        ["zippermouthface", "🤐"],
        ["hushed", "😯"],
        ["sleepy", "😪"],
        ["tiredface", "😫"],
        ["yawningface", "🥱"],
        ["sleeping", "😴"],
        ["relieved", "😌"],
        ["stuckouttongue", "😛"],
        ["upsidedownface", "🙃"],
        ["confused", "😕"],
        ["slightlyfrowningface", "😔"],
        ["sweat", "😓"],
        ["unamused", "😒"],
        ["droolingface", "🤤"],
        ["stuckouttongueclosedeyes", "😝"],
        ["stuckouttonguewinkingeye", "😜"],
        ["moneymouthface", "🤑"],
        ["astonished", "😲"],
        ["frowningface", "☹"],
        ["slightlyfrowningface", "🙁"],
        ["confounded", "😖"],
        ["disappointed", "😞"],
        ["worried", "😟"],
        ["angry", "😤"],
        ["grimacing", "😬"],
        ["explodinghead", "🤯"],
        ["weary", "😩"],
        ["fearful", "😨"],
        ["anguished", "😧"],
        ["frowning", "😦"],
        ["crying", "😭"],
        ["cryingface", "😢"],
        ["sweat", "😰"],
        ["scream", "😱"],
        ["hotface", "🥵"],
        ["coldface", "🥶"],
        ["flushed", "😳"],
        ["crazyface", "🤪"],
        ["dizzyface", "😵"],
        ["woozyface", "🥴"],
        ["nauseatedface", "🤮"],
        ["sick", "🤢"],
        ["facewiththermometer", "🤒"],
        ["facewithmedicalmask", "😷"],
        ["angryfacewithhorns", "👿"],
        ["skull", "💀"],
        ["goblin", "👺"],
        ["ogre", "👹"],
        ["japaneseogre", "👹"],
        ["smilingimp", "😈"],
        ["nerdface", "🤓"],
        ["facewithmonocle", "🧐"],
        ["skullandcrossbones", "☠"],
        ["ghost", "👻"],
        ["alien", "👽"],
        ["spaceinvader", "👾"],
        ["robot", "🤖"],
        ["poop", "💩"],
        ["smilingcat", "😺"],
        ["smilecat", "😸"],
        ["manwithturban", "🐱‍👤"],
        ["poutingcat", "😾"],
        ["cryingcatface", "😿"],
        ["screamcat", "🙀"],
        ["hearteyescat", "😻"],
        ["smirkcat", "😼"],
        ["kissingcat", "😽"],
        ["motorcycle", "🐱‍🏍"],
        ["computer", "🐱‍💻"],
        ["dragonface", "🐱‍🐉"],
        ["glasses", "🐱‍👓"],
        ["rocket", "🐱‍🚀"],
        ["seenoevil", "🙈"],
        ["hearnoevil", "🙉"],
        ["speaknoevil", "🙊"],
        ["foxface", "🦊"],
        ["giraffeface", "🦒"],
        ["tiger", "🐯"],
        ["lionface", "🦁"],
        ["cat", "🐱"],
        ["wolf", "🐺"],
        ["dog", "🐶"],
        ["monkeyface", "🐵"],
        ["frog", "🐸"],
        ["pigface", "🐷"],
        ["chicken", "🐔"],
        ["unicornface", "🦄"],
        ["horse", "🐴"],
        ["pawprints", "🐾"],
        ["eyes", "👀"],
        ["eye", "👁"],
        ["bustsinsilhouette", "👥"],
        ["bustinsilhouette", "👤"],
        ["speakinghead", "🗣"],
        ["genie", "🧞‍♂️"],
        ["genie", "🧞‍♀️"],
        ["microbe", "🦠"],
        ["spiderweb", "🕸"],
        ["tooth", "🦷"],
        ["bone", "🦴"],
        ["eye", "👀"],
        ["brain", "🧠"],
        ["muscle", "💪"],
        ["leg", "🦵"],
        ["foot", "🦶"],
        ["ear", "👂"],
        ["earwithhearingaid", "🦻"],
        ["nose", "👃"],
        ["pinchinghand", "🤏"],
        ["pointleft", "👈"],
        ["pointright", "👉"],
        ["pointup", "☝"],
        ["pointup2", "👆"],
        ["pointdown", "👇"],
        ["v", "✌"],
        ["crossedfingers", "🤞"],
        ["vulcansalute", "🖖"],
        ["metal", "🤘"],
        ["callmehand", "🤙"],
        ["raisedhandwithfingerssplayed", "🖐"],
        ["raisedhand", "✋"],
        ["okhand", "👌"],
        ["thumbsup", "👍"],
        ["thumbsdown", "👎"],
        ["fist", "✊"],
        ["punch", "👊"],
        ["left-facingfist", "🤛"],
        ["right-facingfist", "🤜"],
        ["raisedbackofhand", "🤚"],
        ["wave", "👋"],
        ["loveyougesture", "🤟"],
        ["writinghand", "✍"],
        ["clap", "👏"],
        ["openhands", "👐"],
        ["raisedhands", "🙌"],
        ["palmsuptogether", "🤲"],
        ["pray", "🙏"],
        ["handshake", "🤝"],
        ["nailcare", "💅"],
        ["balloon", "🎈"],
        ["saxophone", "🎷"],
        ["lock", "🔒"],
        ["unlock", "🔓"],
        ["key", "🔑"],
        ["oldkey", "🗝"],
        ["pick", "⛏"],
        ["hammerandpick", "⚒"],
        ["hammerandwrench", "🛠"],
        ["crossedswords", "⚔"],
        ["dagger", "🗡"],
        ["knife", "🔪"],
        ["gun", "🔫"],
        ["bomb", "💣"],
        ["dropofblood", "🩸"],
        ["eggplant", "🍆"],
        ["peach", "🍑"],
        ["cherries", "🍒"],
        ["cyclone", "🌀"],
        ["rainbow", "🌈"],
        ["zap", "⚡"],
        ["snowflake", "❄"],
        ["fire", "🔥"],
        ["droplet", "💧"],
        ["ocean", "🌊"],
        ["zap", "⚡"],
        ["crescentmoon", "🌙"],
        ["sun", "☀"],
        ["star", "⭐"],
        ["star2", "🌟"],
        ["rainbowflag", "🏳‍🌈"],
        ["heart", "❤"],
        ["anger", "💢"],
        ["boom", "💥"],
        ["zzz", "💤"],
        ["sweatdrops", "💦"],
        ["hole", "🕳"],
        ["radioactive", "☢"],
        ["biohazard", "☣"],
        ["warning", "⚠"],
        ["childrencrossing", "🚸"],
        ["japanesesymbolforbeginner", "🔰"],
        ["recycle", "♻"],
        ["fleurdelis", "⚜"],
        ["diamondshapewithadotinside", "💠"],
        ["zero", "0️⃣"],
        ["one", "1️⃣"],
        ["two", "2️⃣"],
        ["three", "3️⃣"],
        ["four", "4️⃣"],
        ["five", "5️⃣"],
        ["six", "6️⃣"],
        ["seven", "7️⃣"],
        ["eight", "8️⃣"],
        ["nine", "9️⃣"],
        ["ten", "🔟"],
        ["speech", "💬"],
    ]);
    const natives = {
        send: WebSocket.prototype.send
    };
    let injected = false;
    WebSocket.prototype.send = function (data) {
        if (!injected) {
            injected = true;
            natives.talk = this.talk;
            this.talk = function (...message) {
                if (message[0] === "cs") {
                    message[1] = message[1].replace(/:[\w]+:/gi, match => emojis.get(match.toLowerCase().replace(/[_\s:]/g, '')) || match);
                }
                natives.talk(...message);
            }
        }
        natives.send.call(this, data);
    }
    setInterval(function () {
        try {
            document.getElementById("chatBox").maxlength = 400;
        } catch (error) {}
    });
})();