Notes
Notes - notes.io |
// @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...
// Create button
var button = document.createElement('button');
button.textContent = 'Emojis';
button.style.position = 'fixed';
button.style.left = '550px';
button.style.top = '759px';
button.style.fontFamily = 'Century Gothic, sans-serif';
button.style.fontSize = '15pt';
button.onclick = toggleEmojiPicker;
document.body.appendChild(button);
// Function to handle button drag
function handleButtonDrag(event) {
var buttonRect = button.getBoundingClientRect();
var offsetX = event.clientX - buttonRect.width / 2;
var offsetY = event.clientY - buttonRect.height / 2;
button.style.left = offsetX + 'px';
button.style.top = offsetY + 'px';
}
// Event listeners for button drag
button.addEventListener('mousedown', function (event) {
document.addEventListener('mousemove', handleButtonDrag);
});
document.addEventListener('mouseup', function () {
document.removeEventListener('mousemove', handleButtonDrag);
});
// Function to reset the button position to the default position
function resetButtonPosition() {
button.style.left = '550px';
button.style.top = '759px';
}
// Function to save the button position in local storage
function saveButtonPosition() {
var buttonPosition = {
x: button.style.left,
y: button.style.top
};
localStorage.setItem('buttonPosition', JSON.stringify(buttonPosition));
}
// Function to load and apply the saved button position from local storage
function loadButtonPosition() {
var buttonPosition = JSON.parse(localStorage.getItem('buttonPosition'));
if (buttonPosition) {
button.style.left = buttonPosition.x;
button.style.top = buttonPosition.y;
}
}
// Event listener to reset the button position on page refresh
window.addEventListener('beforeunload', resetButtonPosition);
// Event listener to save the button position on window unload
window.addEventListener('beforeunload', saveButtonPosition);
// Load and apply the saved button position on page load
window.addEventListener('DOMContentLoaded', loadButtonPosition);
// 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 to show/hide emoji picker
function toggleEmojiPicker() {
var isHidden = emojiPicker.style.display === 'none';
if (isHidden) {
// Save the current position of rectangle_x
var rectanglePosition = {
x: button.style.left,
y: button.style.top
};
// Show emoji picker at a fixed position
emojiPicker.style.left = '50%'; // Set the desired X position of the emojiPicker
emojiPicker.style.top = '50%'; // Set the desired Y position of the emojiPicker
emojiPicker.style.transform = 'translate(-50%, -50%)';
button.style.backgroundColor = 'blue';
button.style.color = 'white';
emojiPicker.style.display = 'block'; // Show picker
} else {
emojiPicker.style.display = 'none'; // Hide picker
resetButton();
}
}
}
|
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