Advertisement
Crypto_Library

[ADD] Some Hidden Emojis on the line for Emoji lovers ;)

Oct 19th, 2023 (edited)
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.42 KB | Source Code | 0 0
  1. // ==UserScript==
  2. // @name Additional Emojis for BTT
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1
  5. // @description Add additional emojis to BitcoinTalk
  6. // @author Crypto Library
  7. // @match https://bitcointalk.org/index.php?action=post*
  8. // @icon https://i.postimg.cc/mDMhNQDS/Crypto-Library-6.gif
  9. // @grant none
  10. // ==/UserScript==
  11.  
  12. (function() {
  13. 'use strict';
  14. const emojis = {
  15. 'evil': '>:D',
  16. 'afro': 'O0',
  17. 'police': 'C\:-)',
  18. 'azn': '^-\^',
  19. 'angel': '0\:)',
  20. // Add more emojis as needed
  21. };
  22. function addEmojis() {
  23. const emojiContainer = document.querySelector("#postmodify > table.bordercolor > tbody > tr:nth-child(2) > td > table > tbody > tr:nth-child(6) > td:nth-child(2)");
  24. for (const [emojiName, emojiText] of Object.entries(emojis)) {
  25. const emojiElement = document.createElement('a');
  26. emojiElement.href = "javascript:void(0);";
  27. emojiElement.onclick = function() {
  28. replaceText(emojiText, document.forms.postmodify.message);
  29. return false;
  30. };
  31. emojiElement.innerHTML = `<img src="https://bitcointalk.org/Smileys/default/${emojiName}.gif" align="bottom" alt="${emojiName}" title="${emojiName}">`;
  32. emojiContainer.appendChild(emojiElement);
  33. }
  34. }
  35. addEmojis();
  36. })();
  37.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement