# HG changeset patch # User Ian Neal # Date 1621179571 -3600 # Parent 83a2f21aaa8aa8dab0aa8f61b4d096a62259ef82 Bug 1711376 - Add some extra smilies to chatZilla. r=frg a=frg diff --git a/suite/extensions/irc/xul/content/mungers.js b/suite/extensions/irc/xul/content/mungers.js --- a/suite/extensions/irc/xul/content/mungers.js +++ b/suite/extensions/irc/xul/content/mungers.js @@ -76,17 +76,17 @@ function initMunger() munger.addRule("channel-link", /(?:[^\w#]|^)[@%+]?(#[^<>,\[\](){}\"\s\u201d]*[^:,.<>\[\](){}\'\"\s\u201d])/i, insertChannelLink, NORMAL_PRIORITY, NORMAL_PRIORITY); munger.addRule("talkback-link", /(?:\W|^)(TB\d{8,}[A-Z]?)(?:\W|$)/, insertTalkbackLink, NORMAL_PRIORITY, NORMAL_PRIORITY); munger.addRule("face", - /((^|\s)(?:[>]?[B8=:;(xX][~']?[-^v"]?(?:[)|(PpSs0oO\?\[\]\/\\]|D+)|>[-^v]?\)|[oO9][._][oO9])(\s|$))/, + /((^|\s)(?:[>O]?[B8=:;(xX%][~']?[-^v"]?(?:[)|(PpSs0oO#\?\*\[\]\/\\]|D+)|>[-^v]?\)|[oO9][._][oO9])(\s|$))/, insertSmiley, NORMAL_PRIORITY, NORMAL_PRIORITY); munger.addRule("rheet", /(?:\W|^)(rhee+t\!*)(?:\s|$)/i, insertRheet, 10, 10); munger.addRule("word-hyphenator", client.whitespaceRE, insertHyphenatedWord, LOW_PRIORITY, NORMAL_PRIORITY); client.enableColors = client.prefs["munger.colorCodes"]; var branch = client.prefManager.prefBranch; for (var entry in munger.entries) @@ -404,77 +404,95 @@ function insertQuote (matchText, contain } function insertSmiley(emoticon, containerTag, eventData, mungerEntry) { let smilies = { "face-alien": "\uD83D\uDC7D", "face-lol": "\uD83D\uDE02", "face-laugh": "\uD83D\uDE04", + "face-sweat_smile": "\uD83D\uDE05", + "face-innocent": "\uD83D\uDE07", "face-evil": "\uD83D\uDE08", "face-wink": "\uD83D\uDE09", "face-smile": "\uD83D\uDE0A", "face-cool": "\uD83D\uDE0E", "face-neutral": "\uD83D\uDE10", "face-thinking": "\uD83D\uDE14", "face-confused": "\uD83D\uDE15", + "face-kissing": "\uD83D\uDE17", "face-tongue": "\uD83D\uDE1B", + "face-worried": "\uD83D\uDE1F", "face-angry": "\uD83D\uDE20", "face-cry": "\uD83D\uDE22", "face-surprised": "\uD83D\uDE2D", "face-eek": "\uD83D\uDE31", "face-red": "\uD83D\uDE33", "face-dizzy": "\uD83D\uDE35", "face-sad": "\uD83D\uDE41", "face-rolleyes": "\uD83D\uDE44", + "face-zipped": "\uD83E\uDD10", "face-rofl": "\uD83E\uDD23", + "face-woozy": "\uD83E\uDD74", }; let type; if (emoticon.search(/\>[-^v]?\)/) != -1) type = "face-alien"; - else if (emoticon.search(/\>[=:;][-^v]?[(|]/) != -1) + else if (emoticon.search(/\>[=:;][-^v]?[(|]|[Xx][-^v]?[(\[]/) != -1) type = "face-angry"; - else if (emoticon.search(/[=:;][-^v]?[Ss\\\/]/) != -1) + else if (emoticon.search(/[=:;][-^v]?[Ss]/) != -1) type = "face-confused"; else if (emoticon.search(/[B8][-^v]?[)\]]/) != -1) type = "face-cool"; else if (emoticon.search(/[=:;][~'][-^v]?\(/) != -1) type = "face-cry"; else if (emoticon.search(/o[._]O|O[._]o/) != -1) type = "face-dizzy"; else if (emoticon.search(/o[._]o|O[._]O/) != -1) type = "face-eek"; else if (emoticon.search(/\>[=:;][-^v]?D/) != -1) type = "face-evil"; + else if (emoticon.search(/O[=:][-^v]?[)]/) != -1) + type = "face-innocent"; + else if (emoticon.search(/[=:;][-^v]?[*]/) != -1) + type = "face-kissing"; else if (emoticon.search(/[=:;][-^v]?DD/) != -1) type = "face-lol"; else if (emoticon.search(/[=:;][-^v]?D/) != -1) type = "face-laugh"; else if (emoticon.search(/\([-^v]?D|[xX][-^v]?D/) != -1) type = "face-rofl"; else if (emoticon.search(/[=:;][-^v]?\|/) != -1) type = "face-neutral"; else if (emoticon.search(/[=:;][-^v]?\?/) != -1) type = "face-thinking"; else if (emoticon.search(/[=:;]"[)\]]/) != -1) type = "face-red"; else if (emoticon.search(/9[._]9/) != -1) type = "face-rolleyes"; else if (emoticon.search(/[=:;][-^v]?[(\[]/) != -1) type = "face-sad"; - else if (emoticon.search(/[=:][-^v]?[)\]]/) != -1) + else if (emoticon.search(/[=:][-^v]?[)]/) != -1) type = "face-smile"; else if (emoticon.search(/[=:;][-^v]?[0oO]/) != -1) type = "face-surprised"; + else if (emoticon.search(/[=:][-^v]?[\]]/) != -1) + type = "face-sweat_smile"; else if (emoticon.search(/[=:;][-^v]?[pP]/) != -1) type = "face-tongue"; else if (emoticon.search(/;[-^v]?[)\]]/) != -1) type = "face-wink"; + else if (emoticon.search(/%[-^v][)\]]/) != -1) + type = "face-woozy"; + else if (emoticon.search(/[=:;][-^v]?[\/\\]/) != -1) + type = "face-worried"; + else if (emoticon.search(/[=:;][-^v]?[#]/) != -1) + type = "face-zipped"; let glyph = smilies[type]; if (!glyph) { // We didn't actually match anything, so it'll be a too-generic match // from the munger RegExp. mungerEntry.enabled = false; client.munger.munge(emoticon, containerTag, eventData); mungerEntry.enabled = true;