The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Add a Search Bar to the New Twemoji Button

3 posters

Go down

Add a Search Bar to the New Twemoji Button Empty Add a Search Bar to the New Twemoji Button

Post by Ange Tuteur March 11th 2021, 10:06 pm

Hello! It has been awhile since I've written anything for Forumactif, but seeing the Twemoji button being added natively reignited an old flame..! Cool

This tutorial will help you add a search bar for the new Twemoji button, letting you easily find the emoji you're looking for!!

Add a Search Bar to the New Twemoji Button U6PUGj5

This script also adds titles to the emoji, so when you hover over one it'll show you a brief description!


Activating the Twemoji Button

So this script works, you must first activate the Twemoji button by going to Administration Panel ► General ► Messages and Emails ► Configuration, then select "Yes" to activate the Twemoji button and save.

Add a Search Bar to the New Twemoji Button Emoji-10
Image gracefully lifted from this topic -- thank you, Luzz! :rose:


Installing the Search Bar

With the button activated, all that's left is to install the JavaScript! Go to Administration panel ► Modules ► Javascript codes management ► Create a new script.

Title: Twemoji Search
Placement: In all the pages
Paste the code below and submit:
Code:
$(function() {
  // data used for applying titles to each emoji and narrowing down search results (descriptions ripped from https://hotemoji.com/emoji-meanings.html using an automated script)
  var EmojiData = {
    "8252": "Double Exclamation Mark",
    "8265": "Exclamation Question Mark",
    "8482": "Trade Mark",
    "8505": "Information",
    "8596": "Left-Right Arrow",
    "8597": "Up-Down Arrow",
    "8598": "Up-Left Arrow",
    "8599": "Up-Right Arrow",
    "8600": "Down-Right Arrow",
    "8601": "Down-Left Arrow",
    "8617": "Right Arrow Curving Left",
    "8618": "Left Arrow Curving Right",
    "8986": "Watch",
    "8987": "Hourglass Done",
    "9193": "Fast-Forward Button",
    "9194": "Fast Reverse Button",
    "9195": "Fast Up Button",
    "9196": "Fast Down Button",
    "9200": "Alarm Clock",
    "9203": "Hourglass Not Done",
    "9410": "Circled M",
    "9642": "Black Small Square",
    "9643": "White Small Square",
    "9654": "Play Button",
    "9664": "Reverse Button",
    "9723": "White Medium Square",
    "9724": "Black Medium Square",
    "9725": "White Medium-Small Square",
    "9726": "Black Medium-Small Square",
    "9728": "Sun",
    "9729": "Cloud",
    "9742": "Telephone",
    "9745": "Ballot Box with Check",
    "9748": "Umbrella with Rain Drops",
    "9749": "Hot Beverage",
    "9757": "Index Pointing Up",
    "9786": "Smiling Face",
    "9800": "Aries",
    "9801": "Taurus",
    "9802": "Gemini",
    "9803": "Cancer",
    "9804": "Leo",
    "9805": "Virgo",
    "9806": "Libra",
    "9807": "Scorpio",
    "9808": "Sagittarius",
    "9809": "Capricorn",
    "9810": "Aquarius",
    "9811": "Pisces",
    "9824": "Spade Suit",
    "9827": "Club Suit",
    "9829": "Heart Suit",
    "9830": "Diamond Suit",
    "9832": "Hot Springs",
    "9851": "Recycling Symbol",
    "9855": "Wheelchair Symbol",
    "9875": "Anchor",
    "9888": "Warning",
    "9889": "High Voltage",
    "9898": "White Circle",
    "9899": "Black Circle",
    "9917": "Soccer Ball",
    "9918": "Baseball",
    "9924": "Snowman Without Snow",
    "9925": "Sun Behind Cloud",
    "9934": "Ophiuchus",
    "9940": "No Entry",
    "9962": "Church",
    "9970": "Fountain",
    "9971": "Flag in Hole",
    "9973": "Sailboat",
    "9978": "Tent",
    "9981": "Fuel Pump",
    "9986": "Scissors",
    "9989": "White Heavy Check Mark",
    "9992": "Airplane",
    "9993": "Envelope",
    "9994": "Raised Fist",
    "9995": "Raised Hand",
    "9996": "Victory Hand",
    "9999": "Pencil",
    "10002": "Black Nib",
    "10004": "Heavy Check Mark",
    "10006": "Heavy Multiplication X",
    "10024": "Sparkles",
    "10035": "Eight-Spoked Asterisk",
    "10036": "Eight-Pointed Star",
    "10052": "Snowflake",
    "10055": "Sparkle",
    "10060": "Cross Mark",
    "10062": "Cross Mark Button",
    "10067": "Question Mark",
    "10068": "White Question Mark",
    "10069": "White Exclamation Mark",
    "10071": "Exclamation Mark",
    "10084": "Red Heart",
    "10133": "Heavy Plus Sign",
    "10134": "Heavy Minus Sign",
    "10135": "Heavy Division Sign",
    "10145": "Right Arrow",
    "10160": "Curly Loop",
    "10175": "Double Curly Loop",
    "10548": "Right Arrow Curving Up",
    "10549": "Right Arrow Curving Down",
    "11013": "Left Arrow",
    "11014": "Up Arrow",
    "11015": "Down Arrow",
    "11035": "Black Large Square",
    "11036": "White Large Square",
    "11088": "Star",
    "11093": "Heavy Large Circle",
    "12336": "Wavy Dash",
    "12349": "Part Alternation Mark",
    "12951": "Japanese “Congratulations” Button",
    "12953": "Japanese “Secret” Button",
    "126980": "Mahjong Red Dragon",
    "127183": "Joker",
    "127344": "a Button (Blood Type)",
    "127345": "b Button (Blood Type)",
    "127358": "o Button (Blood Type)",
    "127359": "p Button",
    "127374": "Ab Button (Blood Type)",
    "127377": "Cl Button",
    "127378": "Cool Button",
    "127379": "Free Button",
    "127380": "Id Button",
    "127381": "New Button",
    "127382": "Ng Button",
    "127383": "Ok Button",
    "127384": "Sos Button",
    "127385": "Up! Button",
    "127386": "Vs Button",
    "127464": "Flag: China",
    "127465": "Flag: Germany",
    "127466": "Flag: Spain",
    "127467": "Flag: France",
    "127468": "Flag: United Kingdom",
    "127470": "Flag: Italy",
    "127471": "Flag: Japan",
    "127472": "Flag: South Korea",
    "127479": "Flag: Russia",
    "127482": "Flag: United States",
    "127489": "Japanese “Here” Button",
    "127490": "Japanese “Service Charge” Button",
    "127514": "Japanese “Free of Charge” Button",
    "127535": "Japanese “Reserved” Button",
    "127538": "Japanese “Prohibited” Button",
    "127539": "Japanese “Vacancy” Button",
    "127540": "Japanese “Passing Grade” Button",
    "127541": "Japanese “No Vacancy” Button",
    "127542": "Japanese “Not Free of Charge” Button",
    "127543": "Japanese “Monthly Amount” Button",
    "127544": "Japanese “Application” Button",
    "127545": "Japanese “Discount” Button",
    "127546": "Japanese “Open For Business” Button",
    "127568": "Japanese “Bargain” Button",
    "127569": "Japanese “Acceptable” Button",
    "127744": "Cyclone",
    "127745": "Foggy",
    "127746": "Closed Umbrella",
    "127747": "Night with Stars",
    "127748": "Sunrise Over Mountains",
    "127749": "Sunrise",
    "127750": "Cityscape At Dusk",
    "127751": "Sunset",
    "127752": "Rainbow",
    "127753": "Bridge At Night",
    "127754": "Water Wave",
    "127755": "Volcano",
    "127756": "Milky Way",
    "127757": "Globe Showing Europe-Africa",
    "127758": "Globe Showing Americas",
    "127759": "Globe Showing Asia-Australia",
    "127760": "Globe with Meridians",
    "127761": "New Moon",
    "127762": "Waxing Crescent Moon",
    "127763": "First Quarter Moon",
    "127764": "Waxing Gibbous Moon",
    "127765": "Full Moon",
    "127766": "Waning Gibbous Moon",
    "127767": "Last Quarter Moon",
    "127768": "Waning Crescent Moon",
    "127769": "Crescent Moon",
    "127770": "New Moon Face",
    "127771": "First Quarter Moon Face",
    "127772": "Last Quarter Moon Face",
    "127773": "Full Moon Face",
    "127774": "Sun with Face",
    "127775": "Glowing Star",
    "127776": "Shooting Star",
    "127792": "Chestnut",
    "127793": "Seedling",
    "127794": "Evergreen Tree",
    "127795": "Deciduous Tree",
    "127796": "Palm Tree",
    "127797": "Cactus",
    "127799": "Tulip",
    "127800": "Cherry Blossom",
    "127801": "Rose",
    "127802": "Hibiscus",
    "127803": "Sunflower",
    "127804": "Blossom",
    "127805": "Ear of Corn",
    "127806": "Sheaf of Rice",
    "127807": "Herb",
    "127808": "Four Leaf Clover",
    "127809": "Maple Leaf",
    "127810": "Fallen Leaf",
    "127811": "Leaf Fluttering in Wind",
    "127812": "Mushroom",
    "127813": "Tomato",
    "127814": "Eggplant",
    "127815": "Grapes",
    "127816": "Melon",
    "127817": "Watermelon",
    "127818": "Tangerine",
    "127819": "Lemon",
    "127820": "Banana",
    "127821": "Pineapple",
    "127822": "Red Apple",
    "127823": "Green Apple",
    "127824": "Pear",
    "127825": "Peach",
    "127826": "Cherries",
    "127827": "Strawberry",
    "127828": "Hamburger",
    "127829": "Pizza",
    "127830": "Meat on Bone",
    "127831": "Poultry Leg",
    "127832": "Rice Cracker",
    "127833": "Rice Ball",
    "127834": "Cooked Rice",
    "127835": "Curry Rice",
    "127836": "Steaming Bowl",
    "127837": "Spaghetti",
    "127838": "Bread",
    "127839": "French Fries",
    "127840": "Roasted Sweet Potato",
    "127841": "Dango",
    "127842": "Oden",
    "127843": "Sushi",
    "127844": "Fried Shrimp",
    "127845": "Fish Cake with Swirl",
    "127846": "Soft Ice Cream",
    "127847": "Shaved Ice",
    "127848": "Ice Cream",
    "127849": "Doughnut",
    "127850": "Cookie",
    "127851": "Chocolate Bar",
    "127852": "Candy",
    "127853": "Lollipop",
    "127854": "Custard",
    "127855": "Honey Pot",
    "127856": "Shortcake",
    "127857": "Bento Box",
    "127858": "Pot of Food",
    "127859": "Cooking",
    "127860": "Fork and Knife",
    "127861": "Teacup Without Handle",
    "127862": "Sake",
    "127863": "Wine Glass",
    "127864": "Cocktail Glass",
    "127865": "Tropical Drink",
    "127866": "Beer Mug",
    "127867": "Clinking Beer Mugs",
    "127868": "Baby Bottle",
    "127872": "Ribbon",
    "127873": "Wrapped Gift",
    "127874": "Birthday Cake",
    "127875": "Jack-o-Lantern",
    "127876": "Christmas Tree",
    "127877": "Santa Claus",
    "127878": "Fireworks",
    "127879": "Sparkler",
    "127880": "Balloon",
    "127881": "Party Popper",
    "127882": "Confetti Ball",
    "127883": "Tanabata Tree",
    "127884": "Crossed Flags",
    "127885": "Pine Decoration",
    "127886": "Japanese Dolls",
    "127887": "Carp Streamer",
    "127888": "Wind Chime",
    "127889": "Moon Viewing Ceremony",
    "127890": "Backpack",
    "127891": "Graduation Cap",
    "127904": "Carousel Horse",
    "127905": "Ferris Wheel",
    "127906": "Roller Coaster",
    "127907": "Fishing Pole",
    "127908": "Microphone",
    "127909": "Movie Camera",
    "127910": "Cinema",
    "127911": "Headphone",
    "127912": "Artist Palette",
    "127913": "Top Hat",
    "127914": "Circus Tent",
    "127915": "Ticket",
    "127916": "Clapper Board",
    "127917": "Performing Arts",
    "127918": "Video Game",
    "127919": "Direct Hit",
    "127920": "Slot Machine",
    "127921": "Pool 8 Ball",
    "127922": "Game Die",
    "127923": "Bowling",
    "127924": "Flower Playing Cards",
    "127925": "Musical Note",
    "127926": "Musical Notes",
    "127927": "Saxophone",
    "127928": "Guitar",
    "127929": "Musical Keyboard",
    "127930": "Trumpet",
    "127931": "Violin",
    "127932": "Musical Score",
    "127933": "Running Shirt",
    "127934": "Tennis",
    "127935": "Skis",
    "127936": "Basketball",
    "127937": "Chequered Flag",
    "127938": "Snowboarder",
    "127939": "Person Running",
    "127940": "Person Surfing",
    "127942": "Trophy",
    "127943": "Horse Racing",
    "127944": "American Football",
    "127945": "Rugby Football",
    "127946": "Person Swimming",
    "127968": "House",
    "127969": "House with Garden",
    "127970": "Office Building",
    "127971": "Japanese Post Office",
    "127972": "Post Office",
    "127973": "Hospital",
    "127974": "Bank",
    "127975": "Atm Sign",
    "127976": "Hotel",
    "127977": "Love Hotel",
    "127978": "Convenience Store",
    "127979": "School",
    "127980": "Department Store",
    "127981": "Factory",
    "127982": "Red Paper Lantern",
    "127983": "Japanese Castle",
    "127984": "Castle",
    "128000": "Rat",
    "128001": "Mouse",
    "128002": "Ox",
    "128003": "Water Buffalo",
    "128004": "Cow",
    "128005": "Tiger",
    "128006": "Leopard",
    "128007": "Rabbit",
    "128008": "Cat",
    "128009": "Dragon",
    "128010": "Crocodile",
    "128011": "Whale",
    "128012": "Snail",
    "128013": "Snake",
    "128014": "Horse",
    "128015": "Ram",
    "128016": "Goat",
    "128017": "Ewe",
    "128018": "Monkey",
    "128019": "Rooster",
    "128020": "Chicken",
    "128021": "Dog",
    "128022": "Pig",
    "128023": "Boar",
    "128024": "Elephant",
    "128025": "Octopus",
    "128026": "Spiral Shell",
    "128027": "Bug",
    "128028": "Ant",
    "128029": "Honeybee",
    "128030": "Lady Beetle",
    "128031": "Fish",
    "128032": "Tropical Fish",
    "128033": "Blowfish",
    "128034": "Turtle",
    "128035": "Hatching Chick",
    "128036": "Baby Chick",
    "128037": "Front-Facing Baby Chick",
    "128038": "Bird",
    "128039": "Penguin",
    "128040": "Koala",
    "128041": "Poodle",
    "128042": "Camel",
    "128043": "Two-Hump Camel",
    "128044": "Dolphin",
    "128045": "Mouse Face",
    "128046": "Cow Face",
    "128047": "Tiger Face",
    "128048": "Rabbit Face",
    "128049": "Cat Face",
    "128050": "Dragon Face",
    "128051": "Spouting Whale",
    "128052": "Horse Face",
    "128053": "Monkey Face",
    "128054": "Dog Face",
    "128055": "Pig Face",
    "128056": "Frog Face",
    "128057": "Hamster Face",
    "128058": "Wolf Face",
    "128059": "Bear Face",
    "128060": "Panda Face",
    "128061": "Pig Nose",
    "128062": "Paw Prints",
    "128064": "Eyes",
    "128066": "Ear",
    "128067": "Nose",
    "128068": "Mouth",
    "128069": "Tongue",
    "128070": "Backhand Index Pointing Up",
    "128071": "Backhand Index Pointing Down",
    "128072": "Backhand Index Pointing Left",
    "128073": "Backhand Index Pointing Right",
    "128074": "Oncoming Fist",
    "128075": "Waving Hand",
    "128076": "Ok Hand",
    "128077": "Thumbs Up",
    "128078": "Thumbs Down",
    "128079": "Clapping Hands",
    "128080": "Open Hands",
    "128081": "Crown",
    "128082": "Woman’s Hat",
    "128083": "Glasses",
    "128084": "Necktie",
    "128085": "t-Shirt",
    "128086": "Jeans",
    "128087": "Dress",
    "128088": "Kimono",
    "128089": "Bikini",
    "128090": "Woman’s Clothes",
    "128091": "Purse",
    "128092": "Handbag",
    "128093": "Clutch Bag",
    "128094": "Man’s Shoe",
    "128095": "Running Shoe",
    "128096": "High-Heeled Shoe",
    "128097": "Woman’s Sandal",
    "128098": "Woman’s Boot",
    "128099": "Footprints",
    "128100": "Bust in Silhouette",
    "128101": "Busts in Silhouette",
    "128102": "Boy",
    "128103": "Girl",
    "128104": "Man",
    "128105": "Woman",
    "128106": "Family",
    "128107": "Man and Woman Holding Hands",
    "128108": "Two Men Holding Hands",
    "128109": "Two Women Holding Hands",
    "128110": "Police Officer",
    "128111": "People with Bunny Ears",
    "128112": "Bride with Veil",
    "128113": "Person: Blond Hair",
    "128114": "Man with Chinese Cap",
    "128115": "Person Wearing Turban",
    "128116": "Old Man",
    "128117": "Old Woman",
    "128118": "Baby",
    "128119": "Construction Worker",
    "128120": "Princess",
    "128121": "Ogre",
    "128122": "Goblin",
    "128123": "Ghost",
    "128124": "Baby Angel",
    "128125": "Alien",
    "128126": "Alien Monster",
    "128127": "Angry Face with Horns",
    "128128": "Skull",
    "128129": "Person Tipping Hand",
    "128130": "Guard",
    "128131": "Woman Dancing",
    "128132": "Lipstick",
    "128133": "Nail Polish",
    "128134": "Person Getting Massage",
    "128135": "Person Getting Haircut",
    "128136": "Barber Pole",
    "128137": "Syringe",
    "128138": "Pill",
    "128139": "Kiss Mark",
    "128140": "Love Letter",
    "128141": "Ring",
    "128142": "Gem Stone",
    "128143": "Kiss",
    "128144": "Bouquet",
    "128145": "Couple with Heart",
    "128146": "Wedding",
    "128147": "Beating Heart",
    "128148": "Broken Heart",
    "128149": "Two Hearts",
    "128150": "Sparkling Heart",
    "128151": "Growing Heart",
    "128152": "Heart with Arrow",
    "128153": "Blue Heart",
    "128154": "Green Heart",
    "128155": "Yellow Heart",
    "128156": "Purple Heart",
    "128157": "Heart with Ribbon",
    "128158": "Revolving Hearts",
    "128159": "Heart Decoration",
    "128160": "Diamond with a Dot",
    "128161": "Light Bulb",
    "128162": "Anger Symbol",
    "128163": "Bomb",
    "128164": "Zzz",
    "128165": "Collision",
    "128166": "Sweat Droplets",
    "128167": "Droplet",
    "128168": "Dashing Away",
    "128169": "Pile of Poo",
    "128170": "Flexed Biceps",
    "128171": "Dizzy",
    "128172": "Speech Balloon",
    "128173": "Thought Balloon",
    "128174": "White Flower",
    "128175": "Hundred Points",
    "128176": "Money Bag",
    "128177": "Currency Exchange",
    "128178": "Heavy Dollar Sign",
    "128179": "Credit Card",
    "128180": "Yen Banknote",
    "128181": "Dollar Banknote",
    "128182": "Euro Banknote",
    "128183": "Pound Banknote",
    "128184": "Money with Wings",
    "128185": "Chart Increasing with Yen",
    "128186": "Seat",
    "128187": "Laptop Computer",
    "128188": "Briefcase",
    "128189": "Computer Disk",
    "128190": "Floppy Disk",
    "128191": "Optical Disk",
    "128192": "Dvd",
    "128193": "File Folder",
    "128194": "Open File Folder",
    "128195": "Page with Curl",
    "128196": "Page Facing Up",
    "128197": "Calendar",
    "128198": "Tear-Off Calendar",
    "128199": "Card Index",
    "128200": "Chart Increasing",
    "128201": "Chart Decreasing",
    "128202": "Bar Chart",
    "128203": "Clipboard",
    "128204": "Pushpin",
    "128205": "Round Pushpin",
    "128206": "Paperclip",
    "128207": "Straight Ruler",
    "128208": "Triangular Ruler",
    "128209": "Bookmark Tabs",
    "128210": "Ledger",
    "128211": "Notebook",
    "128212": "Notebook with Decorative Cover",
    "128213": "Closed Book",
    "128214": "Open Book",
    "128215": "Green Book",
    "128216": "Blue Book",
    "128217": "Orange Book",
    "128218": "Books",
    "128219": "Name Badge",
    "128220": "Scroll",
    "128221": "Memo",
    "128222": "Telephone Receiver",
    "128223": "Pager",
    "128224": "Fax Machine",
    "128225": "Satellite Antenna",
    "128226": "Loudspeaker",
    "128227": "Megaphone",
    "128228": "Outbox Tray",
    "128229": "Inbox Tray",
    "128230": "Package",
    "128231": "e-Mail",
    "128232": "Incoming Envelope",
    "128233": "Envelope with Arrow",
    "128234": "Closed Mailbox with Lowered Flag",
    "128235": "Closed Mailbox with Raised Flag",
    "128236": "Open Mailbox with Raised Flag",
    "128237": "Open Mailbox with Lowered Flag",
    "128238": "Postbox",
    "128239": "Postal Horn",
    "128240": "Newspaper",
    "128241": "Mobile Phone",
    "128242": "Mobile Phone with Arrow",
    "128243": "Vibration Mode",
    "128244": "Mobile Phone Off",
    "128245": "No Mobile Phones",
    "128246": "Antenna Bars",
    "128247": "Camera",
    "128249": "Video Camera",
    "128250": "Television",
    "128251": "Radio",
    "128252": "Videocassette",
    "128256": "Shuffle Tracks Button",
    "128257": "Repeat Button",
    "128258": "Repeat Single Button",
    "128259": "Clockwise Vertical Arrows",
    "128260": "Counterclockwise Arrows Button",
    "128261": "Dim Button",
    "128262": "Bright Button",
    "128263": "Muted Speaker",
    "128264": "Speaker Low Volume",
    "128265": "Speaker Medium Volume",
    "128266": "Speaker High Volume",
    "128267": "Battery",
    "128268": "Electric Plug",
    "128269": "Magnifying Glass Tilted Left",
    "128270": "Magnifying Glass Tilted Right",
    "128271": "Locked with Pen",
    "128272": "Locked with Key",
    "128273": "Key",
    "128274": "Locked",
    "128275": "Unlocked",
    "128276": "Bell",
    "128277": "Bell with Slash",
    "128278": "Bookmark",
    "128279": "Link",
    "128280": "Radio Button",
    "128281": "Back Arrow",
    "128282": "End Arrow",
    "128283": "On! Arrow",
    "128284": "Soon Arrow",
    "128285": "Top Arrow",
    "128286": "No One Under Eighteen",
    "128287": "Keycap: 10",
    "128288": "Input Latin Uppercase",
    "128289": "Input Latin Lowercase",
    "128290": "Input Numbers",
    "128291": "Input Symbols",
    "128292": "Input Latin Letters",
    "128293": "Fire",
    "128294": "Flashlight",
    "128295": "Wrench",
    "128296": "Hammer",
    "128297": "Nut and Bolt",
    "128298": "Kitchen Knife",
    "128299": "Pistol",
    "128300": "Microscope",
    "128301": "Telescope",
    "128302": "Crystal Ball",
    "128303": "Dotted Six-Pointed Star",
    "128304": "Japanese Symbol For Beginner",
    "128305": "Trident Emblem",
    "128306": "Black Square Button",
    "128307": "White Square Button",
    "128308": "Red Circle",
    "128309": "Blue Circle",
    "128310": "Large Orange Diamond",
    "128311": "Large Blue Diamond",
    "128312": "Small Orange Diamond",
    "128313": "Small Blue Diamond",
    "128314": "Red Triangle Pointed Up",
    "128315": "Red Triangle Pointed Down",
    "128316": "Upwards Button",
    "128317": "Downwards Button",
    "128336": "One O’Clock",
    "128337": "Two O’Clock",
    "128338": "Three O’Clock",
    "128339": "Four O’Clock",
    "128340": "Five O’Clock",
    "128341": "Six O’Clock",
    "128342": "Seven O’Clock",
    "128343": "Eight O’Clock",
    "128344": "Nine O’Clock",
    "128345": "Ten O’Clock",
    "128346": "Eleven O’Clock",
    "128347": "Twelve O’Clock",
    "128348": "One-Thirty",
    "128349": "Two-Thirty",
    "128350": "Three-Thirty",
    "128351": "Four-Thirty",
    "128352": "Five-Thirty",
    "128353": "Six-Thirty",
    "128354": "Seven-Thirty",
    "128355": "Eight-Thirty",
    "128356": "Nine-Thirty",
    "128357": "Ten-Thirty",
    "128358": "Eleven-Thirty",
    "128359": "Twelve-Thirty",
    "128507": "Mount Fuji",
    "128508": "Tokyo Tower",
    "128509": "Statue of Liberty",
    "128510": "Map of Japan",
    "128511": "Moai",
    "128512": "Grinning Face",
    "128513": "Beaming Face with Smiling Eyes",
    "128514": "Face with Tears of Joy",
    "128515": "twitter emoji",
    "128516": "Grinning Face with Smiling Eyes",
    "128517": "Grinning Face with Sweat",
    "128518": "Grinning Squinting Face",
    "128519": "Smiling Face with Halo",
    "128520": "Smiling Face with Horns",
    "128521": "Winking Face",
    "128522": "Smiling Face with Smiling Eyes",
    "128523": "Face Savoring Food",
    "128524": "Relieved Face",
    "128525": "Smiling Face with Heart-Eyes",
    "128526": "Smiling Face with Sunglasses",
    "128527": "Smirking Face",
    "128528": "Neutral Face",
    "128529": "Expressionless Face",
    "128530": "Unamused Face",
    "128531": "Downcast Face with Sweat",
    "128532": "Pensive Face",
    "128533": "Confused Face",
    "128534": "Confounded Face",
    "128535": "Kissing Face",
    "128536": "Face Blowing a Kiss",
    "128537": "Kissing Face with Smiling Eyes",
    "128538": "Kissing Face with Closed Eyes",
    "128539": "Face with Tongue",
    "128540": "Winking Face with Tongue",
    "128541": "Squinting Face with Tongue",
    "128542": "Disappointed Face",
    "128543": "Worried Face",
    "128544": "Angry Face",
    "128545": "Pouting Face",
    "128546": "Crying Face",
    "128547": "Persevering Face",
    "128548": "Face with Steam from Nose",
    "128549": "Sad But Relieved Face",
    "128550": "Frowning Face with Open Mouth",
    "128551": "Anguished Face",
    "128552": "Fearful Face",
    "128553": "Weary Face",
    "128554": "Sleepy Face",
    "128555": "Tired Face",
    "128556": "Grimacing Face",
    "128557": "Loudly Crying Face",
    "128558": "Face with Open Mouth",
    "128559": "Hushed Face",
    "128560": "Anxious Face with Sweat",
    "128561": "Face Screaming in Fear",
    "128562": "Astonished Face",
    "128563": "Flushed Face",
    "128564": "Sleeping Face",
    "128565": "Dizzy Face",
    "128566": "Face Without Mouth",
    "128567": "Face with Medical Mask",
    "128568": "Grinning Cat Face with Smiling Eyes",
    "128569": "Cat Face with Tears of Joy",
    "128570": "Grinning Cat Face",
    "128571": "Smiling Cat Face with Heart-Eyes",
    "128572": "Cat Face with Wry Smile",
    "128573": "Kissing Cat Face",
    "128574": "Pouting Cat Face",
    "128575": "Crying Cat Face",
    "128576": "Weary Cat Face",
    "128581": "Person Gesturing No",
    "128582": "Person Gesturing Ok",
    "128583": "Person Bowing",
    "128584": "See-No-Evil Monkey",
    "128585": "Hear-No-Evil Monkey",
    "128586": "Speak-No-Evil Monkey",
    "128587": "Person Raising Hand",
    "128588": "Raising Hands",
    "128589": "Person Frowning",
    "128590": "Person Pouting",
    "128591": "Folded Hands",
    "128640": "Rocket",
    "128641": "Helicopter",
    "128642": "Locomotive",
    "128643": "Railway Car",
    "128644": "High-Speed Train",
    "128645": "Bullet Train",
    "128646": "Train",
    "128647": "Metro",
    "128648": "Light Rail",
    "128649": "Station",
    "128650": "Tram",
    "128651": "Tram Car",
    "128652": "Bus",
    "128653": "Oncoming Bus",
    "128654": "Trolleybus",
    "128655": "Bus Stop",
    "128656": "Minibus",
    "128657": "Ambulance",
    "128658": "Fire Engine",
    "128659": "Police Car",
    "128660": "Oncoming Police Car",
    "128661": "Taxi",
    "128662": "Oncoming Taxi",
    "128663": "Automobile",
    "128664": "Oncoming Automobile",
    "128665": "Sport Utility Vehicle",
    "128666": "Delivery Truck",
    "128667": "Articulated Lorry",
    "128668": "Tractor",
    "128669": "Monorail",
    "128670": "Mountain Railway",
    "128671": "Suspension Railway",
    "128672": "Mountain Cableway",
    "128673": "Aerial Tramway",
    "128674": "Ship",
    "128675": "Person Rowing Boat",
    "128676": "Speedboat",
    "128677": "Horizontal Traffic Light",
    "128678": "Vertical Traffic Light",
    "128679": "Construction",
    "128680": "Police Car Light",
    "128681": "Triangular Flag",
    "128682": "Door",
    "128683": "Prohibited",
    "128684": "Cigarette",
    "128685": "No Smoking",
    "128686": "Litter in Bin Sign",
    "128687": "No Littering",
    "128688": "Potable Water",
    "128689": "Non-Potable Water",
    "128690": "Bicycle",
    "128691": "No Bicycles",
    "128692": "Person Biking",
    "128693": "Person Mountain Biking",
    "128694": "Person Walking",
    "128695": "No Pedestrians",
    "128696": "Children Crossing",
    "128697": "Men’s Room",
    "128698": "Women’s Room",
    "128699": "Restroom",
    "128700": "Baby Symbol",
    "128701": "Toilet",
    "128702": "Water Closet",
    "128703": "Shower",
    "128704": "Person Taking Bath",
    "128705": "Bathtub",
    "128706": "Passport Control",
    "128707": "Customs",
    "128708": "Baggage Claim",
    "128709": "Left Luggage"
  };
 
  $(function() {
    var button = document.querySelector('.sceditor-button-twemojifa');
   
    if (button) {
      // create the search box and add titles to the emoji on click
      button.onclick = function() {
        var search = document.createElement('INPUT'),
            dd = document.querySelector('.sceditor-twemojifa');
        search.placeholder = 'Search...';
        search.className = 'fa_twemoji_search inputbox';
        search.name = 'twemoji_search';
        search.type = 'text';
       
        search.onkeyup = function () {
          var emoji = $(this).closest('body').find('.emoji'),
              val = this.value.toLowerCase(),
              i = 0,
              j = emoji.length;
   
          // loop through each emoji to see if any match the input
          for (; i < j; i++) {
            if (val) {
   
              if (emoji[i].title.toLowerCase().indexOf(val) != -1 || emoji[i].alt.toLowerCase().indexOf(val) != -1) {
                emoji[i].className = emoji[i].className.replace(' fa_twemoji_hidden', '');
   
              } else if (!/hidden/.test(emoji[i].className)) {
                emoji[i].className += ' fa_twemoji_hidden';
              }
   
            } else {
              emoji[i].className = emoji[i].className.replace(' fa_twemoji_hidden', '');
            }
          }
        };
       
        // add search to drop down and titles to emoji
        if (dd) {
          var container = document.createElement('DIV');
          container.id = 'fa_twemoji_search_box';
          container.appendChild(search);
         
          // add search bar
          dd.firstChild.insertBefore(container, dd.querySelector('.emoji'));
         
          // add titles to each emoji using the emoji data at the top of this script
          for (var emoji = dd.querySelectorAll('.emoji'), i = 0, j = emoji.length; i < j; i++) {
            if (EmojiData[emoji[i].alt.codePointAt(0)]) {
              emoji[i].title = EmojiData[emoji[i].alt.codePointAt(0)];
            }
          }
        }
       
        // unbind events
        this.onclick = null;
      };
    }
  });
 
  // add default styles to the search
  var style = $('<style type="text/css">.fa_twemoji_search {width:80%;}#fa_twemoji_search_box {text-align:center;margin-bottom:5px;}.fa_twemoji_hidden {visibility:hidden;position:absolute;top:0;left:0;}</style>')[0];
  document.body.appendChild(style);
});

With that you're good to go! cheers


If any issues, do let me know. I hope you all enjoy this new plugin! Very good


Last edited by Ange Tuteur on March 12th 2021, 8:10 pm; edited 1 time in total (Reason for editing : update preview)
Ange Tuteur
Ange Tuteur
Forumaster

Male Posts : 13207
Reputation : 3001
Language : English & 日本語
Location : Pennsylvania

https://fmdesign.forumotion.com

The Godfather, skouliki, SLGray, YoshiGM, Bipo, SarkZKalie, TonnyKamper and like this post

Back to top Go down

Add a Search Bar to the New Twemoji Button Empty Re: Add a Search Bar to the New Twemoji Button

Post by SarkZKalie March 12th 2021, 3:29 pm

Such a great idea! Thank you <3


Add a Search Bar to the New Twemoji Button Sarkzk10
SarkZKalie
SarkZKalie
Support Moderator
Support Moderator

Male Posts : 1451
Reputation : 220
Language : English

https://rotavn.forumotion.com/

Ange Tuteur likes this post

Back to top Go down

Add a Search Bar to the New Twemoji Button Empty Re: Add a Search Bar to the New Twemoji Button

Post by Ange Tuteur March 12th 2021, 8:14 pm

SarkZKalie wrote:Such a great idea! Thank you <3
Thanks, and no problem!

Figured it'd be convenient to have a search feature like twitter does, so I ended up repurposing this old relic to work with the twemoji button. Neutral
Ange Tuteur
Ange Tuteur
Forumaster

Male Posts : 13207
Reputation : 3001
Language : English & 日本語
Location : Pennsylvania

https://fmdesign.forumotion.com

SarkZKalie and TonnyKamper like this post

Back to top Go down

Add a Search Bar to the New Twemoji Button Empty Re: Add a Search Bar to the New Twemoji Button

Post by YoshiGM March 12th 2021, 11:01 pm

This is an a incredible function!
Thanks Ange for your work Very Happy
YoshiGM
YoshiGM
Active Poster

Male Posts : 1576
Reputation : 146
Language : Spanish & English
Location : Mexico

http://asistencia.foroactivo.com/u21373

Ange Tuteur likes this post

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum