NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

// ==UserScript==
// @name Emoji Picker by Yigit
// @version 1
// @grant none
// @match https://chat.healthymatesturkey.com/dashboard
// ==/UserScript==

window.onload = function () {
// Define emojis and their names
var emojis = [
{ names: ['grinning', 'smile'], emoji: '๐Ÿ˜€' },
{ names: ['grin', 'beaming'], emoji: '๐Ÿ˜ƒ' },
{ names: ['joy', 'laughing'], emoji: '๐Ÿ˜„' },
{ names: ['rofl', 'giggling'], emoji: '๐Ÿ˜' },
{ names: ['pleased', 'happy'], emoji: '๐Ÿ˜†' },
{ names: ['sweat_smile', 'exercise'], emoji: '๐Ÿ˜…' },
{ names: ['lol', 'humor'], emoji: '๐Ÿ˜‚' },
{ names: ['rolling_on_the_floor_laughing', 'rofl'], emoji: '๐Ÿคฃ' },
{ names: ['happy', 'content'], emoji: '๐Ÿ˜Š' },
{ names: ['angel', 'halo'], emoji: '๐Ÿ˜‡' },
{ names: ['heart_eyes', 'admiring'], emoji: '๐Ÿ˜' },
{ names: ['smiling_face_with_sunglasses', 'cool'], emoji: '๐Ÿ˜Ž' },
{ names: ['kissing_heart', 'affection'], emoji: '๐Ÿ˜˜' },
{ names: ['thinking_face', 'contemplating'], emoji: '๐Ÿค”' },
{ names: ['fire', 'hot'], emoji: '๐Ÿ”ฅ' },
{ names: ['thumbs_up', 'approval'], emoji: '๐Ÿ‘' },
{ names: ['thumbs_down', 'disapproval'], emoji: '๐Ÿ‘Ž' },
{ names: ['raised_hands', 'celebration'], emoji: '๐Ÿ™Œ' },
{ names: ['clapping_hands', 'applause'], emoji: '๐Ÿ‘' },
{ names: ['heart', 'love'], emoji: 'โค๏ธ' },
{ names: ['broken_heart', 'sad'], emoji: '๐Ÿ’”' },
{ names: ['star', 'sparkle'], emoji: 'โญ' },
{ names: ['rainbow', 'colorful'], emoji: '๐ŸŒˆ' },
{ names: ['sunflower', 'bright'], emoji: '๐ŸŒป' },
{ names: ['pizza', 'delicious'], emoji: '๐Ÿ•' },
{ names: ['coffee', 'caffeine'], emoji: 'โ˜•' },
{ names: ['sun', 'sunny'], emoji: 'โ˜€๏ธ' },
{ names: ['moon', 'night'], emoji: '๐ŸŒ™' },
{ names: ['star-struck', 'excited'], emoji: '๐Ÿคฉ' },
{ names: ['firecracker', 'festive'], emoji: '๐Ÿงจ' },
{ names: ['blossom', 'flower'], emoji: '๐ŸŒธ' },
{ names: ['cookie', 'sweet'], emoji: '๐Ÿช' },
{ names: ['doughnut', 'dessert'], emoji: '๐Ÿฉ' },
{ names: ['taco', 'mexican'], emoji: '๐ŸŒฎ' },
{ names: ['burrito', 'mexican'], emoji: '๐ŸŒฏ' },
{ names: ['ice_cream', 'dessert'], emoji: '๐Ÿจ' },
{ names: ['lollipop', 'candy'], emoji: '๐Ÿญ' },
{ names: ['banana', 'fruit'], emoji: '๐ŸŒ' },
{ names: ['watermelon', 'fruit'], emoji: '๐Ÿ‰' },
{ names: ['avocado', 'healthy'], emoji: '๐Ÿฅ‘' },
{ names: ['eggplant', 'vegetable'], emoji: '๐Ÿ†' },
{ names: ['soccer', 'sport'], emoji: 'โšฝ' },
{ names: ['basketball', 'sport'], emoji: '๐Ÿ€' },
{ names: ['football', 'sport'], emoji: '๐Ÿˆ' },
{ names: ['baseball', 'sport'], emoji: 'โšพ' },
{ names: ['golf', 'sport'], emoji: 'โ›ณ' },
{ names: ['tennis', 'sport'], emoji: '๐ŸŽพ' },
{ names: ['swimmer', 'sport'], emoji: '๐ŸŠ' },
{ names: ['runner', 'sport'], emoji: '๐Ÿƒ' },
{ names: ['biker', 'sport'], emoji: '๐Ÿšด' },
{ names: ['skier', 'sport'], emoji: 'โ›ท๏ธ' },
{ names: ['surfer', 'sport'], emoji: '๐Ÿ„' },
{ names: ['mountain', 'nature'], emoji: 'โ›ฐ๏ธ' },
{ names: ['beach', 'vacation'], emoji: '๐Ÿ–๏ธ' },
{ names: ['camping', 'outdoor'], emoji: '๐Ÿ•๏ธ' },
{ names: ['picnic', 'outdoor'], emoji: '๐Ÿงบ' },
{ names: ['guitar', 'music'], emoji: '๐ŸŽธ' },
{ names: ['saxophone', 'music'], emoji: '๐ŸŽท' },
{ names: ['drum', 'music'], emoji: '๐Ÿฅ' },
{ names: ['movie_camera', 'film'], emoji: '๐ŸŽฅ' },
{ names: ['microphone', 'singing'], emoji: '๐ŸŽค' },
{ names: ['helicopter', 'transport'], emoji: '๐Ÿš' },
{ names: ['car', 'vehicle'], emoji: '๐Ÿš—' },
{ names: ['taxi', 'vehicle'], emoji: '๐Ÿš•' },
{ names: ['bus', 'vehicle'], emoji: '๐ŸšŒ' },
{ names: ['train', 'vehicle'], emoji: '๐Ÿš‚' },
{ names: ['ship', 'transport'], emoji: '๐Ÿšข' },
{ names: ['bicycle', 'transport'], emoji: '๐Ÿšฒ' },
{ names: ['motorcycle', 'transport'], emoji: '๐Ÿ๏ธ' },
{ names: ['rocket', 'space'], emoji: '๐Ÿš€' },
{ names: ['telescope', 'science'], emoji: '๐Ÿ”ญ' },
{ names: ['microscope', 'science'], emoji: '๐Ÿ”ฌ' },
{ names: ['briefcase', 'work'], emoji: '๐Ÿ’ผ' },
{ names: ['toolbox', 'tools'], emoji: '๐Ÿงฐ' },
{ names: ['watch', 'time'], emoji: 'โŒš' },
{ names: ['alarm_clock', 'time'], emoji: 'โฐ' },
{ names: ['umbrella', 'rainy'], emoji: 'โ˜‚๏ธ' },
{ names: ['globe_with_meridians', 'world'], emoji: '๐ŸŒ' },
{ names: ['house', 'home'], emoji: '๐Ÿ ' },
{ names: ['school', 'education'], emoji: '๐Ÿซ' },
{ names: ['hospital', 'health'], emoji: '๐Ÿฅ' },
{ names: ['factory', 'industry'], emoji: '๐Ÿญ' },
{ names: ['bank', 'money'], emoji: '๐Ÿฆ' },
{ names: ['hotel', 'accommodation'], emoji: '๐Ÿจ' },
{ names: ['airport', 'travel'], emoji: '๐Ÿ›ซ' },
{ names: ['beach_umbrella', 'vacation'], emoji: '๐Ÿ–๏ธ' },
{ names: ['tent', 'camping'], emoji: 'โ›บ' },
{ names: ['book', 'knowledge'], emoji: '๐Ÿ“š' },
{ names: ['newspaper', 'news'], emoji: '๐Ÿ“ฐ' },
{ names: ['scroll', 'document'], emoji: '๐Ÿ“œ' },
{ names: ['dollar', 'money'], emoji: '๐Ÿ’ต' },
{ names: ['credit_card', 'payment'], emoji: '๐Ÿ’ณ' },
{ names: ['gem', 'jewelry'], emoji: '๐Ÿ’Ž' },
{ names: ['wrench', 'tools'], emoji: '๐Ÿ”ง' },
{ names: ['hammer', 'tools'], emoji: '๐Ÿ”จ' },
{ names: ['paintbrush', 'art'], emoji: '๐Ÿ–Œ๏ธ' },
{ names: ['scales', 'justice'], emoji: 'โš–๏ธ' },
{ names: ['hourglass', 'time'], emoji: 'โŒ›' },
{ names: ['telephone', 'communication'], emoji: 'โ˜Ž๏ธ' },
{ names: ['camera', 'photography'], emoji: '๐Ÿ“ท' },
{ names: ['gift', 'present'], emoji: '๐ŸŽ' },
{ names: ['mailbox', 'email'], emoji: '๐Ÿ“ซ' },
{ names: ['key', 'lock'], emoji: '๐Ÿ”‘' },
{ names: ['bulb', 'idea'], emoji: '๐Ÿ’ก' },
{ names: ['calendar', 'date'], emoji: '๐Ÿ“…' },
{ names: ['sunny', 'weather'], emoji: 'โ˜€๏ธ' },
{ names: ['cloud', 'weather'], emoji: 'โ˜๏ธ' },
{ names: ['rainbow', 'nature'], emoji: '๐ŸŒˆ' },
{ names: ['tornado', 'weather'], emoji: '๐ŸŒช๏ธ' },
{ names: ['fire', 'danger'], emoji: '๐Ÿ”ฅ' },
{ names: ['warning', 'alert'], emoji: 'โš ๏ธ' },
{ names: ['anchor', 'sea'], emoji: 'โš“' },
{ names: ['mountain', 'nature'], emoji: 'โ›ฐ๏ธ' },
{ names: ['volcano', 'nature'], emoji: '๐ŸŒ‹' },
{ names: ['desert', 'nature'], emoji: '๐Ÿœ๏ธ' },
{ names: ['camping', 'outdoor'], emoji: '๐Ÿ•๏ธ' },
{ names: ['tent', 'camping'], emoji: 'โ›บ' },
{ names: ['park', 'nature'], emoji: '๐Ÿž๏ธ' },
{ names: ['cityscape', 'urban'], emoji: '๐Ÿ™๏ธ' },
{ names: ['house', 'home'], emoji: '๐Ÿ ' },
{ names: ['office', 'work'], emoji: '๐Ÿข' },
{ names: ['hospital', 'health'], emoji: '๐Ÿฅ' },
{ names: ['bank', 'money'], emoji: '๐Ÿฆ' },
{ names: ['hotel', 'accommodation'], emoji: '๐Ÿจ' },
{ names: ['school', 'education'], emoji: '๐Ÿซ' },
{ names: ['factory', 'industry'], emoji: '๐Ÿญ' },
{ names: ['wedding', 'love'], emoji: '๐Ÿ’’' },
{ names: ['church', 'religion'], emoji: 'โ›ช' },
{ names: ['mosque', 'religion'], emoji: '๐Ÿ•Œ' },
{ names: ['synagogue', 'religion'], emoji: '๐Ÿ•' },
{ names: ['shopping_bags', 'shopping'], emoji: '๐Ÿ›๏ธ' },
{ names: ['glasses', 'fashion'], emoji: '๐Ÿ‘“' },
{ names: ['necktie', 'formal'], emoji: '๐Ÿ‘”' },
{ names: ['dress', 'fashion'], emoji: '๐Ÿ‘—' },
{ names: ['t-shirt', 'casual'], emoji: '๐Ÿ‘•' },
{ names: ['jeans', 'casual'], emoji: '๐Ÿ‘–' },
{ names: ['bikini', 'swimwear'], emoji: '๐Ÿ‘™' },
{ names: ['scarf', 'winter'], emoji: '๐Ÿงฃ' },
{ names: ['hat', 'fashion'], emoji: '๐ŸŽฉ' },
{ names: ['crown', 'royalty'], emoji: '๐Ÿ‘‘' },
{ names: ['shoe', 'footwear'], emoji: '๐Ÿ‘ž' },
{ names: ['sandal', 'footwear'], emoji: '๐Ÿ‘ก' },
{ names: ['boot', 'footwear'], emoji: '๐Ÿ‘ข' },
{ names: ['lipstick', 'makeup'], emoji: '๐Ÿ’„' },
{ names: ['ring', 'jewelry'], emoji: '๐Ÿ’' },
{ names: ['pouch', 'bag'], emoji: '๐Ÿ‘' },
{ names: ['backpack', 'bag'], emoji: '๐ŸŽ’' },
{ names: ['shower', 'bathroom'], emoji: '๐Ÿšฟ' },
{ names: ['toilet', 'bathroom'], emoji: '๐Ÿšฝ' },
{ names: ['bed', 'sleep'], emoji: '๐Ÿ›๏ธ' },
{ names: ['couch', 'sofa'], emoji: '๐Ÿ›‹๏ธ' },
{ names: ['lamp', 'light'], emoji: '๐Ÿ’ก' },
{ names: ['tv', 'television'], emoji: '๐Ÿ“บ' },
{ names: ['computer', 'technology'], emoji: '๐Ÿ’ป' },
{ names: ['phone', 'communication'], emoji: '๐Ÿ“ฑ' },
{ names: ['clock', 'time'], emoji: 'โฐ' },
{ names: ['speaker', 'sound'], emoji: '๐Ÿ”Š' },
{ names: ['headphones', 'music'], emoji: '๐ŸŽง' },
{ names: ['microphone', 'audio'], emoji: '๐ŸŽค' },
{ names: ['musical_note', 'music'], emoji: '๐ŸŽต' },
{ names: ['notebook', 'writing'], emoji: '๐Ÿ““' },
{ names: ['calendar', 'date'], emoji: '๐Ÿ“…' },
{ names: ['pencil', 'writing'], emoji: 'โœ๏ธ' },
{ names: ['lock', 'security'], emoji: '๐Ÿ”’' },
{ names: ['key', 'unlock'], emoji: '๐Ÿ”‘' },
{ names: ['camera', 'photography'], emoji: '๐Ÿ“ท' },
{ names: ['video_camera', 'filming'], emoji: '๐Ÿ“น' },
{ names: ['envelope', 'letter'], emoji: 'โœ‰๏ธ' },
{ names: ['penguin', 'animal'], emoji: '๐Ÿง' },
{ names: ['lion', 'animal'], emoji: '๐Ÿฆ' },
{ names: ['frog', 'animal'], emoji: '๐Ÿธ' },
{ names: ['elephant', 'animal'], emoji: '๐Ÿ˜' },
{ names: ['monkey', 'animal'], emoji: '๐Ÿ’' },
{ names: ['chicken', 'animal'], emoji: '๐Ÿ”' },
{ names: ['turtle', 'animal'], emoji: '๐Ÿข' },
{ names: ['snake', 'animal'], emoji: '๐Ÿ' },
{ names: ['horse', 'animal'], emoji: '๐Ÿด' },
{ names: ['cow', 'animal'], emoji: '๐Ÿฎ' },
{ names: ['cat', 'animal'], emoji: '๐Ÿฑ' },
{ names: ['dog', 'animal'], emoji: '๐Ÿถ' },
{ names: ['tree', 'nature'], emoji: '๐ŸŒณ' },
{ names: ['leaf', 'nature'], emoji: '๐Ÿƒ' },
{ names: ['cactus', 'plant'], emoji: '๐ŸŒต' },
{ names: ['cherry_blossom', 'plant'], emoji: '๐ŸŒธ' },
{ names: ['rose', 'flower'], emoji: '๐ŸŒน' },
{ names: ['shell', 'sea'], emoji: '๐Ÿš' },
{ names: ['earth', 'planet'], emoji: '๐ŸŒŽ' },
{ names: ['crescent_moon', 'night'], emoji: '๐ŸŒ™' },
{ names: ['wine_glass', 'drink'], emoji: '๐Ÿท' },
{ names: ['cocktail', 'drink'], emoji: '๐Ÿน' },
{ names: ['beer', 'drink'], emoji: '๐Ÿบ' },
{ names: ['balloon', 'party'], emoji: '๐ŸŽˆ' },
{ names: ['birthday_cake', 'party'], emoji: '๐ŸŽ‚' },
{ names: ['gift', 'present'], emoji: '๐ŸŽ' },
{ names: ['christmas_tree', 'holiday'], emoji: '๐ŸŽ„' },
{ names: ['jack_o_lantern', 'halloween'], emoji: '๐ŸŽƒ' },
{ names: ['flags', 'celebration'], emoji: '๐ŸŽ' },
{ names: ['crown', 'royalty'], emoji: '๐Ÿ‘‘' },
{ names: ['diamond', 'gem'], emoji: '๐Ÿ’Ž' },
{ names: ['alarm_clock', 'morning'], emoji: 'โฐ' },
{ names: ['hourglass', 'time'], emoji: 'โณ' },
{ names: ['puzzle', 'game'], emoji: '๐Ÿงฉ' },
{ names: ['video_game', 'fun'], emoji: '๐ŸŽฎ' },
{ names: ['target', 'game'], emoji: '๐ŸŽฏ' },
{ names: ['art', 'painting'], emoji: '๐ŸŽจ' },
{ names: ['books', 'education'], emoji: '๐Ÿ“š' },
{ names: ['musical_note', 'music'], emoji: '๐ŸŽต' },
{ names: ['headphones', 'music'], emoji: '๐ŸŽง' },
{ names: ['guitar', 'instrument'], emoji: '๐ŸŽธ' },
{ names: ['saxophone', 'instrument'], emoji: '๐ŸŽท' },
{ names: ['drum', 'instrument'], emoji: '๐Ÿฅ' },
{ names: ['microphone', 'singing'], emoji: '๐ŸŽค' },
{ names: ['telescope', 'stargazing'], emoji: '๐Ÿ”ญ' },
{ names: ['movie_camera', 'cinema'], emoji: '๐ŸŽฅ' },
{ names: ['sushi', 'food'], emoji: '๐Ÿฃ' },
{ names: ['pizza', 'food'], emoji: '๐Ÿ•' },
{ names: ['burger', 'food'], emoji: '๐Ÿ”' },
{ names: ['fries', 'food'], emoji: '๐ŸŸ' },
{ names: ['spaghetti', 'food'], emoji: '๐Ÿ' },
{ names: ['ice_cream', 'dessert'], emoji: '๐Ÿฆ' },
{ names: ['doughnut', 'dessert'], emoji: '๐Ÿฉ' },
{ names: ['cookie', 'dessert'], emoji: '๐Ÿช' },
{ names: ['cake', 'dessert'], emoji: '๐Ÿฐ' },
{ names: ['chocolate_bar', 'dessert'], emoji: '๐Ÿซ' },
{ names: ['lollipop', 'candy'], emoji: '๐Ÿญ' },
{ names: ['soccer', 'sport'], emoji: 'โšฝ' },
{ names: ['basketball', 'sport'], emoji: '๐Ÿ€' },
{ names: ['football', 'sport'], emoji: '๐Ÿˆ' },
{ names: ['baseball', 'sport'], emoji: 'โšพ' },
{ names: ['tennis', 'sport'], emoji: '๐ŸŽพ' },
{ names: ['golf', 'sport'], emoji: 'โ›ณ' },
{ names: ['bicycle', 'transport'], emoji: '๐Ÿšฒ' },
{ names: ['airplane', 'transport'], emoji: 'โœˆ๏ธ' },
{ names: ['bus', 'transport'], emoji: '๐ŸšŒ' },
{ names: ['train', 'transport'], emoji: '๐Ÿš‚' },
{ names: ['taxi', 'transport'], emoji: '๐Ÿš•' },
{ names: ['rocket', 'space'], emoji: '๐Ÿš€' },
{ names: ['anchor', 'nautical'], emoji: 'โš“' },
{ names: ['umbrella', 'rain'], emoji: 'โ˜”' },
{ names: ['sunny', 'weather'], emoji: 'โ˜€๏ธ' },
{ names: ['cloud', 'weather'], emoji: 'โ˜๏ธ' },
{ names: ['rainbow', 'weather'], emoji: '๐ŸŒˆ' },
{ names: ['snowman', 'winter'], emoji: 'โ›„' },
{ names: ['gift', 'celebration'], emoji: '๐ŸŽ' },
{ names: ['party_popper', 'celebration'], emoji: '๐ŸŽ‰' },
{ names: ['balloon', 'celebration'], emoji: '๐ŸŽˆ' },
{ names: ['fireworks', 'celebration'], emoji: '๐ŸŽ†' },
{ names: ['sparkler', 'celebration'], emoji: '๐ŸŽ‡' },
{ names: ['Christmas_tree', 'holiday'], emoji: '๐ŸŽ„' },
{ names: ['jack-o-lantern', 'holiday'], emoji: '๐ŸŽƒ' },
{ names: ['birthday_cake', 'celebration'], emoji: '๐ŸŽ‚' },
{ names: ['flag', 'country'], emoji: '๐Ÿณ๏ธ' },
{ names: ['crossed_flags', 'celebration'], emoji: '๐ŸŽŒ' },
{ names: ['rose', 'flower'], emoji: '๐ŸŒน' },
{ names: ['sunflower', 'flower'], emoji: '๐ŸŒป' },
{ names: ['cherry_blossom', 'flower'], emoji: '๐ŸŒธ' },
{ names: ['hibiscus', 'flower'], emoji: '๐ŸŒบ' },
{ names: ['maple_leaf', 'nature'], emoji: '๐Ÿ' },
{ names: ['fallen_leaf', 'nature'], emoji: '๐Ÿ‚' },
{ names: ['leaf_fluttering_in_wind', 'nature'], emoji: '๐Ÿƒ' },
{ names: ['mushroom', 'nature'], emoji: '๐Ÿ„' },
{ names: ['cactus', 'nature'], emoji: '๐ŸŒต' },
{ names: ['palm_tree', 'nature'], emoji: '๐ŸŒด' },
{ names: ['evergreen_tree', 'nature'], emoji: '๐ŸŒฒ' },
{ names: ['deciduous_tree', 'nature'], emoji: '๐ŸŒณ' },
{ names: ['mountain', 'nature'], emoji: 'โ›ฐ๏ธ' },
{ names: ['volcano', 'nature'], emoji: '๐ŸŒ‹' },
{ names: ['desert', 'nature'], emoji: '๐Ÿœ๏ธ' },
{ names: ['beach_with_umbrella', 'nature'], emoji: '๐Ÿ–๏ธ' },
{ names: ['bridge_at_night', 'scenery'], emoji: '๐ŸŒ‰' },
{ names: ['cityscape', 'scenery'], emoji: '๐Ÿ™๏ธ' },
{ names: ['sunset', 'scenery'], emoji: '๐ŸŒ‡' },
{ names: ['rainbow', 'scenery'], emoji: '๐ŸŒˆ' },
{ names: ['night_with_stars', 'scenery'], emoji: '๐ŸŒƒ' },
{ names: ['milky_way', 'scenery'], emoji: '๐ŸŒŒ' },
{ names: ['stars', 'scenery'], emoji: '๐ŸŒ ' },
{ names: ['thermometer', 'weather'], emoji: '๐ŸŒก๏ธ' },
{ names: ['snowflake', 'weather'], emoji: 'โ„๏ธ' },
{ names: ['fire', 'element'], emoji: '๐Ÿ”ฅ' },
{ names: ['droplet', 'element'], emoji: '๐Ÿ’ง' },
{ names: ['water_wave', 'nature'], emoji: '๐ŸŒŠ' }


];

// Create emoji picker element
var emojiPicker = document.createElement('div');
emojiPicker.id = 'emoji-picker';
emojiPicker.style.display = 'none'; // Hide the picker by default
emojiPicker.style.position = 'fixed';
emojiPicker.style.width = '30%'; // Half the screen's width
emojiPicker.style.height = '30%'; // Half the screen's height
emojiPicker.style.overflow = 'scroll'; // Add scroll bar if content exceeds the limit
emojiPicker.style.backgroundColor = 'white';
emojiPicker.style.border = '1px solid black';
emojiPicker.style.padding = '15px';

// Set the default position of the emojiPicker (center of the page)
var defaultXPos = '50%'; // Set the default X position of the emojiPicker
var defaultYPos = '50%'; // Set the default Y position of the emojiPicker
emojiPicker.style.left = defaultXPos;
emojiPicker.style.top = defaultYPos;
emojiPicker.style.transform = 'translate(-50%, -50%)';

// Function to handle emoji picker drag
function handleEmojiPickerDrag(event) {
var emojiPickerRect = emojiPicker.getBoundingClientRect();
var offsetX = event.clientX - emojiPickerRect.width / 2;
var offsetY = event.clientY - emojiPickerRect.height / 2;
emojiPicker.style.left = offsetX + 'px';
emojiPicker.style.top = offsetY + 'px';
}

// Event listeners for emoji picker drag
emojiPicker.addEventListener('mousedown', function (event) {
document.addEventListener('mousemove', handleEmojiPickerDrag);
});

document.addEventListener('mouseup', function () {
document.removeEventListener('mousemove', handleEmojiPickerDrag);
});

// Function to reset the emoji picker position to the default position
function resetEmojiPickerPosition() {
emojiPicker.style.left = defaultXPos;
emojiPicker.style.top = defaultYPos;
emojiPicker.style.transform = 'translate(-50%, -50%)';
}

// Function to save the emoji picker position in local storage
function saveEmojiPickerPosition() {
var emojiPickerPosition = {
x: emojiPicker.style.left,
y: emojiPicker.style.top
};
localStorage.setItem('emojiPickerPosition', JSON.stringify(emojiPickerPosition));
}

// Function to load and apply the saved emoji picker position from local storage
function loadEmojiPickerPosition() {
var emojiPickerPosition = JSON.parse(localStorage.getItem('emojiPickerPosition'));
if (emojiPickerPosition) {
emojiPicker.style.left = emojiPickerPosition.x;
emojiPicker.style.top = emojiPickerPosition.y;
}
}

// Event listener to reset the emoji picker position on page refresh
window.addEventListener('beforeunload', resetEmojiPickerPosition);

// Event listener to save the emoji picker position on window unload
window.addEventListener('beforeunload', saveEmojiPickerPosition);

// Load and apply the saved emoji picker position on page load
window.addEventListener('DOMContentLoaded', loadEmojiPickerPosition);

// Create search box
var searchBox = document.createElement('input');
searchBox.type = 'text';
searchBox.placeholder = 'Search...';
searchBox.style.display = 'block'; // Make sure the search box is a block element
searchBox.oninput = function () {
var filter = this.value.toLowerCase();
emojiPicker.querySelectorAll('span').forEach(function (span) {
var names = span.dataset.names.split(',');
span.style.display = names.some(name => name.includes(filter)) ? '' : 'none';
});
};
emojiPicker.appendChild(searchBox);

// Append emoji picker to the document body
document.body.appendChild(emojiPicker);

// Rest of your code...

// Populate emoji picker with emojis
for (let {names, emoji} of emojis) {
let emojiSpan = document.createElement('span');
emojiSpan.textContent = emoji;
emojiSpan.dataset.names = names.join(',');
emojiSpan.style.cursor = 'pointer';
emojiSpan.style.marginRight = '10px';
emojiSpan.style.display = 'inline-block'; // Make sure the emoji spans are inline-block elements
emojiSpan.addEventListener('click', function () {
var textArea = document.querySelector('#msgTxtInput');
textArea.value += emoji;
emojiPicker.style.display = 'none'; // Hide picker after choosing emoji
resetButton(); // Reset button position and color after choosing an emoji
});
emojiPicker.appendChild(emojiSpan);
}

function resetButton() {
button.style.top = '759px';
button.style.left = '1800px';
button.style.backgroundColor = 'black';
button.style.color = 'white';
}

// Function to show/hide emoji picker
function toggleEmojiPicker() {
var isHidden = emojiPicker.style.display === 'none';
if (isHidden) {
// Move button and change color when picker is opened
button.style.top = '759px';
button.style.left = '1800px';
button.style.backgroundColor = 'blue';
button.style.color = 'white';
emojiPicker.style.display = 'block'; // Show picker
} else {
emojiPicker.style.display = 'none'; // Hide picker
resetButton();
}
}

// Create button
var button = document.createElement('button');
button.textContent = 'Emojis';
button.style.position = 'fixed';
button.style.left = '1800px';
button.style.top = '759px';
button.style.fontFamily = 'Century Gothic, sans-serif';
button.style.fontSize = '15pt';
button.onclick = toggleEmojiPicker;
document.body.appendChild(button);
}
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesnโ€™t require installation. Just write and share note!

Short: Notes.ioโ€™s url just 8 character. Youโ€™ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.