NTComps Klavia Monkey Theme

Klavia Monkey Theme for https://www.ntcomps.com

当前为 2025-03-30 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name NTComps Klavia Monkey Theme
  3. // @version 2024-03-27
  4. // @namespace https://greasyfork.org/users/1331131-tensorflow-dvorak
  5. // @description Klavia Monkey Theme for https://www.ntcomps.com
  6. // @author TensorFlow - Dvorak
  7. // @match *://*.ntcomps.com/*
  8. // @license MIT
  9. // ==/UserScript==
  10.  
  11. (function() {
  12. 'use strict';
  13.  
  14. function applyCustomStyles() {
  15. let style = document.getElementById('custom-typing-styles');
  16. if (!style) {
  17. style = document.createElement('style');
  18. style.id = 'custom-typing-styles';
  19. document.head.appendChild(style);
  20. }
  21. style.innerHTML = `
  22. body {
  23. background-color: #000000 !important;
  24. }
  25. #typing-text-container {
  26. font-size: 90px !important;
  27. height: fit-content !important;
  28. background-color: #060516 !important;
  29. width: 100% !important;
  30. max-width: 100% !important;
  31. font-family: monospace;
  32. }
  33. #typing-text {
  34. font-size: 90px !important;
  35. width: 93% !important;
  36. max-width: 100% !important;
  37. }
  38. #dashboard {
  39. height: 20rem !important;
  40. max-height: 1000px !important;
  41. background-color: #060516 !important;
  42. width: 100% !important;
  43. max-width: 100% !important;
  44. }
  45. #game-container {
  46. height: fit-content !important;
  47. width: 80% !important;
  48. max-width: 80% !important;
  49. }
  50. #dashboard[data-bs-theme=dark] #typing-text {
  51. color: #acaaff !important;
  52. }
  53. #canvas-container, #track {
  54. width: 100% !important;
  55. max-width: 100% !important;
  56. }
  57. #content {
  58. width: 100% !important;
  59. max-width: 100% !important;
  60. }
  61. `;
  62. }
  63.  
  64. const observer = new MutationObserver(() => {
  65. if (document.getElementById('typing-text-container')) {
  66. applyCustomStyles();
  67. }
  68. const canvasContainer = document.getElementById('canvas-container');
  69. const track = document.getElementById('track');
  70. if (canvasContainer && track) {
  71. canvasContainer.style.width = '100%';
  72. track.style.width = '100%';
  73. }
  74. });
  75.  
  76. observer.observe(document.body, { childList: true, subtree: true });
  77. applyCustomStyles();
  78. })();
  79.  
  80.