Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name Additional Emojis for BTT
- // @namespace http://tampermonkey.net/
- // @version 0.1
- // @description Add additional emojis to BitcoinTalk
- // @author Crypto Library
- // @match https://bitcointalk.org/index.php?action=post*
- // @icon https://i.postimg.cc/mDMhNQDS/Crypto-Library-6.gif
- // @grant none
- // ==/UserScript==
- (function() {
- 'use strict';
- const emojis = {
- 'evil': '>:D',
- 'afro': 'O0',
- 'police': 'C\:-)',
- 'azn': '^-\^',
- 'angel': '0\:)',
- // Add more emojis as needed
- };
- function addEmojis() {
- const emojiContainer = document.querySelector("#postmodify > table.bordercolor > tbody > tr:nth-child(2) > td > table > tbody > tr:nth-child(6) > td:nth-child(2)");
- for (const [emojiName, emojiText] of Object.entries(emojis)) {
- const emojiElement = document.createElement('a');
- emojiElement.href = "javascript:void(0);";
- emojiElement.onclick = function() {
- replaceText(emojiText, document.forms.postmodify.message);
- return false;
- };
- emojiElement.innerHTML = `<img src="https://bitcointalk.org/Smileys/default/${emojiName}.gif" align="bottom" alt="${emojiName}" title="${emojiName}">`;
- emojiContainer.appendChild(emojiElement);
- }
- }
- addEmojis();
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement