Change font to old

Made by TheMoon

  1. // ==UserScript==
  2. // @name Change font to old
  3. // @namespace http://tampermonkey.net/
  4. // @version 2024-04-19
  5. // @description Made by TheMoon
  6. // @author You
  7. // @match https://*.roblox.com/*
  8. // @icon https://www.google.com/s2/favicons?sz=64&domain=roblox.com
  9. // @grant none
  10. // @license TheMoonSir - Change from new font to old font
  11. // ==/UserScript==
  12.  
  13. (function() {
  14. 'use strict';
  15.  
  16. function changeFontFamilyInCSS(cssRules, fontFamilyToChange, newFontFamily) {
  17. for (var i = 0; i < cssRules.length; i++) {
  18. var rule = cssRules[i];
  19. if (rule.selectorText && rule.selectorText.indexOf('.builder-font') !== -1) {
  20. rule.style.fontFamily = rule.style.fontFamily.replace(fontFamilyToChange, newFontFamily);
  21. }
  22. }
  23. }
  24.  
  25. var cssFile = 'https://css.rbxcdn.com/aa78e65cb877e92d8c8b6b41a7715271d322530edabcf2c41f7510b5a956c637.css';
  26. var xhr = new XMLHttpRequest();
  27. xhr.open('GET', cssFile, true);
  28. xhr.onreadystatechange = function() {
  29. if (xhr.readyState === 4 && xhr.status === 200) {
  30. var cssText = xhr.responseText;
  31. var styleElement = document.createElement('style');
  32. styleElement.type = 'text/css';
  33. styleElement.appendChild(document.createTextNode(cssText));
  34. document.head.appendChild(styleElement);
  35. var cssRules = styleElement.sheet.cssRules || styleElement.sheet.rules;
  36. changeFontFamilyInCSS(cssRules, 'Builder Sans', 'HCo Gotham SSm');
  37. }
  38. };
  39. xhr.send(null);
  40. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址