Hello, User!

Brings back the thing where roblox welcomed you.

  1. // ==UserScript==
  2. // @name Hello, User!
  3. // @namespace https://github.com/anthony1x6000/ROBLOX2016stylus
  4. // @version 0.1
  5. // @description Brings back the thing where roblox welcomed you.
  6. // @author anthony1x6000
  7. // @license MIT License: https://github.com/anthony1x6000/ROBLOX2016stylus/blob/main/LICENSE
  8. // @match https://www.roblox.com/home
  9. // @icon https://www.google.com/s2/favicons?sz=64&domain=roblox.com
  10. // @grant none
  11. // ==/UserScript==
  12.  
  13. (function() {
  14. 'use strict';
  15. document.querySelector("#HomeContainer > div.section > div > h1").style = "font-size: 5px; visibility: hidden;";
  16. const homeID = document.querySelector("#HomeContainer > div.section");
  17. const newDiv = document.createElement("div");
  18. let userId = document.getElementsByName('user-data')[0].getAttribute('data-userid');
  19. let userName = document.getElementsByName('user-data')[0].getAttribute('data-name');
  20. let userDisplayName = document.getElementsByName('user-data')[0].getAttribute('data-displayName');
  21. newDiv.setAttribute("id", "newdiv");
  22. const NA = "https://t3.rbxcdn.com/894dca84231352d56ec346174a3c0cf9";
  23. const profileAVClass = `
  24. height: 128px;
  25. width: 128px;
  26. margin-right: 15px;
  27. margin-bottom: 0px;
  28. `;
  29. const displayNameClass = `
  30. font-size: 30px;
  31. margin-top: calc(128px / 3);
  32. `;
  33. homeID.parentNode.insertBefore(newDiv, homeID);
  34. newDiv.innerHTML = `
  35. <a class="dynamic-overflow-container text-nav" href="https://www.roblox.com/users/${userId}/profile" role="link">
  36. <span id="profileAV" class="avatar avatar-headshot-xs" style="${profileAVClass}">
  37. <span class="thumbnail-2d-container avatar-card-image">
  38. <img id="userAV" class="" src="${NA}" alt="${userName}" title="${userName}">
  39. </span>
  40. </span>
  41. <div id="displayName" class="font-header-2 dynamic-ellipsis-item" style="${displayNameClass}">Hello, ${userDisplayName}!</div>
  42. </a>
  43. `;
  44.  
  45. window.addEventListener('load', function() { // Wait for page load
  46. const profileAV = document.querySelector("#navigation > ul > li:nth-child(1) > a > span > span > img").src;
  47. const userAVID = document.getElementById("userAV");
  48. userAVID.src = profileAV;
  49. }, false);
  50. })();