menu style aa

menu for me

此腳本不應該直接安裝,它是一個供其他腳本使用的函式庫。欲使用本函式庫,請在腳本 metadata 寫上: // @require https://update.gf.qytechs.cn/scripts/494389/1373024/menu%20style%20aa.js

  1. // ==UserScript==
  2. // @name menu style aa
  3. // @description menu for me
  4. // @author Blobby5785
  5. // @license MIT
  6. // ==/UserScript==
  7.  
  8. (function() {
  9. 'use strict';
  10.  
  11. // Inject CSS styles
  12. const cssStyles = `
  13. #modMenus {
  14. display: block;
  15. padding: 5px;
  16. background-color: rgba(0, 0, 0, 0.25);
  17. border-radius: 4px;
  18. position: absolute;
  19. left: 0;
  20. top: 0;
  21. min-width: 5px;
  22. max-width: 100px;
  23. min-height: 5px;
  24. max-height: 200px;
  25. }
  26.  
  27. .menuItem {
  28. display: block;
  29. margin-bottom: 5px;
  30. }
  31.  
  32. .menuItemLabel {
  33. color: #fff;
  34. font-size: 12px;
  35. cursor: pointer;
  36. }
  37. `;
  38.  
  39. const styleElement = document.createElement('style');
  40. styleElement.textContent = cssStyles;
  41. document.head.appendChild(styleElement);
  42.  
  43. const modMenus = document.createElement('div');
  44. modMenus.id = 'modMenus';
  45. document.body.appendChild(modMenus);
  46.  
  47. const menuItems = document.createElement('div');
  48. menuItems.id = 'menuItems';
  49. modMenus.appendChild(menuItems);
  50.  
  51. const menuItem = document.createElement('label');
  52. menuItem.classList.add('menuItem');
  53.  
  54. const checkboxInput = document.createElement('input');
  55. checkboxInput.type = 'checkbox';
  56. checkboxInput.id = 'steal';
  57. menuItem.appendChild(checkboxInput);
  58.  
  59. const menuItemLabel = document.createElement('span');
  60. menuItemLabel.classList.add('menuItemLabel');
  61. menuItemLabel.textContent = 'Steal';
  62. menuItem.appendChild(menuItemLabel);
  63.  
  64. menuItems.appendChild(menuItem);
  65. })();

QingJ © 2025

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