styles

岐黄天使刷课助手的样式定义模块,提供脚本界面的CSS样式。

此脚本不应直接安装。它是供其他脚本使用的外部库,要使用该库请加入元指令 // @require https://update.gf.qytechs.cn/scripts/537079/1595076/styles.js

  1. // ==UserScript==
  2. // @name 岐黄天使刷课助手 - 样式模块
  3. // @namespace http://tampermonkey.net/qhtx-modules
  4. // @version 1.3.1
  5. // @description 岐黄天使刷课助手的样式定义模块,提供脚本界面的CSS样式。
  6. // @author AI助手
  7. // ==/UserScript==
  8.  
  9. // 样式模块
  10. (function() {
  11. 'use strict';
  12.  
  13. // 添加样式
  14. function applyStyles() {
  15. GM_addStyle(`
  16. .qh-assistant-panel {
  17. position: fixed;
  18. top: 100px;
  19. right: 10px;
  20. width: 280px;
  21. background: linear-gradient(135deg, #00a8cc, #0062bd);
  22. border-radius: 12px;
  23. padding: 15px;
  24. color: white;
  25. z-index: 9999;
  26. font-size: 14px;
  27. box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  28. transition: all 0.3s ease;
  29. border: 1px solid rgba(255, 255, 255, 0.2);
  30. }
  31. .qh-assistant-panel:hover {
  32. box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  33. transform: translateY(-2px);
  34. }
  35. .qh-assistant-title {
  36. font-size: 18px;
  37. font-weight: bold;
  38. text-align: center;
  39. margin-bottom: 12px;
  40. border-bottom: 2px solid rgba(255, 255, 255, 0.3);
  41. padding-bottom: 8px;
  42. position: relative;
  43. text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
  44. }
  45. .qh-assistant-close {
  46. position: absolute;
  47. top: 0;
  48. right: 0;
  49. cursor: pointer;
  50. font-size: 16px;
  51. opacity: 0.8;
  52. transition: opacity 0.2s;
  53. }
  54. .qh-assistant-close:hover {
  55. opacity: 1;
  56. }
  57. .qh-assistant-content {
  58. margin-bottom: 12px;
  59. background-color: rgba(255, 255, 255, 0.1);
  60. padding: 10px;
  61. border-radius: 8px;
  62. }
  63. .qh-assistant-content div {
  64. margin-bottom: 6px;
  65. display: flex;
  66. justify-content: space-between;
  67. }
  68. .qh-assistant-content div span:first-child {
  69. font-weight: bold;
  70. margin-right: 5px;
  71. }
  72. .qh-assistant-progress {
  73. margin-top: 8px;
  74. height: 12px;
  75. background-color: rgba(255, 255, 255, 0.2);
  76. border-radius: 10px;
  77. overflow: hidden;
  78. box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
  79. }
  80. .qh-assistant-progress-bar {
  81. height: 100%;
  82. background: linear-gradient(90deg, #4CAF50, #8BC34A);
  83. width: 0%;
  84. transition: width 0.5s;
  85. border-radius: 10px;
  86. box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  87. }
  88. .qh-assistant-btn {
  89. background: linear-gradient(90deg, #4CAF50, #45a049);
  90. border: none;
  91. color: white;
  92. padding: 8px 12px;
  93. text-align: center;
  94. text-decoration: none;
  95. display: inline-block;
  96. font-size: 14px;
  97. margin: 5px 0;
  98. cursor: pointer;
  99. border-radius: 50px;
  100. width: 100%;
  101. box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  102. transition: all 0.3s ease;
  103. font-weight: bold;
  104. text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.2);
  105. }
  106. .qh-assistant-btn:hover {
  107. background: linear-gradient(90deg, #45a049, #3d8b3d);
  108. box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  109. transform: translateY(-1px);
  110. }
  111. .qh-assistant-btn:active {
  112. transform: translateY(1px);
  113. box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  114. }
  115. .qh-assistant-nav-btns {
  116. display: flex;
  117. justify-content: space-between;
  118. margin-bottom: 8px;
  119. }
  120. .qh-assistant-nav-btn {
  121. background: linear-gradient(90deg, #2196F3, #03A9F4);
  122. border: none;
  123. color: white;
  124. padding: 6px 10px;
  125. text-align: center;
  126. text-decoration: none;
  127. display: inline-block;
  128. font-size: 13px;
  129. cursor: pointer;
  130. border-radius: 50px;
  131. width: 48%;
  132. box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  133. transition: all 0.3s ease;
  134. font-weight: bold;
  135. }
  136. .qh-assistant-nav-btn:hover {
  137. background: linear-gradient(90deg, #1E88E5, #039BE5);
  138. box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
  139. }
  140. .qh-assistant-nav-btn:active {
  141. transform: translateY(1px);
  142. box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  143. }
  144. .qh-assistant-nav-btn:disabled {
  145. background: linear-gradient(90deg, #9E9E9E, #BDBDBD);
  146. cursor: not-allowed;
  147. opacity: 0.7;
  148. }
  149. .qh-assistant-minimize {
  150. position: absolute;
  151. top: 0;
  152. left: 10px;
  153. cursor: pointer;
  154. font-size: 16px;
  155. opacity: 0.8;
  156. transition: opacity 0.2s;
  157. }
  158. .qh-assistant-minimize:hover {
  159. opacity: 1;
  160. }
  161. .qh-assistant-panel.minimized {
  162. width: auto;
  163. height: auto;
  164. padding: 10px;
  165. }
  166. .qh-assistant-panel.minimized .qh-assistant-content,
  167. .qh-assistant-panel.minimized .qh-assistant-nav-btns,
  168. .qh-assistant-panel.minimized .qh-assistant-btn {
  169. display: none;
  170. }
  171. .qh-assistant-panel.minimized .qh-assistant-title {
  172. margin-bottom: 0;
  173. border-bottom: none;
  174. padding-bottom: 0;
  175. }
  176. .qh-assistant-panel.minimized .qh-assistant-minimize {
  177. transform: rotate(180deg);
  178. }
  179.  
  180. /* 题库抓取功能样式 */
  181. .qh-question-panel {
  182. position: fixed;
  183. top: 50%;
  184. left: 50%;
  185. transform: translate(-50%, -50%);
  186. width: 80%;
  187. max-width: 800px;
  188. max-height: 80vh;
  189. background: white;
  190. border-radius: 12px;
  191. padding: 20px;
  192. color: #333;
  193. z-index: 10000;
  194. font-size: 14px;
  195. box-shadow: 0 5px 25px rgba(0, 0, 0, 0.4);
  196. display: none;
  197. overflow: auto;
  198. }
  199. .qh-question-title {
  200. font-size: 20px;
  201. font-weight: bold;
  202. text-align: center;
  203. margin-bottom: 15px;
  204. border-bottom: 2px solid #eee;
  205. padding-bottom: 10px;
  206. color: #0062bd;
  207. }
  208. .qh-question-close {
  209. position: absolute;
  210. top: 10px;
  211. right: 15px;
  212. cursor: pointer;
  213. font-size: 20px;
  214. color: #999;
  215. transition: color 0.2s;
  216. }
  217. .qh-question-close:hover {
  218. color: #333;
  219. }
  220. .qh-question-content {
  221. margin-bottom: 15px;
  222. max-height: 50vh;
  223. overflow-y: auto;
  224. padding: 10px;
  225. border: 1px solid #eee;
  226. border-radius: 8px;
  227. }
  228. .qh-question-item {
  229. margin-bottom: 15px;
  230. padding-bottom: 15px;
  231. border-bottom: 1px dashed #ddd;
  232. }
  233. .qh-question-item:last-child {
  234. border-bottom: none;
  235. }
  236. .qh-question-text {
  237. font-weight: bold;
  238. margin-bottom: 8px;
  239. }
  240. .qh-question-options {
  241. margin-left: 20px;
  242. margin-bottom: 8px;
  243. }
  244. .qh-question-option {
  245. margin-bottom: 5px;
  246. }
  247. .qh-question-answer {
  248. color: #4CAF50;
  249. font-weight: bold;
  250. }
  251. .qh-question-analysis {
  252. margin-top: 8px;
  253. color: #666;
  254. font-size: 13px;
  255. background-color: #f9f9f9;
  256. padding: 8px;
  257. border-radius: 4px;
  258. }
  259. .qh-question-btns {
  260. display: flex;
  261. justify-content: space-between;
  262. margin-top: 15px;
  263. }
  264. .qh-question-btn {
  265. background: linear-gradient(90deg, #2196F3, #0062bd);
  266. border: none;
  267. color: white;
  268. padding: 8px 15px;
  269. text-align: center;
  270. text-decoration: none;
  271. display: inline-block;
  272. font-size: 14px;
  273. cursor: pointer;
  274. border-radius: 4px;
  275. width: 48%;
  276. box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  277. transition: all 0.3s ease;
  278. }
  279. .qh-question-btn:hover {
  280. background: linear-gradient(90deg, #0062bd, #004a8f);
  281. box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  282. }
  283. .qh-question-btn:active {
  284. transform: translateY(1px);
  285. box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  286. }
  287. .qh-question-status {
  288. text-align: center;
  289. margin: 10px 0;
  290. color: #666;
  291. }
  292. .qh-question-overlay {
  293. position: fixed;
  294. top: 0;
  295. left: 0;
  296. width: 100%;
  297. height: 100%;
  298. background: rgba(0, 0, 0, 0.5);
  299. z-index: 9999;
  300. display: none;
  301. }
  302. `);
  303. console.log('[Styles模块] 样式已应用。');
  304. }
  305.  
  306. // 模块加载时自动应用样式
  307. if (typeof GM_addStyle === 'function') {
  308. try {
  309. applyStyles();
  310. } catch (e) {
  311. console.error('[Styles模块] applyStyles 执行出错:', e);
  312. }
  313. } else {
  314. console.warn('[Styles模块] GM_addStyle 函数不可用。');
  315. }
  316.  
  317. // 可选: 如果其他模块仍需通过 window.applyStyles 调用(不推荐),则保留
  318. // window.applyStyles = applyStyles;
  319.  
  320. })();

QingJ © 2025

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