gz_ui_css-v1

个人自用样式

Fra 18.11.2024. Se den seneste versjonen.

Dette scriptet burde ikke installeres direkte. Det er et bibliotek for andre script å inkludere med det nye metadirektivet // @require https://update.greatest.deepsurf.us/scripts/517928/1486526/gz_ui_css-v1.js

  1. // ==UserScript==
  2. // @name gz_ui_css-v1
  3. // @namespace http://tampermonkey.net/
  4. // @homepageURL https://space.bilibili.com/473239155
  5. // @license Apache-2.0
  6. // @version 0.2
  7. // @author byhgz
  8. // @description 个人自用样式
  9. // @noframes
  10. // ==/UserScript==
  11.  
  12. (function () {
  13. const styleEl = document.querySelector("style[gz_style]");
  14. if (styleEl !== null) {
  15. console.log("已有gz_style样式,故不再插入该样式内容");
  16. return;
  17. }
  18. const style = document.createElement('style');
  19. style.setAttribute("gz_style","");
  20. style.textContent=`
  21. button[gz_type] {
  22. display: inline-block;
  23. line-height: 1;
  24. white-space: nowrap;
  25. cursor: pointer;
  26. background: #fff;
  27. border: 1px solid #dcdfe6;
  28. color: #606266;
  29. -webkit-appearance: none;
  30. text-align: center;
  31. box-sizing: border-box;
  32. outline: none;
  33. margin: 0;
  34. transition: .1s;
  35. font-weight: 500;
  36. -moz-user-select: none;
  37. -webkit-user-select: none;
  38. -ms-user-select: none;
  39. padding: 12px 20px;
  40. font-size: 14px;
  41. border-radius: 4px;
  42. }
  43.  
  44. button[gz_type="primary"] {
  45. color: #fff;
  46. background-color: #409eff;
  47. border-color: #409eff;
  48. }
  49.  
  50. button[gz_type="success"] {
  51. color: #fff;
  52. background-color: #67c23a;
  53. border-color: #67c23a;
  54. }
  55.  
  56. button[gz_type="info"] {
  57. color: #fff;
  58. background-color: #909399;
  59. border-color: #909399;
  60. }
  61.  
  62. button[gz_type="warning"] {
  63. color: #fff;
  64. background-color: #e6a23c;
  65. border-color: #e6a23c;
  66. }
  67.  
  68. button[gz_type="danger"] {
  69. color: #fff;
  70. background-color: #f56c6c;
  71. border-color: #f56c6c;
  72. }
  73.  
  74. button[border] {
  75. border-radius: 20px;
  76. padding: 12px 23px;
  77. }
  78. `;
  79. document.head.appendChild(style);
  80. })();