Guest User

Untitled

a guest
Jun 29th, 2026
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name         HN - Label TeMPOraL πŸ€–
  3. // @namespace    https://example.com
  4. // @version      1.0
  5. // @description  Adds a conspicuous emoji label after TeMPOraL's username on Hacker News.
  6. // @match        https://news.ycombinator.com/*
  7. // @grant        none
  8. // ==/UserScript==
  9.  
  10. (function () {
  11.     "use strict";
  12.  
  13.     const TARGET = "TeMPOraL";
  14.     const LABEL = " πŸ€–πŸŽΊπŸ¦Ύ";
  15.  
  16.     function labelUsers() {
  17.         document.querySelectorAll("a.hnuser").forEach(el => {
  18.             if (el.textContent.trim() !== TARGET) return;
  19.             if (el.dataset.temporalLabeled) return;
  20.  
  21.             el.dataset.temporalLabeled = "1";
  22.  
  23.             const tag = document.createElement("span");
  24.             tag.textContent = LABEL;
  25.             tag.style.fontWeight = "bold";
  26.             tag.style.fontSize = "1.1em";
  27.             tag.style.marginLeft = "0.25em";
  28.  
  29.             el.after(tag);
  30.         });
  31.     }
  32.  
  33.     labelUsers();
  34.  
  35.     const observer = new MutationObserver(labelUsers);
  36.     observer.observe(document.body, {
  37.         childList: true,
  38.         subtree: true
  39.     });
  40. })();
Tags: hacker news
Advertisement
Add Comment
Please, Sign In to add comment