Advertisement
Guest User

Bluesky Feed to Emoji

a guest
Nov 27th, 2024
12
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JavaScript 1.13 KB | Source Code | 0 0
  1. // ==UserScript==
  2. // @name         BskyFeedToEmote
  3. // @namespace    http://wutata.bsky.social/
  4. // @version      2024-11-27
  5. // @description  Change Feed names to emotes
  6. // @author       Wu Atnium
  7. // @match        https://bsky.app/*
  8. // @icon         https://www.google.com/s2/favicons?sz=64&domain=bsky.app
  9. // @grant        none
  10. // @require      https://code.jquery.com/jquery-3.7.0.min.js
  11. // @require      https://gist.github.com/raw/2625891/waitForKeyElements.js
  12. // ==/UserScript==
  13.  
  14. /* globals jQuery, $, waitForKeyElements */
  15.  
  16. waitForKeyElements('div[data-testid^="homeScreenFeedTabs-"]', feedTabby);
  17.  
  18. var nameLookup = {
  19.     Discover: 'πŸ¦‹',
  20.     Following: '😎',
  21.     Mutuals: 'πŸ‘―β€β™€οΈ',
  22.     "Quiet Posters": '😴',
  23.     "Popular With Friends": '🀴'
  24. };
  25.  
  26. function feedTabby(jnode)
  27. {
  28.     if(jnode.length == 0 || jnode[0].dataset.testid.startsWith("homeScreenFeedTabs-selector"))
  29.     {
  30.         return;
  31.     }
  32.  
  33.     var type = jnode[0].dataset.testid.substr(jnode[0].dataset.testid.lastIndexOf('-')+1);
  34.     if(type in nameLookup)
  35.     {
  36.         jnode[0].innerHTML = nameLookup[type];
  37.         console.log(jnode);
  38.     }
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement