Klavia Monkey Theme

Klavia Monkey Typing Theme

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

  1. // ==UserScript==
  2. // @name Klavia Monkey Theme
  3. // @version 2024-03-26
  4. // @namespace https://greasyfork.org/users/1331131-tensorflow-dvorak
  5. // @description Klavia Monkey Typing Theme
  6. // @author TensorFlow - Dvorak
  7. // @match *://www.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. }
  32. #typing-text {
  33. font-size: 90px !important;
  34. width: 93% !important;
  35. max-width: 100% !important;
  36. }
  37. #dashboard {
  38. height: 30rem !important;
  39. max-height: 1000px !important;
  40. background-color: #060516 !important;
  41. width: 100% !important;
  42. max-width: 100% !important;
  43. }
  44. #game-container {
  45. height: fit-content !important;
  46. width: 80% !important;
  47. max-width: 80% !important;
  48. }
  49. #dashboard[data-bs-theme=dark] #typing-text {
  50. color: #acaaff !important;
  51. }
  52. #canvas-container, #track {
  53. width: 100% !important;
  54. max-width: 100% !important;
  55. }
  56. #content {
  57. width: 100% !important;
  58. max-width: 100% !important;
  59. }
  60. `;
  61. }
  62.  
  63. const observer = new MutationObserver(() => {
  64. if (document.getElementById('typing-text-container')) {
  65. applyCustomStyles();
  66. }
  67. const canvasContainer = document.getElementById('canvas-container');
  68. const track = document.getElementById('track');
  69. if (canvasContainer && track) {
  70. canvasContainer.style.width = '100%';
  71. track.style.width = '100%';
  72. }
  73. });
  74.  
  75. observer.observe(document.body, { childList: true, subtree: true });
  76. applyCustomStyles();
  77. })();
  78.  
  79.