TPlacella

FRHD Grid Colour Changer

Jan 6th, 2025
7
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. // ==UserScript==
  2. // @name frhd grid colour changer
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.0.0
  5. // @description Changes the grid color
  6. // @author revelcw
  7. // @match https://www.freeriderhd.com
  8. // @include /^https?:\/\/(www\.)?freeriderhd\.com
  9. // @icon https://www.google.com/s2/favicons?domain=freeriderhd.com
  10. // @grant none
  11. // ==/UserScript==
  12.  
  13. (function() {
  14. 'use strict';
  15. let url;
  16. setInterval(() => {
  17. if (
  18. window.location.href !== url &&
  19. window.location.href.startsWith('https://www.freeriderhd.com/create')
  20. ) {
  21. main();
  22. }
  23. url = window.location.href;
  24. }, 1000);
  25.  
  26. const main = async () => {
  27. let timer = setInterval(() => {
  28. if (
  29. document.querySelector(
  30. '#game-container > div > div.topMenu.unselectable'
  31. )
  32. ) {
  33. clearInterval(timer);
  34. // below here in the grid major line color, place the hex code (simplified only) in place of #0FF.
  35. GameManager.game.currentScene.toolHandler.options.gridMajorLineColor = '#0FF';
  36. }
  37. });
  38. };
  39. })();
Advertisement
Add Comment
Please, Sign In to add comment