NTComps Klavia Monkey Theme

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

目前为 2025-04-14 提交的版本,查看 最新版本

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