氦luogu

amazing style in luogu

  1. // ==UserScript==
  2. // @name 氦luogu
  3. // @namespace http://tampermonkey.net/
  4. // @version 2025-03-05
  5. // @description amazing style in luogu
  6. // @author abs20187
  7. // @match *://www.luogu.com.cn/*
  8. // @license MIT
  9. // @grant none
  10. // ==/UserScript==
  11.  
  12. (function() {
  13. 'use strict';
  14. // Your code here...
  15. let style=document.createElement('style');
  16. function setcookie(name,value,days,path,domain,secure)
  17. {
  18. let cookieString=`${name}=${value}`;
  19. if(days)
  20. {
  21. const date=new Date();
  22. date.setTime(date.getTime()+(days*24*60*60*1000));
  23. cookieString+=`;expires=${date.toUTCString()}`;
  24. }
  25. if(path)
  26. {
  27. cookieString+=`;path=${path}`;
  28. }
  29. else
  30. {
  31. cookieString+=`;path=/`;
  32. }
  33. if(domain)
  34. {
  35. cookieString+=`;domain=${domain}`;
  36. }
  37. if(secure&&window.location.protocol=="https:")
  38. {
  39. cookieString+=`;secure`;
  40. }
  41. document.cookie=cookieString;
  42. }
  43. function getcookie(name)
  44. {
  45. const cookiestring=document.cookie;
  46. const cookie3=decodeURIComponent(cookiestring);
  47. const cookie2=cookie3.split('; ');
  48. for(let i of cookie2)
  49. {
  50. const [cname,cvalue]=i.split('=');
  51. if(cname==name)
  52. {
  53. return cvalue;
  54. }
  55. }
  56. if(name=='backimg')
  57. {
  58. setcookie('backimg',`https://s21.ax1x.com/2025/04/17/pEhJvD0.jpg`,114514,'/','luogu.com.cn',true);
  59. return `https://s21.ax1x.com/2025/04/17/pEhJvD0.jpg`;
  60. }
  61. if(name=='blr')
  62. {
  63. setcookie('blr',0,114514,'/','luogu.com.cn',true);
  64. return 0;
  65. }
  66. if(name=='bblr')
  67. {
  68. setcookie('bblr',0,114514,'/','luogu.com.cn',true);
  69. return 0;
  70. }
  71. if(name=='logo-color')
  72. {
  73. setcookie('logo-color',"#3498DB",114514,'/','luogu.com.cn',true);
  74. return "#3498DB";
  75. }
  76. if(name=='lfe-color')
  77. {
  78. setcookie('lfe-color',"#34495E",114514,'/','luogu.com.cn',true);
  79. return "#34495E";
  80. }
  81. if(name=='opt')
  82. {
  83. setcookie('opt',"0.8,0.9",114514,'/','luogu.com.cn',true);
  84. return "0.8,0.9";
  85. }
  86. return null;
  87. }
  88. function deleteCookie(name)
  89. {
  90. document.cookie=name+'=;expires=Thu, 01 Jan 1970 00:00:01 GMT;path=/';
  91. }
  92. let Img=getcookie("backimg");
  93. let blr=getcookie("blr");
  94. let blr2=blr*3;
  95. let bblr=getcookie("bblr");
  96. let logocl=getcookie("logo-color");
  97. let lfecl=getcookie("lfe-color");
  98. let opt_1=getcookie("opt");
  99. let opt_2=opt_1.split(",");
  100. let opt=opt_2[0];
  101. let opt1=opt_2[1];
  102. style.textContent = `
  103. /*背景*/
  104. html>body
  105. {
  106. background-image: url(${Img}) !important;
  107. background-repeat: no-repeat;
  108. background-size: cover;
  109. background-position: center;
  110. background-attachment: fixed;
  111. background-color: rgb(239, 239, 239)!important;
  112. }
  113. .wrapper.wrapped.lfe-body.header-layout.tiny
  114. {
  115. z-index:9999;
  116. /*background:linear-gradient(to right,rgba(255,0,0,40%),rgba(255,97,0,40%),rgba(255,255,0,40%),rgba(0,255,0,40%),rgba(0,255,255,40%),rgba(0,0,255,40%),rgba(255,0,255,40%))!important;彩虹*/
  117. background-color:rgba(255,255,255,${opt})!important;
  118. backdrop-filter:blur(20px);
  119. font-weight:600!important;
  120. }
  121. .user-nav
  122. {
  123. z-index:9999;
  124. }
  125. a
  126. {
  127. transition:all 0.5s ease!important;
  128. }
  129. ::selection
  130. {
  131. background-color:DarkMode_check(#264f78, #d6d6d6);
  132. }
  133.  
  134. /*去除掩盖物*/
  135. main
  136. {
  137. background:rgba(255,255,255,0)!important;
  138. }
  139. div[data-v-fc349d1c]
  140. {
  141. background:rgba(255,255,255,0)!important;
  142. }
  143. /*专栏卡片*/
  144. .article-content[data-v-f0d12dd0]
  145. {
  146. animation:beginup 0.5s;
  147. background:rgba(252,252,252,${opt})!important;
  148. border-radius:10px!important;
  149. transition:all 0.3s!important;
  150. }
  151. .article-content[data-v-f0d12dd0]::before
  152. {
  153. content: '';
  154. position: absolute;
  155. top: 0; left: 0; right: 0; bottom: 0;
  156. backdrop-filter:blur(${blr}px)!important;
  157. z-index: -1;
  158. }
  159. .article-content[data-v-f0d12dd0]:hover
  160. {
  161. box-shadow: 3px 3px 20px rgba(0, 0,0, 0.5);
  162. background:rgba(252,252,252,${opt1})!important;
  163. }
  164. .article-banner[data-v-076e399a]
  165. {
  166. animation:beginup 0.5s;
  167. background:rgba(252,252,252,${opt})!important;
  168. border-radius:8px!important;
  169. padding:0.1rem 1.1rem;
  170. margin-bottom:1rem;
  171. margin-top:1rem;
  172. transition:all 0.3s!important;
  173. position: relative;
  174. }
  175. .article-banner[data-v-076e399a]::after
  176. {
  177. content: '';
  178. position: absolute;
  179. height:100%!important;
  180. width:100%!important;
  181. top: 0; left: 0; right: 0; bottom: 0;
  182. backdrop-filter:blur(${blr}px)!important;
  183. z-index: -1;
  184. }
  185. .article-banner[data-v-076e399a]:hover
  186. {
  187. box-shadow: 3px 3px 20px rgba(0, 0,0, 0.5);
  188. background:rgba(252,252,252,${opt1})!important;
  189. }
  190. .toc
  191. {
  192. margin-left:30px!important;
  193. padding:10px!important;
  194. border-radius:8px!important;
  195. background:rgba(252,252,252,${opt})!important;
  196. position: relative;
  197. }
  198. .toc::before
  199. {
  200. content: '';
  201. position: absolute;
  202. top: 0; left: 0; right: 0; bottom: 0;
  203. backdrop-filter:blur(${blr}px)!important;
  204. z-index: -1;
  205. }
  206. .toc:hover
  207. {
  208. box-shadow: 3px 3px 16px rgba(0, 0,0, 0.5);
  209. background:rgba(252,252,252,${opt1})!important;
  210. }
  211. /*主站卡片*/
  212. .lg-article
  213. {
  214. animation:beginup 0.5s;
  215. border-radius:15px!important;
  216. background:rgba(252,252,252,${opt});
  217. transition:all 0.5s ease;
  218. }
  219. .lg-article::before
  220. {
  221. content: '';
  222. position: absolute;
  223. top: 0; left: 0; right: 0; bottom: 0;
  224. backdrop-filter:blur(${blr}px)!important;
  225. z-index: -1;
  226. }
  227. .lg-article:hover
  228. {
  229. box-shadow: 3px 3px 20px rgba(0, 0,0, 0.5);
  230. background:rgba(252,252,252,${opt1})!important;
  231. }
  232. /*底栏*/
  233. .background
  234. {
  235. background: #fff0!important;
  236. }
  237. .theme-bg
  238. {
  239. background: rgba(255,255,255,0)!important;
  240. }
  241. /*犇犇边框*/
  242. .am-comment-main
  243. {
  244. border-radius:8px!important;
  245. border-color:gold!important;
  246. background:rgba(255,255,255,0)!important;
  247. }
  248. .am-comment-main::before
  249. {
  250. border-right-color:gold!important;
  251. }
  252. .lg-left img
  253. {
  254. border-color:gold!important;
  255. }
  256. /*犇犇*/
  257. .am-comment-hd
  258. {
  259. background:rgba(247,247,247,${opt});
  260. border-top-right-radius:8px!important;
  261. border-top-left-radius:8px!important;
  262. transition:all 0.3s ease;
  263. }
  264. .am-comment-bd
  265. {
  266. background:linear-gradient(to top,rgba(255,255,255,${opt}),rgba(247 247 247 / ${opt}));
  267. border-bottom-right-radius:8px!important;
  268. border-bottom-left-radius:8px!important;
  269. transition:all 0.3s ease;
  270. }
  271. .am-comment-main
  272. {
  273. transition:all 0.5s ease;
  274. backdrop-filter:blur(${bblr}px)!important;
  275. }
  276. .am-comment-main:hover
  277. {
  278. background:rgba(255,255,255,0.3)!important;
  279. box-shadow: 3px 3px 15px rgba(0, 0,0, 0.5)!important;
  280. }
  281. /*主页卡片*/
  282. .card
  283. {
  284. animation:beginup 0.5s;
  285. background:rgba(252,252,252,${opt})!important;
  286. border-radius:15px!important;
  287. transition:all 0.5s ease;
  288. position: relative;
  289. }
  290. .card::before
  291. {
  292. content: '';
  293. position: absolute;
  294. top: 0; left: 0; right: 0; bottom: 0;
  295. backdrop-filter:blur(${blr}px)!important;
  296. border-radius:15px;
  297. z-index: -1;
  298. }
  299. .card:hover
  300. {
  301. box-shadow: 3px 3px 20px rgba(0, 0,0, 0.5)!important;
  302. background:rgba(252,252,252,${opt1})!important;
  303. }
  304. /*主页头图*/
  305. .user-header-top
  306. {
  307. opacity:0.85!important;
  308. }
  309. /*题目卡片*/
  310. .l-card
  311. {
  312. animation:beginup 0.5s;
  313. background:rgba(252,252,252,${opt})!important;
  314. border-radius:18px!important;
  315. transition:all 0.5s ease;
  316. position: relative;
  317. }
  318. .l-card::before
  319. {
  320. content: '';
  321. position: absolute;
  322. top: 0; left: 0; right: 0; bottom: 0;
  323. backdrop-filter:blur(${blr}px)!important;
  324. border-radius:18px!important;
  325. z-index: -1;
  326. }
  327. .l-card:hover
  328. {
  329. box-shadow: 3px 3px 20px rgba(0, 0,0, 0.5)!important;
  330. background:rgba(252,252,252,${opt1})!important;
  331. }
  332. /*弹窗*/
  333. .dropdown
  334. {
  335. border-radius: 10px !important;
  336. z-index:10000;
  337. background-color:rgba(255,255,255,0) !important;
  338. }
  339. .dropdown>.l-card
  340. {
  341. margin-bottom:0px!important;
  342. }
  343. .dropdown > .center
  344. {
  345. z-index:10000;
  346. border-radius: 10px !important;
  347. background-color:rgba(255,255,255,0.98) !important;
  348. }
  349. .dropdown a:hover
  350. {
  351. filter:brightness(1.2);
  352. }
  353. .popup
  354. {
  355. border-radius: 10px !important;
  356. background-color:rgba(255,255,255,${opt}) !important;
  357. backdrop-filter:blur(${blr}px)!important;
  358. z-index:999;
  359. }
  360. .swal2-container
  361. {
  362. z-index:100000;
  363. }
  364. .cover-upload
  365. {
  366. z-index:1000000!important;
  367. background:rgba(255,255,255,${opt});
  368. position:static!important;
  369. }
  370. .modal>.center
  371. {
  372. z-index:5;
  373. }
  374. /*专栏单选框*/
  375. .checkbox
  376. {
  377. color:#ccc!important;
  378. }
  379. /*用户菜单栏/顶栏*/
  380. .user-nav a
  381. {
  382. transition:all 0.5s ease;
  383. }
  384. .user-nav a:hover
  385. {
  386. color:#3498db;
  387. }
  388. .user-nav[data-v-2dfcfd35]
  389. {
  390. border-radius:8px!important;
  391. top:0.5rem!important;
  392. color:white!important;
  393. background-color:rgba(255,255,255,0)!important;
  394. }
  395. /*侧栏*/
  396. #app>.lfe-body
  397. {
  398. height:27em;
  399. border-bottom-right-radius:30px!important;
  400. border-top-right-radius:30px!important;
  401. margin-top:10.5%!important;
  402. background:${lfecl}!important;
  403. animation:lfepop 0.5s;
  404. z-index:35;
  405. }
  406. #app>.lfe-body>a
  407. {
  408. height:4.2em!important;
  409. transition: all 0.3s;
  410. margin-top:5px!important;
  411. }
  412. #app>.lfe-body>.popup-button
  413. {
  414. border-radius:12px!important;
  415. border-width:0px;
  416. border-color:rgba(0,0,0,.7)!important;
  417. transition: all 0.4s ease;
  418. background-color:${lfecl}!important;
  419. }
  420. #app>.lfe-body>.popup-button:hover
  421. {
  422. background-color:rgba(244,244,244,0.5)!important;
  423. border-width:3px;
  424. }
  425. #app>.lfe-body>a>.text
  426. {
  427. opacity: 0;
  428. display: block;
  429. transition:opacity 0.3s;
  430. margin-top:0px!important;
  431. }
  432. #app>.lfe-body>a:hover
  433. {
  434. filter:brightness(1.2);
  435. transform:translateY(-5px)!important;
  436. }
  437. #app>.lfe-body>a:hover>.text
  438. {
  439. opacity: 1!important;
  440. }
  441. .lfe-body>div[data-v-12f19ddc]
  442. {
  443. border-top-right-radius:30px!important;
  444. }
  445. .lfe-body>div[data-v-12f19ddc]
  446. {
  447. background-color:${logocl}!important;
  448. }
  449. /*卡片内菜单*/
  450. .inner-card,.am-panel
  451. {
  452. background-color:rgba(255,255,255,0.7)!important;
  453. border-radius:8px!important;
  454. }
  455. .discuss
  456. {
  457. background-color:rgba(255,255,255,0.7)!important;
  458. border-radius:8px!important;
  459. }
  460. /*按钮*/
  461. .am-btn
  462. {
  463. border-radius:10px!important;
  464. top:0px!important;
  465. transition:all 0.3s ease;
  466. box-shadow: 0 0px 0px 0 rgba(0, 0, 1, 0.5)!important;
  467. }
  468. .am-btn:hover
  469. {
  470. box-shadow: 0.3px 2px 6px 0 rgba(0, 0, 1, 0.5)!important;
  471. transform:translateY(-2px);
  472. }
  473. .solid
  474. {
  475. border-radius:10px!important;
  476. top:0px!important;
  477. }
  478. .solid:hover
  479. {
  480. box-shadow: 0 0px 7px 0 rgba(0, 0, 1, 0.5)!important;
  481. transform:translateY(-2px);
  482. }
  483. button.lform-size-middle
  484. {
  485. border-radius:10px!important;
  486. top:0px!important;
  487. }
  488. button.lform-size-middle:hover
  489. {
  490. box-shadow: 0 0px 7px 0 rgba(0, 0, 1, 0.5)!important;
  491. }
  492. button.lform-size-small
  493. {
  494. border-radius:8px!important;
  495. top:0px!important;
  496. }
  497. button.lform-size-small:hover
  498. {
  499. box-shadow: 0 0px 2px 0 rgba(0, 0, 1, 0.5)!important;
  500. }
  501. .float-bottom
  502. {
  503. background:rgba(255,255,255,0.9)!important;
  504. }
  505. button.lfe-form-sz-middle[data-v-66fcc50b]
  506. {
  507. border-radius:10px!important;
  508. top:0px!important;
  509. transition:all 0.3s ease;
  510. box-shadow: 0 0px 0px 0 rgba(0, 0, 1, 0.5)!important;
  511. }
  512. button.lfe-form-sz-middle[data-v-66fcc50b]:hover
  513. {
  514. box-shadow: 0.3px 2px 6px 0 rgba(0, 0, 1, 0.5)!important;
  515. top:-2px;
  516. }
  517. .swal2-styled
  518. {
  519. border-radius:10px!important;
  520. top:0px!important;
  521. }
  522. .swal2-styled:hover
  523. {
  524. box-shadow: 0.3px 2px 6px 0 rgba(0, 0, 1, 0.5)!important;
  525. transform:translateY(-2px);
  526. }
  527. /*代码*/
  528. .cm-editor
  529. {
  530. background-color:rgba(255,255,255,0.9);
  531. }
  532. .ace_function
  533. {
  534. color:red;
  535. }
  536. .cm-editor,code,.cm-line,.monaco-editor,.lfe-code,.cm-gutters,.CodeMirror-sizer
  537. {
  538. counter-reset: line-number;
  539. font-family: 'Fira Code', Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace!important;
  540. font-size: 15px;
  541. }
  542. .lfe-marked pre,.lfe-marked pre>code
  543. {
  544. background:rgba(255,255,255,0.9);
  545. }
  546. /*选项*/
  547. .items>li>.entry:not(.selected)::before
  548. {
  549. left:50%!important;
  550. width:0%!important;
  551. background:#bfbfbf!important;
  552. transition:all 0.5s ease;
  553. }
  554. .items>li>.entry:hover::before
  555. {
  556. left:0%!important;
  557. width:100%!important;
  558. }
  559. .category ul>li.selected[data-v-04eb14e9]
  560. {
  561. color:white!important;
  562. background:#9D3DCF!important;
  563. border-radius:8px!important;
  564. }
  565. .selected::before
  566. {
  567. background:#3498db!important;
  568. }
  569. ul>li[data-v-01f8a102]:not(.selected)::before
  570. {
  571. left:50%!important;
  572. width:0%!important;
  573. background:#bfbfbf!important;
  574. transition:all 0.5s ease;
  575. }
  576. ul>li[data-v-01f8a102]:hover::before
  577. {
  578. left:0%!important;
  579. width:100%!important;
  580. }
  581. ul>li[data-v-01f8a102].selected::before
  582. {
  583. left:0%!important;
  584. width:100%!important;
  585. background:#3498db!important;
  586. }
  587. /*页码*/
  588. button
  589. {
  590. transition:all 0.3s;
  591. }
  592. .page-bar button
  593. {
  594. top:0px;
  595. }
  596. .page-bar button:hover
  597. {
  598. transform: translateY(-3px);
  599. }
  600. /*专栏页面*/
  601. .lside
  602. {
  603. background:rgba(255, 255, 255, 0.98) !important;
  604. backdrop-filter:blur(7px)!important;
  605. }
  606. .row.row-space-between.reply-info div:not(.text,.combo,div.row),.comment-filter-line span[data-v-0a88bc8f]
  607. {
  608. font-weight:700;
  609. }
  610. div.text.lform-size-middle
  611. {
  612. background-color:rgba(255,255,255,0.98)!important;
  613. }
  614. .top-bar
  615. {
  616. background:rgba(255, 255, 255, 0.98) !important;
  617. backdrop-filter:blur(10px)!important;
  618. }
  619. .name
  620. {
  621. transition:all 0.3s;
  622. }
  623. footer.lcolor-bg-grey-1
  624. {
  625. background-color:rgba(255,255,255,0.97);
  626. }
  627. .user-nav.rside
  628. {
  629. background-color:rgba(255,255,255,.98)!important;
  630. backdrop-filter:blur(7px)!important;
  631. }
  632. .row.title>a
  633. {
  634. transition:all 0.5s;
  635. letter-spacing:0.3px;
  636. }
  637. .row.title>a:hover
  638. {
  639. transform: translateY(-2px);
  640. color:rgba(52,152,219)!important;
  641. letter-spacing:1px;
  642. }
  643. span[data-v-386007e1]
  644. {
  645. border-radius:5px;
  646. }
  647. .reply-item>.meta
  648. {
  649. background:rgba(255,255,255,0.8)!important;
  650. border-top-left-radius:18px!important;
  651. border-top-right-radius:18px!important;
  652. }
  653. /*setting按钮*/
  654. .Hesetb
  655. {
  656. border-radius:15px;
  657. background:#3498db!important;
  658. height:30px;
  659. width:auto;
  660. color:white;
  661. border-width:0px;
  662. padding-left:10px!important;
  663. padding-right:10px!important;
  664. }
  665. .Hesetb:hover
  666. {
  667. filter:brightness(1.1);
  668. }
  669. /*标签*/
  670. .lfe-caption
  671. {
  672. border-radius:7px!important;
  673. }
  674. .luogu-tag
  675. {
  676. border-radius:7px!important;
  677. }
  678. /*讨论*/
  679. .author[data-v-23764882]
  680. {
  681. background:rgba(255,255,255,0)!important;
  682. border-top-left-radius:18px!important;
  683. border-top-right-radius:18px!important;
  684. }
  685. .row
  686. {
  687. background:rgba(255,255,255,0)!important;
  688. }
  689. /*头像*/
  690. img.avatar[data-v-ae15b82e]
  691. {
  692. transition:all .5s ease;
  693. }
  694. img.avatar[data-v-ae15b82e]:hover{
  695. transform:translateY(-3px);
  696. box-shadow: 5px 6px 10px rgba(1, 1, 1, 0.5);
  697. }
  698. /*代码块*/
  699. .lfe-code
  700. {
  701. border-radius:8px;
  702. background-color:rgba(255,255,255,0.87);
  703. }
  704. /*进度条*/
  705. .top-progress
  706. {
  707. z-index:999999!important;
  708. }
  709. .progress-frame
  710. {
  711. border-radius:8px!important;
  712. }
  713. .progress-frame>div
  714. {
  715. border-radius:8px!important;
  716. }
  717. /*题目列表*/
  718. .title.color-default
  719. {
  720. transition:all 0.5s ease;
  721. position: relative;
  722. }
  723. .title.color-default::after
  724. {
  725. content: "";
  726. width: 0%;
  727. height: 3px;
  728. background: rgb(255, 0, 0);
  729. position: absolute;left: 50%;
  730. top:100%;
  731. transition: all .5s;
  732. }
  733. .title.color-default:hover::after
  734. {
  735. left: 0%; width: 100%;
  736. }
  737. .title.color-default:hover
  738. {
  739. color: rgb(255, 0, 0);
  740. }
  741. /*输入框*/
  742. #feed-content
  743. {
  744. border-radius:10px!important;
  745. background-color:rgba(255,255,255,0.8)!important;
  746. }
  747. .refined-input
  748. {
  749. border-radius:8px!important;
  750. transition:all 0.4s ease;
  751. }
  752. .refined-input:not(.search-box .refined-input):hover
  753. {
  754. box-shadow:3px 7px 10px 0 rgba(0,0,0,0.5);
  755. transform:translateY(-3px);
  756. }
  757. .search-box
  758. {
  759. border-radius:8px!important;
  760. transition:all 0.4s ease;
  761. }
  762. .search-box:hover
  763. {
  764. box-shadow:3px 7px 10px 0 rgba(0,0,0,0.5);
  765. transform:translateY(-3px);
  766. }
  767. .lfe-form-sz-small
  768. {
  769. border-radius:8px!important;
  770. transition:all 0.3s ease;
  771. }
  772. .lfe-form-sz-small:not( .refined-input>.lfe-form-sz-small,.combo-wrapper .lfe-form-sz-small):hover
  773. {
  774. box-shadow:2px 4px 7px 0 rgba(0,0,0,0.5);
  775. transform:translateY(-2px);
  776. }
  777. .lfe-form-sz-middle
  778. {
  779. border-radius:10px!important;
  780. transition:all 0.4s ease;
  781. }
  782. .lfe-form-sz-middle:not( .refined-input>.lfe-form-sz-middle,.combo-wrapper .lfe-form-sz-middle):hover
  783. {
  784. box-shadow:3px 5px 10px 0 rgba(0,0,0,0.5);
  785. transform:translateY(-3px);
  786. }
  787. input.am-form-field
  788. {
  789. border-radius:10px!important;
  790. background-color:rgba(255,255,255,0.8);
  791. transition:all 0.3s ease;
  792. }
  793. input.am-form-field:hover
  794. {
  795. box-shadow:3px 5px 10px 0 rgba(0,0,0,0.5);
  796. transform:translateY(-2px);
  797. }
  798. /*私信*/
  799. .message-block > .message[data-v-5c0627c6]
  800. {
  801. border-radius:8px!important;
  802. margin:1px;
  803. border:gold solid 0.5px;
  804. background:rgba(255,255,255,0.75)!important;
  805. transition:all 0.3s ease;
  806. }
  807. .message-block > .message[data-v-5c0627c6]:hover
  808. {
  809. transform:translateY(-2px)!important;
  810. box-shadow:2px 2px 7px 0 rgba(0,0,0,0.6);
  811. }
  812. .item[data-v-4d6dca7a]
  813. {
  814. transition:all 0.5s ease;
  815. }
  816. /*测试点*/
  817. .test-case
  818. {
  819. border-radius:8px;
  820. }
  821. .test-case .status
  822. {
  823. font-weight:650!important;
  824. }
  825. .test-case .id
  826. {
  827. font-weight:600!important;
  828. }
  829. /*动画*/
  830. @keyframes beginup
  831. {
  832. 0%
  833. {
  834. margin-bottom:5rem;
  835. }
  836. }
  837. @keyframes lfepop
  838. {
  839. 0%
  840. {
  841. left:-7rem;
  842. }
  843. 100%
  844. {
  845. left:0;
  846. }
  847. }
  848. `
  849. ;
  850. document.head.append(style);
  851. window.onload=function(){
  852. let hrefw=window.location.href//等待页面加载完成
  853. console.log(hrefw);
  854. if(hrefw=='https://www.luogu.com.cn/')
  855. {
  856. let usrnv=document.querySelector(".user-nav");
  857. let button = document.createElement('button');
  858. console.log(button);
  859. button.textContent="氦luogu";
  860. button.className="Hesetb";
  861. usrnv.insertBefore(button,usrnv.firstChild);
  862. const settingsPageContent = `
  863. <div class="l-card" style="position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background: white; padding: 20px; box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); border-radius: 10px; z-index: 10999999;">
  864. <h2>设置页面</h2>
  865. <lable for="input1">背景图片</lable>
  866. <input type="text" id="input1" value="${Img}" class="am-form-field" style="margin-bottom: 10px;"><br>
  867. <lable for="input2">卡片模糊度(0-20)</lable>
  868. <input type="text" id="input2" value="${blr}" class="am-form-field" style="margin-bottom: 10px;"><br>
  869. <lable for="input3">犇犇模糊度(0-20)</lable>
  870. <input type="text" id="input3" value="${bblr}" class="am-form-field" style="margin-bottom: 10px;"><br>
  871. <lable for="input4">侧栏LOGO颜色</lable>
  872. <input data-v-0ceb994e="" type="color" id="input4" value="${logocl}" class="block" style="margin-bottom: 10px;"><br>
  873. <lable for="input5">侧栏颜色</lable>
  874. <input data-v-0ceb994e="" type="color" id="input5" value="${lfecl}" class="block" style="margin-bottom: 10px;"><br>
  875. <lable for="input6">透明度,点击后透明度(0-1 0为完全透明)以逗号间隔</lable>
  876. <input data-v-0ceb994e="" id="input6" value="${opt_1}" class="am-form-field" style="margin-bottom: 10px;"><br>
  877. <button id="close-settings" class="am-btn am-btn-danger">关闭</button>
  878. </div>
  879. <div style="position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.5); z-index: 9999999;"></div>
  880. `;
  881. button.addEventListener('click', () => {
  882. // 创建设置页面
  883. const settingsPage=document.createElement('div');
  884. settingsPage.innerHTML=settingsPageContent;
  885. document.body.appendChild(settingsPage);
  886. const input1=document.getElementById('input1');
  887. const input2=document.getElementById('input2');
  888. const input3=document.getElementById('input3');
  889. const input4=document.getElementById('input4');
  890. const input5=document.getElementById('input5');
  891. const input6=document.getElementById('input6');
  892.  
  893. //绑定关闭按钮事件
  894. const closeButton=document.getElementById('close-settings');
  895. closeButton.addEventListener('click', () => {
  896. Img=input1.value;
  897. blr=input2.value;
  898. bblr=input3.value;
  899. logocl=input4.value;
  900. lfecl=input5.value;
  901. opt_1=input6.value;
  902. document.body.removeChild(settingsPage);
  903. deleteCookie("backimg");
  904. setcookie("backimg",Img,114514,'/',"luogu.com.cn",true);
  905. deleteCookie("blr");
  906. setcookie("blr",blr,114514,'/',"luogu.com.cn",true);
  907. deleteCookie("bblr");
  908. setcookie("bblr",bblr,114514,'/',"luogu.com.cn",true);
  909. deleteCookie("logo-color");
  910. setcookie("logo-color",logocl,114514,'/',"luogu.com.cn",true);
  911. deleteCookie("lfe-color");
  912. setcookie("lfe-color",lfecl,114514,'/',"luogu.com.cn",true);
  913. deleteCookie("opt");
  914. setcookie("opt",opt_1,114514,'/',"luogu.com.cn",true);
  915. location.reload();
  916. });
  917. });
  918. }
  919. }
  920. })();