Tieba Remix: 贴吧网页端重塑

贴吧网页端重塑

目前為 2025-03-14 提交的版本,檢視 最新版本

  1. // ==UserScript==
  2. // @name Tieba Remix: 贴吧网页端重塑
  3. // @namespace https://github.com/HacksawBlade/Tieba-Remix
  4. // @version 0.4.6-beta
  5. // @author 锯条
  6. // @description 贴吧网页端重塑
  7. // @license MIT
  8. // @icon https://gitee.com/HacksawBlade/Tieba-Remix/raw/master/assets/images/main/icon16.png
  9. // @icon64 https://gitee.com/HacksawBlade/Tieba-Remix/raw/master/assets/images/main/icon64.png
  10. // @match *://tieba.baidu.com/
  11. // @match *://tieba.baidu.com/index.*
  12. // @match *://tieba.baidu.com/?*
  13. // @match *://tieba.baidu.com/p/*
  14. // @match *://tieba.baidu.com/f?*
  15. // @match *://jump.bdimg.com/safecheck/*
  16. // @match *://jump2.bdimg.com/safecheck/*
  17. // @require https://fastly.jsdelivr.net/npm/vue@3.5.13/dist/vue.global.prod.js
  18. // @require https://fastly.jsdelivr.net/npm/marked@9.1.6/lib/marked.umd.min.js
  19. // @require https://fastly.jsdelivr.net/npm/lodash@4.17.21/lodash.min.js
  20. // @grant GM_addStyle
  21. // @grant GM_deleteValue
  22. // @grant GM_getValue
  23. // @grant GM_info
  24. // @grant GM_listValues
  25. // @grant GM_openInTab
  26. // @grant GM_registerMenuCommand
  27. // @grant GM_setValue
  28. // @run-at document-start
  29. // ==/UserScript==
  30.  
  31. (n=>{if(typeof GM_addStyle=="function"){GM_addStyle(n);return}const e=document.createElement("style");e.textContent=n,document.head.append(e)})(` @charset "UTF-8";.user-button {
  32. box-sizing: border-box;
  33. padding: 4px 12px;
  34. border: none;
  35. border-radius: 6px;
  36. background: none;
  37. background-color: var(--default-background);
  38. box-shadow: 0 0 0 1px var(--border-color);
  39. color: var(--default-fore);
  40. cursor: pointer;
  41. transition: var(--default-duration);
  42. }
  43. .user-button:hover:not([disabled]) {
  44. background-color: var(--default-hover);
  45. }
  46. .user-button:active:not([disabled]) {
  47. background-color: var(--default-active);
  48. }
  49. .user-button:focus:not([disabled]) {
  50. border-color: var(--tieba-theme-color);
  51. box-shadow: 0 0 0 2px var(--tieba-theme-color);
  52. }
  53. .theme-style.user-button {
  54. color: var(--default-background) !important;
  55. }
  56. .theme-style.user-button {
  57. background-color: var(--tieba-theme-color);
  58. }
  59. .theme-style.user-button:hover {
  60. background-color: var(--tieba-theme-hover);
  61. }
  62. .theme-style.user-button:active {
  63. background-color: var(--tieba-theme-active);
  64. }
  65. .unset-background.user-button {
  66. background-color: transparent;
  67. background-color: initial;
  68. }
  69. .no-border.user-button {
  70. box-shadow: none;
  71. }
  72. .no-border-all.user-button {
  73. box-shadow: none;
  74. }
  75. .no-border-all.user-button:hover, .no-border-all.user-button:focus {
  76. box-shadow: none;
  77. }@keyframes stretch-f69d853b {
  78. 0% {
  79. padding: 0 12px;
  80. opacity: 0;
  81. }
  82. 50% {
  83. opacity: 1;
  84. }
  85. 100% {
  86. padding: 8px 12px;
  87. }
  88. }
  89. .check[data-v-f69d853b] {
  90. color: var(--level-green-fore);
  91. }
  92. .warning[data-v-f69d853b] {
  93. color: var(--warning-color);
  94. }
  95. .error[data-v-f69d853b] {
  96. color: var(--error-color);
  97. }
  98. .toast-container[data-v-f69d853b] {
  99. position: fixed;
  100. z-index: 999;
  101. bottom: 96px;
  102. left: 50%;
  103. display: flex;
  104. max-height: 60vh;
  105. align-items: center;
  106. padding: 8px 12px;
  107. border: 1px solid var(--border-color);
  108. border-radius: 16px;
  109. animation: stretch-f69d853b 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.6);
  110. background-color: var(--default-background);
  111. box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
  112. gap: 6px;
  113. text-overflow: ellipsis;
  114. transform: translateX(-50%);
  115. transition: var(--default-transition);
  116. }
  117. .toast-container .toast-icon[data-v-f69d853b] {
  118. font-size: 18px;
  119. }
  120. .toast-container .toast-content[data-v-f69d853b] {
  121. overflow: hidden;
  122. max-width: 80vw;
  123. max-height: 60vh;
  124. padding: 0 6px;
  125. text-align: left;
  126. text-overflow: ellipsis;
  127. white-space: pre-wrap;
  128. }
  129. .toast-container span[data-v-f69d853b] {
  130. color: var(--minimal-fore);
  131. font-size: 12px;
  132. }
  133. .toast-container .toast-controls .close-button[data-v-f69d853b] {
  134. padding: 6px;
  135. color: var(--error-color);
  136. font-weight: var(--font-weight-bold);
  137. }
  138. .toast-container .toast-controls .close-button[data-v-f69d853b]:not(:active):not(:focus) {
  139. box-shadow: none;
  140. }
  141. .blur-effect[data-v-f69d853b] {
  142. background-color: var(--trans-default-background);
  143. }
  144. html:not([perf-saver]) .blur-effect[data-v-f69d853b] {
  145. -webkit-backdrop-filter: blur(24px);
  146. backdrop-filter: blur(24px);
  147. }
  148. html.dark-theme .blur-effect[data-v-f69d853b] {
  149. -webkit-backdrop-filter: blur(24px) brightness(0.8);
  150. backdrop-filter: blur(24px) brightness(0.8);
  151. }@keyframes kf-fade-in {
  152. 0% {
  153. opacity: 0;
  154. }
  155. 100% {
  156. opacity: 1;
  157. }
  158. }
  159. @keyframes kf-fade-out {
  160. 0% {
  161. opacity: 1;
  162. }
  163. 100% {
  164. opacity: 0;
  165. }
  166. }
  167. @keyframes kf-slide-in {
  168. 0% {
  169. opacity: 0;
  170. transform: translateY(20%);
  171. }
  172. }
  173. @keyframes kf-slide-out {
  174. 100% {
  175. opacity: 0;
  176. transform: translateY(20%);
  177. }
  178. }
  179. @keyframes kf-slide-zoom-in {
  180. 0% {
  181. opacity: 0;
  182. transform: translateY(20%) scale(0.85);
  183. }
  184. }
  185. @keyframes kf-slide-zoom-out {
  186. 100% {
  187. opacity: 0;
  188. transform: translateY(20%) scale(0.85);
  189. }
  190. }
  191. @keyframes kf-dialog-in {
  192. 0% {
  193. opacity: 0;
  194. transform: scale(1.2);
  195. }
  196. 100% {
  197. opacity: 1;
  198. transform: scale(1);
  199. }
  200. }
  201. @keyframes kf-dialog-out {
  202. 0% {
  203. opacity: 1;
  204. transform: scale(1);
  205. }
  206. 100% {
  207. opacity: 0;
  208. transform: scale(1.2);
  209. }
  210. }
  211. @keyframes kf-zoom-in {
  212. 0% {
  213. transform: scale(0.72);
  214. }
  215. 100% {
  216. transform: scale(1);
  217. }
  218. }
  219. @keyframes kf-fade-zoom-in {
  220. 0% {
  221. opacity: 0;
  222. transform: scale(0.72);
  223. }
  224. 100% {
  225. opacity: 1;
  226. transform: scale(1);
  227. }
  228. }/* stylelint-disable font-family-no-missing-generic-family-keyword */\r
  229. /* https: //fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,200..400,0..1,-50..100 */\r
  230. \r
  231. /* fallback */\r
  232. @font-face {\r
  233. font-family: "Material Symbols";\r
  234. font-style: normal;\r
  235. font-weight: 200 400;\r
  236. src: url("https://fonts.gstatic.com/s/materialsymbolsoutlined/v110/kJEhBvYX7BgnkSrUwT8OhrdQw4oELdPIeeII9v6oFsI.woff2") format("woff2");\r
  237. }\r
  238. \r
  239. .material-symbols-outlined {\r
  240. display: inline-block;\r
  241. direction: ltr;\r
  242. font-family: "Material Symbols";\r
  243. font-size: 24px;\r
  244. -webkit-font-smoothing: antialiased;\r
  245. font-style: normal;\r
  246. font-weight: normal;\r
  247. letter-spacing: normal;\r
  248. line-height: 1;\r
  249. text-transform: none;\r
  250. white-space: nowrap;\r
  251. word-wrap: normal;\r
  252. }\r
  253. :root {
  254. --img-tieba-icon: url("https://gitee.com/HacksawBlade/Tieba-Remix/raw/master/assets/images/main/icon.png");
  255. }
  256.  
  257. .dark-theme {
  258. --default-background: rgb(32, 32, 32);
  259. --default-hover: rgb(42, 42, 42);
  260. --default-active: rgb(54, 54, 54);
  261. --page-background: rgb(26, 26, 26);
  262. --trans-page-background: rgba(26, 26, 26, 0.6);
  263. --trans-default-background: rgba(32, 32, 32, 0.6);
  264. --deep-background: rgb(26, 26, 26);
  265. --trans-deep-background: rgba(20, 20, 20, 0.6);
  266. --light-background: rgb(60, 60, 60);
  267. --trans-light-background: rgba(60, 60, 60, 0.6);
  268. --very-light-background: rgb(60, 60, 60);
  269. --elem-color: rgb(26, 26, 26);
  270. --default-fore: rgb(230, 230, 230);
  271. --light-fore: rgb(180, 180, 180);
  272. --minimal-fore: rgb(144, 144, 144);
  273. --highlight-fore: rgb(255, 255, 255);
  274. --border-color: rgba(96, 96, 96, 0.6);
  275. --light-border-color: rgba(96, 96, 96, 0.2);
  276. --tieba-theme-color: rgb(113, 97, 193);
  277. --trans-tieba-theme-color: rgba(113, 97, 193, 0.6);
  278. --tieba-theme-hover: rgb(149, 128, 254);
  279. --tieba-theme-active: rgb(172, 156, 253);
  280. --tieba-theme-background: rgba(113, 97, 193, 0.2);
  281. --tieba-theme-fore: rgb(150, 128, 255);
  282. --level-green-background: rgba(96, 153, 59, 0.1);
  283. --level-green-fore: rgb(133, 206, 84);
  284. --level-blue-background: rgba(0, 165, 227, 0.1);
  285. --level-blue-fore: rgb(0, 169, 255);
  286. --level-yellow-background: rgba(229, 193, 90, 0.1);
  287. --level-yellow-fore: rgb(242, 205, 96);
  288. --level-orange-background: rgba(204, 122, 0, 0.1);
  289. --level-orange-fore: rgb(255, 170, 0);
  290. --check-color: lawngreen;
  291. --error-color: tomato;
  292. --warning-color: orange;
  293. color-scheme: dark;
  294. }
  295.  
  296. .light-theme {
  297. --default-background: rgb(255, 255, 255);
  298. --default-hover: rgb(240, 240, 240);
  299. --default-active: rgb(224, 224, 224);
  300. --page-background: rgb(245, 245, 245);
  301. --trans-page-background: rgba(245, 245, 245, 0.6);
  302. --trans-default-background: rgba(255, 255, 255, 0.6);
  303. --deep-background: rgb(228, 228, 228);
  304. --trans-deep-background: rgba(200, 200, 200, 0.6);
  305. --light-background: rgb(235, 235, 235);
  306. --trans-light-background: rgba(228, 228, 228, 0.6);
  307. --very-light-background: rgb(245, 245, 245);
  308. --elem-color: rgb(240, 240, 240);
  309. --default-fore: rgb(16, 16, 16);
  310. --light-fore: rgb(86, 86, 86);
  311. --minimal-fore: rgb(118, 118, 118);
  312. --highlight-fore: rgb(0, 0, 0);
  313. --border-color: rgba(185, 185, 185, 0.6);
  314. --light-border-color: rgba(185, 185, 185, 0.2);
  315. --tieba-theme-color: rgb(97, 78, 194);
  316. --trans-tieba-theme-color: rgba(97, 78, 194, 0.6);
  317. --tieba-theme-hover: rgb(119, 105, 194);
  318. --tieba-theme-active: rgb(150, 134, 232);
  319. --tieba-theme-background: rgba(97, 78, 194, 0.2);
  320. --tieba-theme-fore: rgb(58, 46, 116);
  321. --level-green-background: rgba(84, 130, 53, 0.1);
  322. --level-green-fore: rgb(51, 78, 32);
  323. --level-blue-background: rgba(0, 153, 213, 0.1);
  324. --level-blue-fore: rgb(0, 81, 111);
  325. --level-yellow-background: rgba(164, 139, 63, 0.1);
  326. --level-yellow-fore: rgb(124, 105, 46);
  327. --level-orange-background: rgba(255, 153, 0, 0.1);
  328. --level-orange-fore: rgb(178, 104, 0);
  329. --check-color: green;
  330. --error-color: darkred;
  331. --warning-color: darkorange;
  332. color-scheme: "light";
  333. }:root {
  334. --xfast-duration: 0.1s;
  335. --fast-duration: 0.2s;
  336. --default-duration: 0.4s;
  337. --slow-duration: 0.6s;
  338. --xslow-duration: 0.8s;
  339. }.user-dialog-modal[data-v-cd3f22c1] {
  340. position: fixed;
  341. z-index: var(--790b06c2);
  342. display: flex;
  343. width: 100%;
  344. height: 100%;
  345. flex-direction: column;
  346. align-items: center;
  347. justify-content: center;
  348. background-color: rgba(0, 0, 0, 0.5);
  349. top: 0;
  350. right: 0;
  351. bottom: 0;
  352. left: 0;
  353. }
  354. .user-dialog-modal .user-dialog.default[data-v-cd3f22c1] {
  355. box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  356. display: flex;
  357. max-height: calc(100% - 32px);
  358. box-sizing: border-box;
  359. flex-direction: column;
  360. border: 1px solid var(--light-border-color);
  361. border-radius: 12px;
  362. margin: 16px;
  363. background-color: var(--default-background);
  364. font-size: 16px;
  365. transition: var(--default-duration);
  366. }
  367. html.dark-theme .user-dialog-modal .user-dialog.default[data-v-cd3f22c1] {
  368. box-shadow: 0 0 16px rgba(0, 0, 0, 0.4);
  369. }
  370. .user-dialog-modal .user-dialog.dialog-enter-active[data-v-cd3f22c1] {
  371. animation: var(--416ec384);
  372. }
  373. .user-dialog-modal .user-dialog.dialog-leave-active[data-v-cd3f22c1] {
  374. animation: var(--07d22c3b);
  375. }
  376. .user-dialog-modal .user-dialog.default.force-alert[data-v-cd3f22c1] {
  377. box-shadow: 0 0 0 2px var(--error-color) !important;
  378. }
  379. .user-dialog-modal .user-dialog .dialog-title[data-v-cd3f22c1] {
  380. padding: 16px 16px 0 16px;
  381. color: var(--highlight-fore);
  382. font-size: 22px;
  383. font-weight: var(--font-weight-bold);
  384. }
  385. .user-dialog-modal .user-dialog .dialog-content[data-v-cd3f22c1] {
  386. flex-grow: 1;
  387. padding: 16px;
  388. overflow-y: auto;
  389. }
  390. .user-dialog-modal .user-dialog .dialog-button-panel[data-v-cd3f22c1] {
  391. display: flex;
  392. padding: 16px;
  393. border-radius: 0 0 12px 12px;
  394. background-color: var(--deep-background);
  395. gap: 8px;
  396. }
  397. .user-dialog-modal .user-dialog .dialog-button-panel .dialog-button[data-v-cd3f22c1] {
  398. flex-grow: 1;
  399. padding: 6px 16px;
  400. font-size: 14px;
  401. }.message-wrapper[data-v-39288ca3] {
  402. display: flex;
  403. overflow-x: hidden;
  404. overflow-y: auto;
  405. overflow: hidden auto;
  406. flex-direction: column;
  407. }.about-wrapper[data-v-08c54454] {
  408. display: flex;
  409. flex-direction: column;
  410. align-items: center;
  411. padding: 8px;
  412. margin: auto;
  413. gap: 12px;
  414. }
  415. .about-wrapper .main-title[data-v-08c54454] {
  416. display: flex;
  417. align-items: center;
  418. gap: 12px;
  419. }
  420. .about-wrapper .main-title .main-icon[data-v-08c54454] {
  421. width: 64px;
  422. height: 64px;
  423. }
  424. .about-wrapper .main-title .title[data-v-08c54454] {
  425. color: var(--highlight-fore);
  426. font-size: 32px;
  427. font-style: italic;
  428. font-weight: var(--font-weight-bold);
  429. }
  430. .about-wrapper .script-info[data-v-08c54454] {
  431. display: flex;
  432. flex-direction: column;
  433. align-items: center;
  434. color: var(--minimal-fore);
  435. gap: 8px;
  436. }
  437. .about-wrapper .script-info .author-info[data-v-08c54454] {
  438. display: flex;
  439. align-items: baseline;
  440. gap: 8px;
  441. }
  442. .about-wrapper .about-controls[data-v-08c54454] {
  443. display: flex;
  444. margin-top: 16px;
  445. gap: 8px;
  446. }
  447. .about-wrapper .about-controls .about-button[data-v-08c54454] {
  448. padding: 6px 10px;
  449. font-size: 14px;
  450. }.update-wrapper[data-v-c359521c] {
  451. display: flex;
  452. max-width: 100%;
  453. flex-direction: column;
  454. gap: 8px;
  455. }
  456. .update-wrapper .latest-info[data-v-c359521c] {
  457. display: flex;
  458. align-items: center;
  459. padding: 2px 8px;
  460. border-radius: 16px;
  461. margin: auto;
  462. margin-bottom: 12px;
  463. background-color: var(--level-blue-background);
  464. color: var(--level-blue-fore);
  465. gap: 6px;
  466. }
  467. .update-wrapper .latest-info.is-latest[data-v-c359521c] {
  468. background-color: var(--level-green-background);
  469. color: var(--level-green-fore);
  470. }
  471. .update-wrapper .title-container[data-v-c359521c] {
  472. display: flex;
  473. align-items: center;
  474. gap: 10px;
  475. }
  476. .update-wrapper .title-container .title[data-v-c359521c] {
  477. flex-shrink: 1;
  478. font-size: 20px;
  479. font-weight: var(--font-weight-bold);
  480. }
  481. .update-wrapper .title-container .is-pre-release[data-v-c359521c] {
  482. min-width: -moz-max-content;
  483. min-width: max-content;
  484. padding: 2px 8px;
  485. border-radius: 16px;
  486. background-color: var(--level-orange-background);
  487. color: var(--level-orange-fore);
  488. font-size: 14px;
  489. }
  490. .update-wrapper .main-info[data-v-c359521c] {
  491. display: flex;
  492. align-items: center;
  493. gap: 8px;
  494. }
  495. .update-wrapper .main-info .avatar[data-v-c359521c] {
  496. width: 32px;
  497. height: 32px;
  498. border-radius: 32px;
  499. }
  500. .update-wrapper .main-info .release-time[data-v-c359521c] {
  501. margin-left: auto;
  502. }
  503. .update-wrapper .update-controls[data-v-c359521c] {
  504. display: flex;
  505. align-items: center;
  506. margin-top: 8px;
  507. gap: 8px;
  508. }
  509. .update-wrapper .update-controls .up-button[data-v-c359521c] {
  510. padding: 4px 8px;
  511. border-radius: 10px;
  512. font-size: 15px;
  513. font-weight: var(--font-weight-bold);
  514. }
  515. .update-wrapper .update-controls .up-name[data-v-c359521c] {
  516. font-family: var(--code-monospace);
  517. }
  518. .forbidden-wrapper[data-v-c359521c] {
  519. display: flex;
  520. width: 100%;
  521. height: 100%;
  522. flex-direction: column;
  523. align-items: center;
  524. }
  525. .forbidden-wrapper .icon[data-v-c359521c] {
  526. font-size: 64px;
  527. }.layout-custom-back[data-v-fcb5c431] {
  528. display: flex;
  529. width: 100%;
  530. flex-direction: column;
  531. gap: 8px;
  532. }
  533. .layout-custom-back .custom-image[data-v-fcb5c431] {
  534. max-width: 100%;
  535. max-height: 320px;
  536. border-radius: 8px;
  537. margin: 0 auto;
  538. }
  539. .layout-custom-back .custom-back-buttons[data-v-fcb5c431] {
  540. display: flex;
  541. align-items: center;
  542. justify-content: flex-end;
  543. gap: 6px;
  544. }
  545. .layout-custom-back .adjust-controls[data-v-fcb5c431] {
  546. display: flex;
  547. flex-direction: column;
  548. gap: 8px;
  549. }
  550. .layout-custom-back .adjust-controls .control-set[data-v-fcb5c431] {
  551. display: flex;
  552. align-items: baseline;
  553. gap: 6px;
  554. }
  555. .layout-custom-back .adjust-controls .control-set .editor[data-v-fcb5c431] {
  556. width: auto;
  557. font-family: var(--code-zh);
  558. }.color-picker[data-v-faec1870] {
  559. display: flex;
  560. align-items: center;
  561. gap: 8px;
  562. }
  563. .color-picker .color-input[data-v-faec1870] {
  564. width: 24px;
  565. height: 24px;
  566. }.theme-color-component[data-v-17596762] {
  567. display: flex;
  568. width: 100%;
  569. flex-direction: column;
  570. align-items: flex-start;
  571. gap: 6px;
  572. }
  573. .theme-color-component .reset-button[data-v-17596762] {
  574. margin-left: auto;
  575. }.theme-picker {
  576. z-index: 9999 !important;
  577. }.toggle-button[data-v-6728dba5] {
  578. color: var(--default-fore);
  579. }
  580. .toggle-button .icon[data-v-6728dba5],
  581. .toggle-button .outline-icon[data-v-6728dba5] {
  582. color: var(--minimal-fore);
  583. }
  584. .toggle-button.toggle-on[data-v-6728dba5] {
  585. background-color: var(--tieba-theme-color);
  586. color: var(--default-background);
  587. }.user-check[data-v-48d9506d] {
  588. display: flex;
  589. align-items: center;
  590. }
  591. .user-check .check-button[data-v-48d9506d] {
  592. width: 16px;
  593. min-width: 16px;
  594. height: 16px;
  595. min-height: 16px;
  596. padding: 0;
  597. border-radius: 4px;
  598. color: var(--tieba-theme-color);
  599. font-size: 14px;
  600. font-weight: var(--font-weight-bold);
  601. }
  602. .user-check .check-label[data-v-48d9506d] {
  603. display: flex;
  604. align-items: center;
  605. color: var(--light-fore);
  606. cursor: pointer;
  607. font-size: 16px;
  608. }
  609. .user-check .label-text[data-v-48d9506d] {
  610. padding-left: 6px;
  611. }@keyframes select-arrow-down-7da72ee3 {
  612. 0% {
  613. transform: translateY(0);
  614. }
  615. 70% {
  616. transform: translateY(10%);
  617. }
  618. 100% {
  619. transform: translateY(0);
  620. }
  621. }
  622. .user-select[data-v-7da72ee3] {
  623. position: relative;
  624. }
  625. .user-select .select-toggle[data-v-7da72ee3] {
  626. display: flex;
  627. width: 100%;
  628. align-items: center;
  629. justify-content: space-between;
  630. gap: 8px;
  631. text-align: justify;
  632. }
  633. .user-select .select-toggle.toggle-on[data-v-7da72ee3] {
  634. background-color: var(--default-background);
  635. box-shadow: 0 0 0 1px var(--tieba-theme-color);
  636. color: var(--default-fore);
  637. }
  638. .user-select .select-toggle.toggle-on .icon[data-v-7da72ee3] {
  639. animation: select-arrow-down-7da72ee3 var(--fast-duration) cubic-bezier(0.18, 0.89, 0.32, 1.6);
  640. color: var(--tieba-theme-color);
  641. font-weight: var(--font-weight-bold);
  642. }
  643. .user-select .select-toggle.toggle-off[data-v-7da72ee3] {
  644. box-shadow: 0 0 0 1px var(--border-color);
  645. }
  646. .user-select .select-container[data-v-7da72ee3] {
  647. position: absolute;
  648. top: calc(100% + 4px);
  649. left: 0;
  650. display: flex;
  651. overflow: hidden;
  652. width: 100%;
  653. flex-direction: column;
  654. border: 1px solid var(--border-color);
  655. border-radius: 6px;
  656. background-color: var(--default-background);
  657. box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  658. transform-origin: top;
  659. }
  660. .user-select .select-container.select-enter-active[data-v-7da72ee3], .user-select .select-container.select-leave-active[data-v-7da72ee3] {
  661. transition: transform var(--fast-duration), opacity var(--fast-duration);
  662. }
  663. .user-select .select-container.select-enter-from[data-v-7da72ee3], .user-select .select-container.select-leave-to[data-v-7da72ee3] {
  664. opacity: 0;
  665. transform: scale(0.95) translateY(-4px);
  666. }
  667. .user-select .select-container .select-button[data-v-7da72ee3] {
  668. border-radius: 0;
  669. box-shadow: none;
  670. text-align: justify;
  671. }
  672. .user-select .select-container .select-desc[data-v-7da72ee3] {
  673. padding: 4px 14px;
  674. border-top: 1px solid var(--border-color);
  675. color: var(--light-fore);
  676. font-size: 14px;
  677. }.user-textbox[data-v-a690d550] {
  678. box-sizing: border-box;
  679. padding: 4px;
  680. border: 2px solid var(--border-color);
  681. border-radius: 6px;
  682. background-color: var(--default-background);
  683. outline: none;
  684. transition: all var(--default-duration), width 0s, height 0s;
  685. }
  686. .user-textbox[data-v-a690d550]:hover {
  687. border-color: var(--light-background);
  688. }
  689. .user-textbox[data-v-a690d550]:focus {
  690. border-color: var(--tieba-theme-color);
  691. }
  692. .lodash-style.user-textbox[data-v-a690d550] {
  693. padding: 0;
  694. border: none;
  695. border-radius: 0;
  696. border-bottom: 2px solid var(--border-color);
  697. }@keyframes content-in-ae6e43ab {
  698. 0% {
  699. opacity: 0;
  700. transform: translateY(20px);
  701. }
  702. 100% {
  703. opacity: 1;
  704. }
  705. }
  706. .key-button[data-v-ae6e43ab] {
  707. display: flex;
  708. overflow: hidden;
  709. min-width: 120px;
  710. align-items: center;
  711. padding: 12px;
  712. border-radius: 0;
  713. font-size: 16px;
  714. gap: 12px;
  715. text-align: justify;
  716. transition: var(--default-duration);
  717. white-space: nowrap;
  718. }
  719. .key-button .icon[data-v-ae6e43ab] {
  720. font-size: 20px;
  721. font-variation-settings: "FILL" 0, "wght" 300;
  722. transition: all var(--default-duration), margin-left var(--fast-duration) ease-out;
  723. }
  724. .key-button .key-info[data-v-ae6e43ab] {
  725. display: flex;
  726. width: calc(100% - 32px);
  727. flex-direction: column;
  728. }
  729. .key-button .key-title[data-v-ae6e43ab],
  730. .key-button .key-desc[data-v-ae6e43ab] {
  731. overflow: hidden;
  732. text-overflow: ellipsis;
  733. }
  734. .key-button .key-desc[data-v-ae6e43ab] {
  735. color: var(--minimal-fore);
  736. font-size: 14px;
  737. }
  738. .key-button.main-key[data-v-ae6e43ab] {
  739. box-sizing: content-box;
  740. }
  741. .key-button.main-key .main-key-selected[data-v-ae6e43ab] {
  742. position: relative;
  743. width: 0;
  744. height: 100%;
  745. border-radius: 24px;
  746. margin-left: -12px;
  747. background-color: var(--tieba-theme-color);
  748. }
  749. .key-button.main-key .main-key-selected[data-v-ae6e43ab]::after {
  750. position: absolute;
  751. top: 0;
  752. width: 0;
  753. height: 100%;
  754. border-radius: 24px;
  755. background-color: var(--tieba-theme-color);
  756. content: "";
  757. }
  758. .key-button.main-key.selected[data-v-ae6e43ab] {
  759. color: var(--tieba-theme-fore) !important;
  760. }
  761. .key-button.main-key.selected .main-key-selected[data-v-ae6e43ab] {
  762. padding-right: 4px;
  763. }
  764. .key-button.main-key.selected .main-key-selected[data-v-ae6e43ab]::after {
  765. width: 4px;
  766. }
  767. .key-button.main-key.selected .icon[data-v-ae6e43ab] {
  768. margin-left: 4px;
  769. font-variation-settings: "FILL" 1, "GRAD" 48, "wght" 300;
  770. font-weight: var(--font-weight-normal);
  771. }
  772. .key-button.main-key.selected .key-desc[data-v-ae6e43ab] {
  773. color: var(--tieba-theme-color);
  774. }
  775. .key-button.sub-key[data-v-ae6e43ab] {
  776. -webkit-text-decoration: none;
  777. text-decoration: none;
  778. transition: var(--default-duration);
  779. }
  780. .key-button.sub-key.selected[data-v-ae6e43ab] {
  781. color: var(--tieba-theme-fore);
  782. -webkit-text-decoration: underline var(--tieba-theme-color) 2px;
  783. text-decoration: underline var(--tieba-theme-color) 2px;
  784. }
  785. .settings-wrapper[data-v-ae6e43ab] {
  786. display: flex;
  787. width: 100%;
  788. max-width: var(--content-max);
  789. height: 100%;
  790. box-sizing: border-box;
  791. }
  792. .settings-wrapper .left-container[data-v-ae6e43ab] {
  793. display: flex;
  794. width: 30%;
  795. max-width: 280px;
  796. flex-direction: column;
  797. border-right: 2px solid var(--light-border-color);
  798. }
  799. .settings-wrapper .left-container .search-controls[data-v-ae6e43ab] {
  800. display: flex;
  801. flex-direction: column;
  802. padding: 0 16px 16px 0;
  803. gap: 8px;
  804. }
  805. .settings-wrapper .left-container .search-controls .title[data-v-ae6e43ab] {
  806. color: var(--default-fore) !important;
  807. }
  808. .settings-wrapper .left-container .search-controls .title[data-v-ae6e43ab] {
  809. margin-top: 8px;
  810. font-size: 20px;
  811. font-weight: var(--font-weight-bold);
  812. line-height: normal;
  813. }
  814. .settings-wrapper .left-container .search-controls .search-box[data-v-ae6e43ab] {
  815. padding: 6px;
  816. font-size: 14px;
  817. }
  818. .settings-wrapper .left-container .left-panel[data-v-ae6e43ab] {
  819. display: flex;
  820. box-sizing: border-box;
  821. flex-direction: column;
  822. }
  823. .settings-wrapper .middle-container[data-v-ae6e43ab] {
  824. display: flex;
  825. width: 20%;
  826. max-width: 220px;
  827. flex-direction: column;
  828. padding: 0 6px;
  829. border-right: 2px solid var(--light-border-color);
  830. gap: 6px;
  831. }
  832. .settings-wrapper .middle-container .sub-key[data-v-ae6e43ab] {
  833. display: flex;
  834. padding: 8px 16px;
  835. border-radius: 12px;
  836. gap: 4px;
  837. }
  838. .settings-wrapper .middle-container .sub-key .key-title[data-v-ae6e43ab] {
  839. font-size: 14px;
  840. }
  841. .settings-wrapper .middle-container .sub-key[data-v-ae6e43ab]:not(:hover):not(:active):not(:focus) {
  842. background-color: transparent;
  843. background-color: initial;
  844. }
  845. .settings-wrapper .right-container[data-v-ae6e43ab] {
  846. display: flex;
  847. overflow: auto;
  848. width: 50%;
  849. flex-direction: column;
  850. flex-grow: 1;
  851. padding: 16px;
  852. margin: -16px -16px -16px 0;
  853. font-size: 16px;
  854. gap: 32px;
  855. }
  856. .settings-wrapper .right-container .setting-content[data-v-ae6e43ab] {
  857. display: flex;
  858. flex-direction: column;
  859. gap: 8px;
  860. }
  861. .settings-wrapper .right-container .setting-content .content-title[data-v-ae6e43ab] {
  862. margin: 8px 0 0;
  863. color: var(--highlight-fore);
  864. font-size: 18px;
  865. font-weight: var(--font-weight-bold);
  866. }
  867. .settings-wrapper .right-container .setting-content .content-sub-title[data-v-ae6e43ab] {
  868. margin: 4px 0 0;
  869. color: var(--default-fore);
  870. font-size: 16px;
  871. font-weight: var(--font-weight-bold);
  872. }
  873. .settings-wrapper .right-container .setting-content .content-desc[data-v-ae6e43ab] {
  874. display: flex;
  875. flex-direction: column;
  876. color: var(--light-fore);
  877. gap: 6px;
  878. }
  879. .settings-wrapper .right-container .setting-content .content-textbox[data-v-ae6e43ab] {
  880. box-sizing: content-box;
  881. }
  882. .settings-wrapper .right-container .setting-content .content-textbox.textarea[data-v-ae6e43ab] {
  883. width: 100%;
  884. height: 6em;
  885. resize: none;
  886. }
  887. .settings-wrapper .right-container .setting-content .content-image[data-v-ae6e43ab] {
  888. max-width: 100%;
  889. max-height: 320px;
  890. border-radius: 8px;
  891. margin: 0 auto;
  892. }
  893. .settings-wrapper .right-container .setting-content .setting-control[data-v-ae6e43ab] {
  894. display: flex;
  895. }
  896. .settings-wrapper .right-container .setting-content .setting-control .settings-toggle[data-v-ae6e43ab] {
  897. background: none;
  898. font-size: 36px;
  899. }
  900. .settings-wrapper .right-container .setting-content .setting-control .settings-toggle.toggle-on[data-v-ae6e43ab] {
  901. color: var(--tieba-theme-color);
  902. }
  903. .settings-wrapper .right-container .setting-content .setting-control .settings-toggle.toggle-on[data-v-ae6e43ab]:hover {
  904. color: var(--tieba-theme-fore);
  905. }
  906. .settings-wrapper .right-container .setting-content .setting-control .icon-component[data-v-ae6e43ab] {
  907. margin-left: auto;
  908. font-size: 64px;
  909. font-variation-settings: "FILL" 1;
  910. }
  911. .settings-wrapper .right-container .setting-content .setting-control .settings-select[data-v-ae6e43ab] {
  912. width: min(100%, 280px);
  913. }
  914. .settings-wrapper .empty-container[data-v-ae6e43ab] {
  915. margin: auto;
  916. color: var(--minimal-fore);
  917. font-size: 72px;
  918. }.block-panel {
  919. display: flex;
  920. min-width: 30px;
  921. height: 26px;
  922. align-items: center;
  923. justify-content: center;
  924. padding: 2px 8px;
  925. border-radius: 24px;
  926. background-color: var(--trans-light-background);
  927. font-size: 14px;
  928. text-align: center;
  929. }
  930. .block-panel .icon {
  931. color: var(--light-fore);
  932. font-size: 18px;
  933. }
  934. .block-panel .panel-button {
  935. border: none !important;
  936. }
  937. .block-panel .panel-button {
  938. width: 30px;
  939. height: 30px;
  940. padding: 4px;
  941. border-radius: 48px;
  942. }
  943. .block-panel.left-align {
  944. margin-left: 0;
  945. }#header-progress[data-v-782eb887] {
  946. position: fixed;
  947. z-index: 99999;
  948. top: 0;
  949. max-width: 100vw;
  950. height: 4px;
  951. background-color: var(--tieba-theme-color);
  952. transition: 0.4s;
  953. }
  954. #header-progress.complete[data-v-782eb887] {
  955. animation: kf-fade-out var(--xslow-duration) forwards;
  956. }#shield-editor[data-v-8cfcb5eb] {
  957. display: flex;
  958. flex-direction: column;
  959. gap: 10px;
  960. }
  961. #shield-editor #shield-editor-rule-control[data-v-8cfcb5eb] {
  962. display: flex;
  963. align-items: flex-start;
  964. gap: 6px;
  965. }
  966. #shield-editor #shield-editor-rule-control #shield-editor-rule[data-v-8cfcb5eb] {
  967. flex: 1;
  968. font-size: 16px;
  969. }
  970. #shield-editor #shield-editor-rule-control label[data-v-8cfcb5eb] {
  971. color: var(--light-fore);
  972. }
  973. #shield-editor #shield-editor-toggle-control[data-v-8cfcb5eb] {
  974. display: flex;
  975. align-items: center;
  976. gap: 16px;
  977. }
  978. #shield-editor #shield-editor-delete[data-v-8cfcb5eb] {
  979. padding: 6px 8px;
  980. background-color: var(--error-color);
  981. color: var(--default-background);
  982. }.shield-container[data-v-1dec7a04] {
  983. display: flex;
  984. width: 100%;
  985. flex-direction: column;
  986. gap: 16px;
  987. }
  988. .shield-container .words-container[data-v-1dec7a04] {
  989. display: flex;
  990. flex-wrap: wrap;
  991. padding: 12px;
  992. border-radius: 12px;
  993. background-color: var(--trans-light-background);
  994. gap: 4px;
  995. }
  996. .shield-container .words-container .shield-elem[data-v-1dec7a04] {
  997. display: flex;
  998. align-items: center;
  999. padding: 4px 8px;
  1000. border: none;
  1001. border-radius: 8px;
  1002. font-size: 14px;
  1003. gap: 4px;
  1004. }
  1005. .shield-container .words-container .shield-elem.disabled[data-v-1dec7a04] {
  1006. opacity: 0.5;
  1007. }
  1008. .shield-container .words-container .shield-elem.disabled .content[data-v-1dec7a04] {
  1009. -webkit-text-decoration: line-through;
  1010. text-decoration: line-through;
  1011. }
  1012. .shield-container .words-container .shield-elem .icon[data-v-1dec7a04] {
  1013. color: var(--light-fore);
  1014. }
  1015. .shield-container .words-container .remove-all[data-v-1dec7a04] {
  1016. background-color: var(--error-color);
  1017. color: var(--default-background);
  1018. font-variation-settings: "FILL" 0;
  1019. }
  1020. .shield-container .empty-list-container[data-v-1dec7a04] {
  1021. color: var(--minimal-fore);
  1022. }
  1023. .shield-container .shield-controls[data-v-1dec7a04] {
  1024. display: flex;
  1025. flex-direction: column;
  1026. gap: 8px;
  1027. }
  1028. .shield-container .shield-controls .shield-input[data-v-1dec7a04] {
  1029. width: 100%;
  1030. height: auto;
  1031. max-height: 6em;
  1032. box-sizing: border-box;
  1033. padding: 6px;
  1034. font-size: 16px;
  1035. resize: none;
  1036. }
  1037. .shield-container .shield-controls .submit-controls[data-v-1dec7a04] {
  1038. display: flex;
  1039. align-items: center;
  1040. justify-content: flex-end;
  1041. gap: 12px;
  1042. }
  1043. .shield-container .shield-controls .submit-controls .submit-button[data-v-1dec7a04] {
  1044. padding: 4px 12px;
  1045. font-size: 14px;
  1046. font-weight: var(--font-weight-bold);
  1047. }.images-viewer .head-controls .head-btn.toggle-on[data-v-f4016c3f] {
  1048. font-family: "Material Symbols", monospace !important;
  1049. }
  1050. .images-viewer .head-controls .head-btn.toggle-on[data-v-f4016c3f] {
  1051. font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 40;
  1052. -webkit-user-select: none;
  1053. -moz-user-select: none;
  1054. user-select: none;
  1055. }
  1056. .images-viewer[data-v-f4016c3f] {
  1057. position: fixed;
  1058. display: flex;
  1059. width: 100%;
  1060. height: 100%;
  1061. flex-direction: column;
  1062. align-items: center;
  1063. justify-content: center;
  1064. top: 0;
  1065. right: 0;
  1066. bottom: 0;
  1067. left: 0;
  1068. transition: var(--default-duration);
  1069. }
  1070. .images-viewer .icon[data-v-f4016c3f] {
  1071. color: var(--light-fore);
  1072. }
  1073. .images-viewer .control-panel[data-v-f4016c3f] {
  1074. position: absolute;
  1075. display: flex;
  1076. align-items: center;
  1077. padding: 10px;
  1078. border: 1px solid var(--light-border-color);
  1079. border-radius: 18px;
  1080. background-color: var(--trans-default-background);
  1081. box-shadow: 0 0 32px rgba(0, 0, 0, 0.4);
  1082. }
  1083. html:not([perf-saver]) .images-viewer .control-panel[data-v-f4016c3f] {
  1084. -webkit-backdrop-filter: blur(24px);
  1085. backdrop-filter: blur(24px);
  1086. }
  1087. html.dark-theme .images-viewer .control-panel[data-v-f4016c3f] {
  1088. -webkit-backdrop-filter: blur(24px) brightness(0.8);
  1089. backdrop-filter: blur(24px) brightness(0.8);
  1090. }
  1091. .images-viewer .head-controls[data-v-f4016c3f] {
  1092. top: 16px;
  1093. margin-bottom: auto;
  1094. transition: var(--default-duration);
  1095. }
  1096. .images-viewer .head-controls.hide[data-v-f4016c3f] {
  1097. box-shadow: none;
  1098. transform: translateY(calc(-100% - 16px)) scale(0.85);
  1099. }
  1100. .images-viewer .head-controls .head-btn[data-v-f4016c3f] {
  1101. width: 36px;
  1102. height: 36px;
  1103. padding: 0;
  1104. border-radius: 12px;
  1105. background-color: transparent;
  1106. background-color: initial;
  1107. box-shadow: none;
  1108. font-size: 16px;
  1109. }
  1110. .images-viewer .head-controls .head-btn[data-v-f4016c3f]:hover {
  1111. background-color: var(--default-background);
  1112. color: var(--tieba-theme-color);
  1113. }
  1114. .images-viewer .head-controls .head-btn.toggle-on[data-v-f4016c3f] {
  1115. background-color: var(--tieba-theme-color);
  1116. color: var(--default-background);
  1117. }
  1118. .images-viewer .head-controls .head-btn.toggle-on[data-v-f4016c3f]:hover {
  1119. filter: brightness(1.2);
  1120. }
  1121. .images-viewer .head-controls .close[data-v-f4016c3f]:hover {
  1122. color: var(--error-color);
  1123. }
  1124. .images-viewer .head-controls span[data-v-f4016c3f] {
  1125. color: var(--minimal-fore);
  1126. font-family: var(--code-monospace);
  1127. }
  1128. .images-viewer .head-controls .zoom-size[data-v-f4016c3f] {
  1129. padding: 10px;
  1130. }
  1131. .images-viewer .back[data-v-f4016c3f],
  1132. .images-viewer .forward[data-v-f4016c3f] {
  1133. height: 60px;
  1134. box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
  1135. font-size: large;
  1136. }
  1137. .images-viewer .back[data-v-f4016c3f] {
  1138. left: 32px;
  1139. }
  1140. .images-viewer .back.hide[data-v-f4016c3f] {
  1141. box-shadow: none;
  1142. transform: translateX(calc(-100% - 32px)) scale(0.85);
  1143. }
  1144. .images-viewer .forward[data-v-f4016c3f] {
  1145. right: 32px;
  1146. }
  1147. .images-viewer .forward.hide[data-v-f4016c3f] {
  1148. box-shadow: none;
  1149. transform: translateX(calc(100% + 32px)) scale(0.85);
  1150. }
  1151. .images-viewer .back[data-v-f4016c3f]:hover,
  1152. .images-viewer .forward[data-v-f4016c3f]:hover {
  1153. background-color: var(--default-background);
  1154. }
  1155. .images-viewer .back[data-v-f4016c3f]:focus,
  1156. .images-viewer .forward[data-v-f4016c3f]:focus {
  1157. box-shadow: 0 0 0 2px var(--tieba-theme-color);
  1158. }
  1159. .images-viewer .image-container[data-v-f4016c3f] {
  1160. display: flex;
  1161. width: 100%;
  1162. height: 100%;
  1163. align-items: center;
  1164. justify-content: center;
  1165. }
  1166. .images-viewer .image-container .curr-image[data-v-f4016c3f] {
  1167. position: absolute;
  1168. -o-object-fit: contain;
  1169. object-fit: contain;
  1170. }
  1171. .images-viewer .image-container .curr-image.changing[data-v-f4016c3f] {
  1172. display: none;
  1173. transition: none;
  1174. }
  1175. .images-viewer .bottom-controls[data-v-f4016c3f] {
  1176. bottom: 16px;
  1177. display: flex;
  1178. margin-top: auto;
  1179. gap: 4px;
  1180. transition: var(--default-duration);
  1181. }
  1182. .images-viewer .bottom-controls.hide[data-v-f4016c3f] {
  1183. box-shadow: none;
  1184. transform: translateY(calc(100% + 16px)) scale(0.85);
  1185. }
  1186. .images-viewer .bottom-controls .bottom-btn[data-v-f4016c3f] {
  1187. overflow: hidden;
  1188. width: 100px;
  1189. height: 75px;
  1190. padding: 0;
  1191. border: none;
  1192. border-radius: 10px;
  1193. background-color: var(--trans-default-background);
  1194. transition: linear var(--xfast-duration);
  1195. }
  1196. .images-viewer .bottom-controls .bottom-btn .image-list[data-v-f4016c3f] {
  1197. width: 100%;
  1198. height: 100%;
  1199. -o-object-fit: cover;
  1200. object-fit: cover;
  1201. }
  1202. .images-viewer .bottom-controls .bottom-btn.selected[data-v-f4016c3f] {
  1203. border: 3px solid var(--tieba-theme-color);
  1204. }.post-container .bottom-controls .replies[data-v-6cdcd181]::before {
  1205. font-family: "Material Symbols", monospace !important;
  1206. }
  1207. .post-container .bottom-controls .replies[data-v-6cdcd181]::before {
  1208. font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 40;
  1209. -webkit-user-select: none;
  1210. -moz-user-select: none;
  1211. user-select: none;
  1212. }
  1213. a[data-v-6cdcd181] {
  1214. color: inherit;
  1215. -webkit-text-decoration: none;
  1216. text-decoration: none;
  1217. }
  1218. p[data-v-6cdcd181] {
  1219. margin: 0;
  1220. }
  1221. img[data-v-6cdcd181]::before {
  1222. display: block;
  1223. width: 100%;
  1224. height: 100%;
  1225. box-sizing: border-box;
  1226. background-color: var(--light-background);
  1227. content: "";
  1228. }
  1229. .dynamic .img-button[data-v-6cdcd181] {
  1230. min-width: 30% !important;
  1231. flex: initial !important;
  1232. flex-grow: 1 !important;
  1233. }
  1234. .post-container[data-v-6cdcd181] {
  1235. display: flex;
  1236. width: 100%;
  1237. box-sizing: border-box;
  1238. flex-direction: column;
  1239. padding: 16px;
  1240. border-radius: 16px;
  1241. background-color: var(--default-background);
  1242. cursor: pointer;
  1243. gap: 20px;
  1244. text-align: justify;
  1245. }
  1246. .post-container .forum-btn[data-v-6cdcd181] {
  1247. border-radius: 24px;
  1248. font-size: 14px;
  1249. }
  1250. .post-container .forum-btn[data-v-6cdcd181]:not(:hover):not(:active):not(:focus) {
  1251. background-color: var(--light-background);
  1252. box-shadow: none;
  1253. }
  1254. .post-container .main-content[data-v-6cdcd181] {
  1255. display: flex;
  1256. flex-direction: column;
  1257. gap: 8px;
  1258. }
  1259. .post-container .main-content .title[data-v-6cdcd181] {
  1260. margin: 0;
  1261. color: var(--highlight-fore);
  1262. font-weight: var(--font-weight-bold);
  1263. }
  1264. .post-container .main-content .content[data-v-6cdcd181] {
  1265. overflow: hidden;
  1266. color: var(--light-fore);
  1267. font-size: 14px;
  1268. text-overflow: ellipsis;
  1269. }
  1270. .post-container .img-container[data-v-6cdcd181] {
  1271. display: flex;
  1272. overflow: hidden;
  1273. flex-wrap: wrap;
  1274. border-radius: 16px;
  1275. gap: 6px;
  1276. }
  1277. .post-container .img-container .img-button[data-v-6cdcd181] {
  1278. overflow: hidden;
  1279. min-width: 40%;
  1280. height: 144px;
  1281. flex: 1;
  1282. padding: 0;
  1283. border: none;
  1284. border-radius: 0;
  1285. }
  1286. .post-container .img-container .img-button .post-img[data-v-6cdcd181] {
  1287. width: 100%;
  1288. height: 100%;
  1289. -o-object-fit: cover;
  1290. object-fit: cover;
  1291. transition: 0.4s cubic-bezier(0, 0, 0.2, 1);
  1292. }
  1293. .post-container .img-container .img-button .post-img[data-v-6cdcd181]:hover {
  1294. scale: 1.2;
  1295. }
  1296. .post-container .bottom-controls[data-v-6cdcd181] {
  1297. display: flex;
  1298. align-items: center;
  1299. gap: 12px;
  1300. }
  1301. .post-container .bottom-controls .author[data-v-6cdcd181] {
  1302. display: flex;
  1303. align-items: center;
  1304. padding: 0;
  1305. border-radius: 24px;
  1306. background-color: transparent;
  1307. background-color: initial;
  1308. }
  1309. .post-container .bottom-controls .author .author-portrait[data-v-6cdcd181] {
  1310. width: 32px;
  1311. height: 32px;
  1312. border-radius: 24px;
  1313. -o-object-fit: cover;
  1314. object-fit: cover;
  1315. }
  1316. .post-container .bottom-controls .author .author-info[data-v-6cdcd181] {
  1317. display: flex;
  1318. flex-direction: column;
  1319. padding: 0 10px;
  1320. text-align: left;
  1321. }
  1322. .post-container .bottom-controls .author .author-info .author-name[data-v-6cdcd181] {
  1323. font-size: 14px;
  1324. font-weight: var(--font-weight-bold);
  1325. }
  1326. .post-container .bottom-controls .author .author-info .post-time[data-v-6cdcd181] {
  1327. color: var(--minimal-fore);
  1328. font-size: 12px;
  1329. }
  1330. .post-container .bottom-controls .author[data-v-6cdcd181]:not(:hover):not(:active):not(:focus) {
  1331. box-shadow: none;
  1332. }
  1333. .post-container .bottom-controls .replies[data-v-6cdcd181] {
  1334. display: flex;
  1335. min-width: 16px;
  1336. align-items: center;
  1337. border-radius: 24px;
  1338. margin-left: auto;
  1339. color: var(--light-fore);
  1340. font-family: var(--code-zh);
  1341. font-size: 13px;
  1342. font-weight: var(--font-weight-bold);
  1343. }
  1344. .post-container .bottom-controls .replies[data-v-6cdcd181]::before {
  1345. margin-right: 6px;
  1346. content: "forum";
  1347. font-size: 16px;
  1348. font-weight: var(--font-weight-normal);
  1349. }.masonry-wrapper[data-v-a26c04a0] {
  1350. display: flex;
  1351. width: 100%;
  1352. max-width: var(--content-max);
  1353. flex-direction: column;
  1354. align-items: center;
  1355. gap: 12px;
  1356. }
  1357. .masonry-wrapper .masonry-container[data-v-a26c04a0] {
  1358. width: 100%;
  1359. margin: auto;
  1360. }
  1361. @keyframes feeds-in-a26c04a0 {
  1362. 0% {
  1363. transform: scale(0.72);
  1364. }
  1365. 100% {
  1366. transform: scale(1);
  1367. }
  1368. }
  1369. .masonry-wrapper .masonry-container .post-elem[data-v-a26c04a0] {
  1370. animation: feeds-in-a26c04a0 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.2);
  1371. }
  1372. .masonry-wrapper .masonry-container .post-elem[data-v-a26c04a0]:not(:hover):not(:active):not(:focus) {
  1373. box-shadow: none;
  1374. }
  1375. .masonry-wrapper > .post-elem[data-v-a26c04a0] {
  1376. position: absolute !important;
  1377. visibility: hidden !important;
  1378. }.index-wrapper .grid-container .profile-menu-container .curr-user .user-profile[data-v-763b23df] {
  1379. -o-object-fit: contain;
  1380. object-fit: contain;
  1381. }
  1382. a[data-v-763b23df] {
  1383. color: inherit;
  1384. -webkit-text-decoration: none;
  1385. text-decoration: none;
  1386. }
  1387. .block-wrapper[data-v-763b23df] {
  1388. display: flex;
  1389. flex-direction: column;
  1390. gap: 8px;
  1391. }
  1392. .block-controls[data-v-763b23df] {
  1393. display: flex;
  1394. width: 100%;
  1395. align-items: center;
  1396. gap: 8px;
  1397. }
  1398. .block-controls .block-title[data-v-763b23df] {
  1399. margin: 0;
  1400. font-size: 24px;
  1401. font-weight: var(--font-weight-bold);
  1402. }
  1403. .block-container[data-v-763b23df] {
  1404. padding: 8px;
  1405. border-radius: 12px;
  1406. background-color: var(--trans-light-background);
  1407. }
  1408. html:not([perf-saver]) body.custom-background .block-container[data-v-763b23df] {
  1409. -webkit-backdrop-filter: blur(24px);
  1410. backdrop-filter: blur(24px);
  1411. }
  1412. html.dark-theme body.custom-background .block-container[data-v-763b23df] {
  1413. -webkit-backdrop-filter: blur(24px) brightness(0.8);
  1414. backdrop-filter: blur(24px) brightness(0.8);
  1415. }
  1416. .block-panel[data-v-763b23df] {
  1417. display: flex;
  1418. min-width: 30px;
  1419. height: 26px;
  1420. align-items: center;
  1421. justify-content: center;
  1422. padding: 2px 8px;
  1423. border-radius: 24px;
  1424. margin-left: auto;
  1425. background-color: var(--trans-light-background);
  1426. font-size: 14px;
  1427. text-align: center;
  1428. }
  1429. .block-panel .icon[data-v-763b23df] {
  1430. color: var(--light-fore);
  1431. font-size: 18px;
  1432. }
  1433. .block-panel .panel-btn[data-v-763b23df] {
  1434. width: 30px;
  1435. height: 30px;
  1436. padding: 4px;
  1437. border: none;
  1438. border-radius: 48px;
  1439. }
  1440. .block-panel.left-align[data-v-763b23df] {
  1441. margin-left: 0;
  1442. }
  1443. .index-wrapper[data-v-763b23df] {
  1444. display: flex;
  1445. flex-direction: column;
  1446. align-items: center;
  1447. gap: 12px;
  1448. }
  1449. .index-wrapper .grid-container[data-v-763b23df] {
  1450. display: grid;
  1451. max-width: var(--content-max);
  1452. margin: 16px;
  1453. grid-gap: 36px;
  1454. gap: 36px;
  1455. grid-template-rows: repeat(1, 1fr);
  1456. }
  1457. .index-wrapper .grid-container .head-controls[data-v-763b23df] {
  1458. display: flex;
  1459. flex-direction: column;
  1460. align-items: center;
  1461. padding: 24px;
  1462. margin-top: 24px;
  1463. gap: 24px;
  1464. }
  1465. .index-wrapper .grid-container .head-controls .main-title[data-v-763b23df] {
  1466. display: flex;
  1467. align-items: center;
  1468. justify-content: center;
  1469. gap: 12px;
  1470. }
  1471. .index-wrapper .grid-container .head-controls .main-title .main-icon[data-v-763b23df] {
  1472. height: 64px;
  1473. }
  1474. .index-wrapper .grid-container .head-controls .main-title .title[data-v-763b23df] {
  1475. font-size: 36px;
  1476. font-style: italic;
  1477. font-weight: var(--font-weight-bold);
  1478. }
  1479. .index-wrapper .grid-container .head-controls .search-controls[data-v-763b23df] {
  1480. position: relative;
  1481. display: grid;
  1482. width: 100%;
  1483. max-width: 420px;
  1484. justify-content: center;
  1485. grid-template-columns: 1fr 72px;
  1486. }
  1487. .index-wrapper .grid-container .head-controls .search-controls .search-box[data-v-763b23df] {
  1488. width: 100%;
  1489. padding: 8px;
  1490. border-bottom-right-radius: 0;
  1491. border-top-right-radius: 0;
  1492. font-size: 16px;
  1493. }
  1494. .index-wrapper .grid-container .head-controls .search-controls .search-button[data-v-763b23df] {
  1495. border: none;
  1496. border-bottom-left-radius: 0;
  1497. border-top-left-radius: 0;
  1498. font-size: 16px;
  1499. font-weight: var(--font-weight-bold);
  1500. }
  1501. .index-wrapper .grid-container .head-controls .search-controls .search-suggestions[data-v-763b23df] {
  1502. position: absolute;
  1503. z-index: 1;
  1504. top: 100%;
  1505. display: flex;
  1506. overflow: hidden;
  1507. width: 100%;
  1508. box-sizing: border-box;
  1509. flex-direction: column;
  1510. border: 1px solid var(--border-color);
  1511. border-radius: 6px;
  1512. margin-top: 4px;
  1513. background-color: var(--default-background);
  1514. box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
  1515. animation: kf-fade-in 0.2s;
  1516. }
  1517. .index-wrapper .grid-container .head-controls .search-controls .search-suggestions .search-elem[data-v-763b23df] {
  1518. display: flex;
  1519. overflow: hidden;
  1520. box-sizing: border-box;
  1521. padding: 0;
  1522. padding: 8px;
  1523. border: none;
  1524. border-radius: 0;
  1525. animation: stretch-763b23df 0.2s cubic-bezier(0.22, 0.61, 0.36, 1);
  1526. gap: 8px;
  1527. text-align: justify;
  1528. }
  1529. @keyframes stretch-763b23df {
  1530. 0% {
  1531. padding: 4px 8px;
  1532. }
  1533. 100% {
  1534. padding: 8px;
  1535. }
  1536. }
  1537. .index-wrapper .grid-container .head-controls .search-controls .search-suggestions .search-elem .sugg-img[data-v-763b23df] {
  1538. width: 42px;
  1539. height: 42px;
  1540. border-radius: 8px;
  1541. }
  1542. .index-wrapper .grid-container .head-controls .search-controls .search-suggestions .search-elem .sugg-content[data-v-763b23df] {
  1543. position: relative;
  1544. display: flex;
  1545. width: calc(100% - 42px - 8px);
  1546. flex-direction: column;
  1547. justify-content: center;
  1548. gap: 4px;
  1549. }
  1550. .index-wrapper .grid-container .head-controls .search-controls .search-suggestions .search-elem .sugg-content .sugg-title[data-v-763b23df] {
  1551. overflow: hidden;
  1552. margin: 0;
  1553. font-size: 14px;
  1554. font-weight: var(--font-weight-bold);
  1555. text-overflow: ellipsis;
  1556. white-space: nowrap;
  1557. }
  1558. .index-wrapper .grid-container .head-controls .search-controls .search-suggestions .search-elem .sugg-content .sugg-desc[data-v-763b23df] {
  1559. overflow: hidden;
  1560. margin: 0;
  1561. color: var(--light-fore);
  1562. font-size: 12px;
  1563. text-overflow: ellipsis;
  1564. white-space: nowrap;
  1565. }
  1566. .index-wrapper .grid-container .profile-menu-container[data-v-763b23df] {
  1567. position: absolute;
  1568. z-index: 1;
  1569. }
  1570. .index-wrapper .grid-container .profile-menu-container .curr-user[data-v-763b23df] {
  1571. position: fixed;
  1572. top: 24px;
  1573. left: 24px;
  1574. overflow: hidden;
  1575. width: 36px;
  1576. height: 36px;
  1577. padding: 0;
  1578. border: 3px solid var(--border-color);
  1579. border-radius: 36px;
  1580. }
  1581. .index-wrapper .grid-container .profile-menu-container .curr-user .user-profile[data-v-763b23df] {
  1582. width: 100%;
  1583. }
  1584. .index-wrapper .grid-container .profile-menu-container .profile-menu[data-v-763b23df] {
  1585. top: 64px;
  1586. left: 24px;
  1587. }
  1588. .index-wrapper .grid-container .config-menu-container[data-v-763b23df] {
  1589. position: absolute;
  1590. z-index: 1;
  1591. display: flex;
  1592. }
  1593. .index-wrapper .grid-container .config-menu-container .config-menu-btn[data-v-763b23df] {
  1594. position: fixed;
  1595. top: 24px;
  1596. right: 24px;
  1597. height: 32px;
  1598. border: none;
  1599. border-radius: 36px;
  1600. background-color: var(--page-background);
  1601. font-size: 24px;
  1602. }
  1603. .index-wrapper .grid-container .config-menu-container .config-menu-btn[data-v-763b23df]:hover {
  1604. background-color: var(--default-background);
  1605. }
  1606. .index-wrapper .grid-container .config-menu-container .config-menu-btn[data-v-763b23df]:active {
  1607. background-color: var(--default-hover);
  1608. }
  1609. .index-wrapper .grid-container .config-menu-container .config-menu[data-v-763b23df] {
  1610. top: 64px;
  1611. right: 24px;
  1612. opacity: 1;
  1613. }
  1614. .index-wrapper .grid-container .signed-count[data-v-763b23df] {
  1615. font-weight: var(--font-weight-bold);
  1616. }
  1617. .index-wrapper .grid-container .block-panel.followed[data-v-763b23df] {
  1618. margin-left: auto;
  1619. }
  1620. .index-wrapper .grid-container .followed-container[data-v-763b23df] {
  1621. margin-top: -16px;
  1622. }
  1623. .index-wrapper .grid-container .followed-container .followed-list[data-v-763b23df] {
  1624. display: flex;
  1625. flex-wrap: wrap;
  1626. padding: 8px;
  1627. border-radius: 12px;
  1628. background-color: var(--trans-light-background);
  1629. gap: 4px;
  1630. }
  1631. .index-wrapper .grid-container .followed-container .followed-list .followed-btn[data-v-763b23df] {
  1632. display: flex;
  1633. align-items: center;
  1634. padding: 6px 8px;
  1635. border-radius: 12px;
  1636. font-size: 14px;
  1637. gap: 6px;
  1638. }
  1639. .index-wrapper .grid-container .followed-container .followed-list .followed-btn .signed[data-v-763b23df] {
  1640. color: green;
  1641. font-weight: var(--font-weight-bold);
  1642. }
  1643. .index-wrapper .grid-container .followed-container .followed-list .followed-btn .forum-level[data-v-763b23df] {
  1644. min-width: 24px;
  1645. padding: 0 2px;
  1646. border-radius: 24px;
  1647. font-weight: var(--font-weight-bold);
  1648. text-align: center;
  1649. }
  1650. .index-wrapper .grid-container .topic-list[data-v-763b23df] {
  1651. display: grid;
  1652. grid-gap: 4px;
  1653. gap: 4px;
  1654. grid-auto-rows: max-content;
  1655. grid-template-columns: repeat(2, 1fr);
  1656. }
  1657. .index-wrapper .grid-container .topic-list .topic-btn[data-v-763b23df] {
  1658. display: flex;
  1659. width: 100%;
  1660. height: 100%;
  1661. align-items: center;
  1662. padding: 12px;
  1663. border-radius: 12px;
  1664. gap: 8px;
  1665. }
  1666. .index-wrapper .grid-container .topic-list .topic-btn .topic-img[data-v-763b23df] {
  1667. width: 72px;
  1668. border-radius: 12px;
  1669. }
  1670. .index-wrapper .grid-container .topic-list .topic-btn .topic-content[data-v-763b23df] {
  1671. display: flex;
  1672. flex-flow: column wrap;
  1673. gap: 4px;
  1674. text-align: justify;
  1675. }
  1676. .index-wrapper .grid-container .topic-list .topic-btn .topic-content .topic-title[data-v-763b23df] {
  1677. display: flex;
  1678. align-items: center;
  1679. gap: 6px;
  1680. }
  1681. .index-wrapper .grid-container .topic-list .topic-btn .topic-content .topic-title [class^=topic-rank][data-v-763b23df] {
  1682. padding: 0 4px;
  1683. border-radius: 4px;
  1684. background-color: orange;
  1685. color: var(--default-background);
  1686. font-weight: var(--font-weight-bold);
  1687. text-align: center;
  1688. }
  1689. .index-wrapper .grid-container .topic-list .topic-btn .topic-content .topic-title .topic-name[data-v-763b23df] {
  1690. font-size: 16px;
  1691. font-weight: var(--font-weight-bold);
  1692. }
  1693. .index-wrapper .grid-container .topic-list .topic-btn .topic-content .topic-desc[data-v-763b23df] {
  1694. color: var(--light-fore);
  1695. font-size: 14px;
  1696. }
  1697. .index-wrapper .masonry-container[data-v-763b23df] {
  1698. display: flex;
  1699. width: calc(100% - 32px);
  1700. max-width: var(--content-max);
  1701. box-sizing: border-box;
  1702. flex-direction: column;
  1703. align-items: center;
  1704. gap: 8px;
  1705. }
  1706. .index-wrapper .masonry-container .feeds-container[data-v-763b23df] {
  1707. width: 100%;
  1708. margin: auto;
  1709. }
  1710. @keyframes feeds-in-763b23df {
  1711. 0% {
  1712. transform: scale(0.72);
  1713. }
  1714. 100% {
  1715. transform: scale(1);
  1716. }
  1717. }
  1718. @keyframes refresh-btn-in-763b23df {
  1719. 0% {
  1720. padding: 0 18px;
  1721. opacity: 0;
  1722. }
  1723. 100% {
  1724. padding: 8px 18px;
  1725. opacity: 1;
  1726. }
  1727. }
  1728. .index-wrapper .masonry-container .feeds-container .feeds-refresh-btn[data-v-763b23df] {
  1729. position: fixed;
  1730. z-index: 1;
  1731. bottom: 24px;
  1732. left: 50%;
  1733. display: flex;
  1734. align-items: center;
  1735. justify-content: center;
  1736. padding: 8px 18px;
  1737. border-width: 2px;
  1738. border-radius: 16px;
  1739. animation: refresh-btn-in-763b23df 0.4s ease;
  1740. box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  1741. font-size: 14px;
  1742. font-weight: var(--font-weight-bold);
  1743. gap: 6px;
  1744. transform: translateX(-50%);
  1745. }
  1746. .index-wrapper .masonry-container .feeds-container .feeds-refresh-btn .icon[data-v-763b23df] {
  1747. font-size: 18px;
  1748. }
  1749. .index-wrapper .masonry-container .post-elem[data-v-763b23df] {
  1750. animation: feeds-in-763b23df 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.2);
  1751. }
  1752. .index-wrapper .masonry-container .post-elem[data-v-763b23df]:not(:hover):not(:active):not(:focus) {
  1753. box-shadow: none;
  1754. }
  1755. .index-wrapper .masonry-container .empty-container .no-feed-content[data-v-763b23df] {
  1756. color: var(--minimal-fore);
  1757. font-size: small;
  1758. text-align: center;
  1759. }.float-message {
  1760. box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  1761. position: absolute;
  1762. z-index: 99999;
  1763. overflow: hidden;
  1764. box-sizing: border-box;
  1765. padding: 4px 6px;
  1766. border: 1px solid var(--border-color);
  1767. border-radius: 6px;
  1768. background-color: var(--default-background);
  1769. font-size: 14px;
  1770. }
  1771. html.dark-theme .float-message {
  1772. box-shadow: 0 0 16px rgba(0, 0, 0, 0.4);
  1773. }
  1774. .float-message.float-message-enter-active {
  1775. animation: kf-fade-in var(--fast-duration);
  1776. }
  1777. .float-message.float-message-leave-active {
  1778. animation: kf-fade-out var(--fast-duration);
  1779. }.pager-wrapper .pager-button-container .pager-button.icon[data-v-2946e41a] {
  1780. font-family: "Material Symbols", monospace !important;
  1781. }
  1782. .pager-wrapper .pager-button-container .pager-button.icon[data-v-2946e41a] {
  1783. font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 40;
  1784. -webkit-user-select: none;
  1785. -moz-user-select: none;
  1786. user-select: none;
  1787. }
  1788. .pager-wrapper[data-v-2946e41a] {
  1789. display: flex;
  1790. width: -moz-fit-content;
  1791. width: fit-content;
  1792. box-sizing: border-box;
  1793. align-items: center;
  1794. padding: 4px;
  1795. font-size: 16px;
  1796. gap: 6px;
  1797. }
  1798. .pager-wrapper .pager-button-container[data-v-2946e41a] {
  1799. display: flex;
  1800. align-items: center;
  1801. }
  1802. .pager-wrapper .pager-button-container .pager-button[data-v-2946e41a] {
  1803. padding: 4px 10px;
  1804. color: var(--default-fore);
  1805. font-family: var(--code-zh);
  1806. }
  1807. .pager-wrapper .pager-button-container .pager-button[data-v-2946e41a]:not(:hover):not(:active):not(:focus) {
  1808. background-color: transparent;
  1809. }
  1810. .pager-wrapper .pager-button-container .pager-button.fill[data-v-2946e41a]:not(:hover):not(:active):not(:focus) {
  1811. background-color: var(--default-background);
  1812. }
  1813. .pager-wrapper .pager-button-container .pager-button.curr-pager-button[data-v-2946e41a] {
  1814. border-radius: 0;
  1815. box-shadow: 0 3px 0 var(--tieba-theme-color);
  1816. color: var(--tieba-theme-color);
  1817. }
  1818. .pager-wrapper .pager-separactor[data-v-2946e41a] {
  1819. color: var(--minimal-fore);
  1820. font-family: var(--code-monospace);
  1821. }
  1822. .pager-wrapper .jumper-container[data-v-2946e41a] {
  1823. display: flex;
  1824. align-items: center;
  1825. color: var(--light-fore);
  1826. gap: 6px;
  1827. }
  1828. .pager-wrapper .jumper-container .jumper[data-v-2946e41a] {
  1829. width: 36px;
  1830. width: 3em;
  1831. padding: 2px 4px;
  1832. color: var(--default-fore);
  1833. font-family: var(--code-monospace);
  1834. }
  1835. .pager-wrapper .tail-slot[data-v-2946e41a] {
  1836. margin-left: auto;
  1837. color: var(--minimal-fore);
  1838. }#thread-editor[data-v-b7d4fc0f] {
  1839. display: flex;
  1840. width: 100%;
  1841. max-width: var(--content-max);
  1842. max-height: 100vh;
  1843. box-sizing: border-box;
  1844. flex-direction: column;
  1845. align-items: center;
  1846. margin: auto auto 0;
  1847. background-color: var(--default-background);
  1848. font-size: 12px;
  1849. gap: 8px;
  1850. transition: 0.4s;
  1851. }
  1852. #thread-editor #thread-editor-exit[data-v-b7d4fc0f] {
  1853. margin-left: auto;
  1854. font-size: 18px;
  1855. }
  1856. #thread-editor #thread-editor-exit[data-v-b7d4fc0f]:not(:hover):not(:active):not(:focus) {
  1857. box-shadow: none;
  1858. }
  1859. #thread-editor .title-editor[data-v-b7d4fc0f] {
  1860. width: 100%;
  1861. flex-grow: 1;
  1862. border-width: 3px;
  1863. background-color: transparent;
  1864. font-size: 24px;
  1865. font-weight: var(--font-weight-bold);
  1866. }
  1867. #thread-editor h1[data-v-b7d4fc0f] {
  1868. margin-right: auto;
  1869. }
  1870. #thread-editor #thread-editor-slot[data-v-b7d4fc0f] {
  1871. width: 100%;
  1872. flex-shrink: 2;
  1873. }
  1874. #thread-editor #thread-editor-toolbar[data-v-b7d4fc0f] {
  1875. display: flex;
  1876. width: 100%;
  1877. align-items: center;
  1878. }
  1879. #thread-editor #thread-editor-toolbar #thread-editor-submit[data-v-b7d4fc0f] {
  1880. padding: 4px 12px;
  1881. margin-left: auto;
  1882. font-size: 16px;
  1883. font-weight: var(--font-weight-bold);
  1884. }#thread-editor .edui-container .edui-toolbar .edui-btn-toolbar .edui-btn .edui-icon::before {
  1885. font-family: "Material Symbols", monospace !important;
  1886. }
  1887. #thread-editor .edui-container .edui-toolbar .edui-btn-toolbar .edui-btn .edui-icon::before {
  1888. font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 40;
  1889. -webkit-user-select: none;
  1890. -moz-user-select: none;
  1891. user-select: none;
  1892. }
  1893. body {
  1894. overflow-x: hidden;
  1895. overflow-y: scroll;
  1896. overflow: hidden scroll;
  1897. }
  1898. #thread-editor #ueditor_replace {
  1899. font-size: 16px;
  1900. }
  1901. #thread-editor .edui-container {
  1902. width: 100% !important;
  1903. }
  1904. #thread-editor .edui-container .edui-toolbar {
  1905. height: auto;
  1906. align-items: center;
  1907. background-color: transparent;
  1908. }
  1909. #thread-editor .edui-container .edui-toolbar .edui-btn-toolbar {
  1910. display: flex;
  1911. background-color: transparent;
  1912. gap: 8px;
  1913. }
  1914. #thread-editor .edui-container .edui-toolbar .edui-btn-toolbar .edui-btn {
  1915. padding: 1px;
  1916. border-radius: 4px;
  1917. margin-right: 0;
  1918. background: none;
  1919. background-color: var(--light-background);
  1920. box-shadow: 0 0 0 1px var(--border-color);
  1921. cursor: pointer;
  1922. transition: 0.4s;
  1923. }
  1924. #thread-editor .edui-container .edui-toolbar .edui-btn-toolbar .edui-btn .edui-icon {
  1925. display: flex;
  1926. width: -moz-max-content;
  1927. width: max-content;
  1928. align-items: center;
  1929. padding: 2px 4px;
  1930. background: none;
  1931. gap: 4px;
  1932. }
  1933. #thread-editor .edui-container .edui-toolbar .edui-btn-toolbar .edui-btn .edui-icon::before {
  1934. font-size: 16px;
  1935. }
  1936. #thread-editor .edui-container .edui-toolbar .edui-dialog-container .edui-dropdown-menu {
  1937. overflow: hidden;
  1938. width: -moz-max-content;
  1939. width: max-content;
  1940. padding: 0;
  1941. border: 2px solid var(--border-color);
  1942. border-radius: 6px;
  1943. background: none;
  1944. }
  1945. #thread-editor .edui-container .edui-toolbar .edui-dialog-container .edui-dropdown-menu .edui-popup-body {
  1946. padding: 0;
  1947. border: none;
  1948. background-color: var(--default-background);
  1949. }
  1950. #thread-editor .edui-container .edui-toolbar .edui-dialog-container .edui-dropdown-menu .edui-popup-caret {
  1951. display: none;
  1952. }
  1953. #thread-editor .edui-container .edui-editor-body {
  1954. border: none;
  1955. border-radius: 0;
  1956. border-bottom: 3px solid var(--tieba-theme-color);
  1957. transition: 0.4s;
  1958. }
  1959. #thread-editor .edui-container .edui-editor-body:hover {
  1960. border-color: var(--light-background);
  1961. }
  1962. #thread-editor .edui-container .edui-editor-body:focus {
  1963. border-color: var(--tieba-theme-color);
  1964. }
  1965. #thread-editor .edui-container .edui-body-container {
  1966. min-height: 18px !important;
  1967. }
  1968. #thread-editor .edui-container .edui-body-container {
  1969. max-height: 50vh;
  1970. padding: 0;
  1971. border-radius: 0;
  1972. background-color: transparent;
  1973. }
  1974. .edui-btn-topic {
  1975. display: none !important;
  1976. }
  1977. #thread-editor .edui-btn-toolbar .edui-icon.edui-icon-medal::before {
  1978. content: "diamond";
  1979. }
  1980. #thread-editor .edui-btn-toolbar .edui-icon.edui-icon-medal::after {
  1981. content: "\u7279\u6743";
  1982. }
  1983. #thread-editor .edui-btn-toolbar .edui-icon.edui-icon-image::before {
  1984. content: "photo";
  1985. }
  1986. #thread-editor .edui-btn-toolbar .edui-icon.edui-icon-image::after {
  1987. content: "\u63D2\u5165\u56FE\u7247";
  1988. }
  1989. #thread-editor .edui-btn-toolbar .edui-icon.edui-icon-video::before {
  1990. content: "video_file";
  1991. }
  1992. #thread-editor .edui-btn-toolbar .edui-icon.edui-icon-video::after {
  1993. content: "\u63D2\u5165\u89C6\u9891";
  1994. }
  1995. #thread-editor .edui-btn-toolbar .edui-icon.edui-icon-emotion::before {
  1996. content: "face";
  1997. }
  1998. #thread-editor .edui-btn-toolbar .edui-icon.edui-icon-emotion::after {
  1999. content: "\u63D2\u5165\u8868\u60C5";
  2000. }
  2001. #thread-editor .edui-btn-toolbar .edui-icon.edui-icon-scrawl::before {
  2002. content: "format_paint";
  2003. }
  2004. #thread-editor .edui-btn-toolbar .edui-icon.edui-icon-scrawl::after {
  2005. content: "\u6D82\u9E26";
  2006. }
  2007. #thread-editor .edui-btn-toolbar .edui-icon.edui-icon-topic::before {
  2008. content: "grid_3x3";
  2009. }
  2010. #thread-editor .edui-btn-toolbar .edui-icon.edui-icon-topic::after {
  2011. content: "\u8BDD\u9898";
  2012. }
  2013. #thread-editor .edui-btn-toolbar .edui-icon.edui-icon-quick-reply::before {
  2014. content: "rocket_launch";
  2015. }
  2016. #thread-editor .edui-btn-toolbar .edui-icon.edui-icon-quick-reply::after {
  2017. content: "\u5FEB\u901F\u56DE\u5E16";
  2018. }
  2019. .edui-popup-body .layer_medal_list li a::before,
  2020. .edui-popup-body .layer_btn_list li a::before {
  2021. font-family: "Material Symbols", monospace !important;
  2022. }
  2023. .edui-popup-body .layer_medal_list li a::before,
  2024. .edui-popup-body .layer_btn_list li a::before {
  2025. font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 40;
  2026. -webkit-user-select: none;
  2027. -moz-user-select: none;
  2028. user-select: none;
  2029. }
  2030. .edui-dialog-container .upload_container .next_step, .edui-popup-body .layer_medal_list li a,
  2031. .edui-popup-body .layer_btn_list li a {
  2032. box-sizing: border-box;
  2033. padding: 4px 12px;
  2034. border: none;
  2035. border-radius: 6px;
  2036. background: none;
  2037. background-color: var(--default-background);
  2038. box-shadow: 0 0 0 1px var(--border-color);
  2039. color: var(--default-fore);
  2040. cursor: pointer;
  2041. transition: var(--default-duration);
  2042. }
  2043. .edui-dialog-container .upload_container .next_step:hover:not([disabled]), .edui-popup-body .layer_medal_list li a:hover:not([disabled]),
  2044. .edui-popup-body .layer_btn_list li a:hover:not([disabled]) {
  2045. background-color: var(--default-hover);
  2046. }
  2047. .edui-dialog-container .upload_container .next_step:active:not([disabled]), .edui-popup-body .layer_medal_list li a:active:not([disabled]),
  2048. .edui-popup-body .layer_btn_list li a:active:not([disabled]) {
  2049. background-color: var(--default-active);
  2050. }
  2051. .edui-dialog-container .upload_container .next_step:focus:not([disabled]), .edui-popup-body .layer_medal_list li a:focus:not([disabled]),
  2052. .edui-popup-body .layer_btn_list li a:focus:not([disabled]) {
  2053. border-color: var(--tieba-theme-color);
  2054. box-shadow: 0 0 0 2px var(--tieba-theme-color);
  2055. }
  2056. .edui-dialog-container .upload_container .theme-style.next_step, .edui-popup-body .layer_medal_list li a.theme-style,
  2057. .edui-popup-body .layer_btn_list li a.theme-style {
  2058. color: var(--default-background) !important;
  2059. }
  2060. .edui-dialog-container .upload_container .theme-style.next_step, .edui-popup-body .layer_medal_list li a.theme-style,
  2061. .edui-popup-body .layer_btn_list li a.theme-style {
  2062. background-color: var(--tieba-theme-color);
  2063. }
  2064. .edui-dialog-container .upload_container .theme-style.next_step:hover, .edui-popup-body .layer_medal_list li a.theme-style:hover,
  2065. .edui-popup-body .layer_btn_list li a.theme-style:hover {
  2066. background-color: var(--tieba-theme-hover);
  2067. }
  2068. .edui-dialog-container .upload_container .theme-style.next_step:active, .edui-popup-body .layer_medal_list li a.theme-style:active,
  2069. .edui-popup-body .layer_btn_list li a.theme-style:active {
  2070. background-color: var(--tieba-theme-active);
  2071. }
  2072. .edui-dialog-container .upload_container .unset-background.next_step, .edui-popup-body .layer_medal_list li a.unset-background,
  2073. .edui-popup-body .layer_btn_list li a.unset-background {
  2074. background-color: transparent;
  2075. background-color: initial;
  2076. }
  2077. .edui-dialog-container .upload_container .no-border.next_step, .edui-popup-body .layer_medal_list li a.no-border,
  2078. .edui-popup-body .layer_btn_list li a.no-border {
  2079. box-shadow: none;
  2080. }
  2081. .edui-dialog-container .upload_container .no-border-all.next_step, .edui-popup-body .layer_medal_list li a.no-border-all,
  2082. .edui-popup-body .layer_btn_list li a.no-border-all {
  2083. box-shadow: none;
  2084. }
  2085. .edui-dialog-container .upload_container .no-border-all.next_step:hover, .edui-popup-body .layer_medal_list li a.no-border-all:hover,
  2086. .edui-popup-body .layer_btn_list li a.no-border-all:hover, .edui-dialog-container .upload_container .no-border-all.next_step:focus, .edui-popup-body .layer_medal_list li a.no-border-all:focus,
  2087. .edui-popup-body .layer_btn_list li a.no-border-all:focus {
  2088. box-shadow: none;
  2089. }
  2090. .edui-dialog-container .edui-popup {
  2091. position: static !important;
  2092. }
  2093. .edui-dialog-container .upload_container {
  2094. padding: 0 20px 20px 0;
  2095. }
  2096. .edui-dialog-container .upload_container .slide_item_img {
  2097. border-color: var(--tieba-theme-color) !important;
  2098. }
  2099. .edui-dialog-container .upload_container .slide_item_img {
  2100. overflow: hidden;
  2101. }
  2102. .edui-dialog-container .upload_container .watermark_options {
  2103. position: static;
  2104. margin-left: 20px;
  2105. }
  2106. .edui-dialog-container .upload_container .next_step {
  2107. position: static;
  2108. width: -moz-max-content;
  2109. width: max-content;
  2110. height: -moz-max-content;
  2111. height: max-content;
  2112. padding: 4px 8px;
  2113. margin-left: auto;
  2114. line-height: normal;
  2115. }
  2116. .edui-popup-body {
  2117. position: static;
  2118. }
  2119. .edui-popup-body .layer_medal_list,
  2120. .edui-popup-body .layer_btn_list {
  2121. width: -moz-max-content;
  2122. width: max-content;
  2123. height: -moz-max-content;
  2124. height: max-content;
  2125. }
  2126. .edui-popup-body .layer_medal_list li,
  2127. .edui-popup-body .layer_btn_list li {
  2128. display: flex;
  2129. overflow: hidden;
  2130. align-items: center;
  2131. padding: 0;
  2132. background: none;
  2133. }
  2134. .edui-popup-body .layer_medal_list li a,
  2135. .edui-popup-body .layer_btn_list li a {
  2136. display: flex;
  2137. width: -moz-max-content;
  2138. width: max-content;
  2139. height: -moz-max-content;
  2140. height: max-content;
  2141. align-items: center;
  2142. padding: 4px 8px;
  2143. border-radius: 0;
  2144. box-shadow: none;
  2145. gap: 4px;
  2146. }
  2147. .edui-popup-body .layer_medal_list li a::before,
  2148. .edui-popup-body .layer_btn_list li a::before {
  2149. font-size: 16px;
  2150. }
  2151. .layer_medal_list li.post_bubble a::before {
  2152. content: "bubble_chart";
  2153. }
  2154. .layer_medal_list li.post_bubble a::after {
  2155. content: "\u53D1\u5E16\u6C14\u6CE1";
  2156. }
  2157. .layer_medal_list li.colorful_font a::before {
  2158. content: "format_color_text";
  2159. }
  2160. .layer_medal_list li.colorful_font a::after {
  2161. content: "\u5F69\u8272\u5B57\u4F53";
  2162. }
  2163. .layer_btn_list {
  2164. padding: 0 !important;
  2165. }
  2166. .layer_btn_list li {
  2167. border: none !important;
  2168. }
  2169. .layer_btn_list li.from_upload a::before {
  2170. content: "upload_file";
  2171. }
  2172. .layer_btn_list li.from_upload a::after {
  2173. content: "\u4E0A\u4F20\u6587\u4EF6";
  2174. }
  2175. .layer_btn_list li.from_web a::before {
  2176. content: "web";
  2177. }
  2178. .layer_btn_list li.from_web a::after {
  2179. content: "\u7F51\u7EDC\u56FE\u7247";
  2180. }#thread-editor .emotion_container .ueditor_emotion_tab .s_prev::before,
  2181. #thread-editor .emotion_container .ueditor_emotion_tab .s_next::before {
  2182. font-family: "Material Symbols", monospace !important;
  2183. }
  2184. #thread-editor .emotion_container .ueditor_emotion_tab .s_prev::before,
  2185. #thread-editor .emotion_container .ueditor_emotion_tab .s_next::before {
  2186. font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 40;
  2187. -webkit-user-select: none;
  2188. -moz-user-select: none;
  2189. user-select: none;
  2190. }
  2191. #thread-editor .emotion_container .ueditor_emotion_tab .s_prev,
  2192. #thread-editor .emotion_container .ueditor_emotion_tab .s_next {
  2193. box-sizing: border-box;
  2194. padding: 4px 12px;
  2195. border: none;
  2196. border-radius: 6px;
  2197. background: none;
  2198. background-color: var(--default-background);
  2199. box-shadow: 0 0 0 1px var(--border-color);
  2200. color: var(--default-fore);
  2201. cursor: pointer;
  2202. transition: var(--default-duration);
  2203. }
  2204. #thread-editor .emotion_container .ueditor_emotion_tab .s_prev:hover:not([disabled]),
  2205. #thread-editor .emotion_container .ueditor_emotion_tab .s_next:hover:not([disabled]) {
  2206. background-color: var(--default-hover);
  2207. }
  2208. #thread-editor .emotion_container .ueditor_emotion_tab .s_prev:active:not([disabled]),
  2209. #thread-editor .emotion_container .ueditor_emotion_tab .s_next:active:not([disabled]) {
  2210. background-color: var(--default-active);
  2211. }
  2212. #thread-editor .emotion_container .ueditor_emotion_tab .s_prev:focus:not([disabled]),
  2213. #thread-editor .emotion_container .ueditor_emotion_tab .s_next:focus:not([disabled]) {
  2214. border-color: var(--tieba-theme-color);
  2215. box-shadow: 0 0 0 2px var(--tieba-theme-color);
  2216. }
  2217. #thread-editor .emotion_container .ueditor_emotion_tab .theme-style.s_prev,
  2218. #thread-editor .emotion_container .ueditor_emotion_tab .theme-style.s_next {
  2219. color: var(--default-background) !important;
  2220. }
  2221. #thread-editor .emotion_container .ueditor_emotion_tab .theme-style.s_prev,
  2222. #thread-editor .emotion_container .ueditor_emotion_tab .theme-style.s_next {
  2223. background-color: var(--tieba-theme-color);
  2224. }
  2225. #thread-editor .emotion_container .ueditor_emotion_tab .theme-style.s_prev:hover,
  2226. #thread-editor .emotion_container .ueditor_emotion_tab .theme-style.s_next:hover {
  2227. background-color: var(--tieba-theme-hover);
  2228. }
  2229. #thread-editor .emotion_container .ueditor_emotion_tab .theme-style.s_prev:active,
  2230. #thread-editor .emotion_container .ueditor_emotion_tab .theme-style.s_next:active {
  2231. background-color: var(--tieba-theme-active);
  2232. }
  2233. #thread-editor .emotion_container .ueditor_emotion_tab .unset-background.s_prev,
  2234. #thread-editor .emotion_container .ueditor_emotion_tab .unset-background.s_next {
  2235. background-color: transparent;
  2236. background-color: initial;
  2237. }
  2238. #thread-editor .emotion_container .ueditor_emotion_tab .no-border.s_prev,
  2239. #thread-editor .emotion_container .ueditor_emotion_tab .no-border.s_next {
  2240. box-shadow: none;
  2241. }
  2242. #thread-editor .emotion_container .ueditor_emotion_tab .no-border-all.s_prev,
  2243. #thread-editor .emotion_container .ueditor_emotion_tab .no-border-all.s_next {
  2244. box-shadow: none;
  2245. }
  2246. #thread-editor .emotion_container .ueditor_emotion_tab .no-border-all.s_prev:hover,
  2247. #thread-editor .emotion_container .ueditor_emotion_tab .no-border-all.s_next:hover, #thread-editor .emotion_container .ueditor_emotion_tab .no-border-all.s_prev:focus,
  2248. #thread-editor .emotion_container .ueditor_emotion_tab .no-border-all.s_next:focus {
  2249. box-shadow: none;
  2250. }
  2251. #thread-editor .emotion_container .tbui_scroll_panel {
  2252. overflow: hidden;
  2253. border-radius: 4px 4px 0 0;
  2254. }
  2255. html.dark-theme #thread-editor .emotion_container td, html.dark-theme #thread-editor .emotion_container .emotion_preview {
  2256. filter: brightness(0.8);
  2257. }
  2258. #thread-editor .emotion_container .emotion_preview {
  2259. border: 1px solid var(--border-color);
  2260. border-radius: 6px;
  2261. box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  2262. }
  2263. html.dark-theme #thread-editor .emotion_container .emotion_preview {
  2264. box-shadow: 0 0 16px rgba(0, 0, 0, 0.4);
  2265. }
  2266. #thread-editor .emotion_container .ueditor_emotion_tab {
  2267. display: flex;
  2268. align-items: center;
  2269. justify-content: space-evenly;
  2270. border-top: 2px solid var(--border-color);
  2271. background: none;
  2272. background-color: var(--default-background);
  2273. color: var(--default-fore);
  2274. }
  2275. #thread-editor .emotion_container .ueditor_emotion_tab .s_prev,
  2276. #thread-editor .emotion_container .ueditor_emotion_tab .s_next {
  2277. width: -moz-max-content !important;
  2278. width: max-content !important;
  2279. height: -moz-max-content !important;
  2280. height: max-content !important;
  2281. }
  2282. #thread-editor .emotion_container .ueditor_emotion_tab .s_prev,
  2283. #thread-editor .emotion_container .ueditor_emotion_tab .s_next {
  2284. position: static;
  2285. padding: 0 2px;
  2286. background: none;
  2287. box-shadow: none;
  2288. }
  2289. #thread-editor .emotion_container .ueditor_emotion_tab .s_prev::before,
  2290. #thread-editor .emotion_container .ueditor_emotion_tab .s_next::before {
  2291. font-size: 10px;
  2292. }
  2293. #thread-editor .emotion_container .ueditor_emotion_tab .s_prev::before {
  2294. content: "arrow_back_ios";
  2295. }
  2296. #thread-editor .emotion_container .ueditor_emotion_tab .s_next::before {
  2297. content: "arrow_forward_ios";
  2298. }
  2299. #thread-editor .emotion_container .ueditor_emotion_tab .s_tab_con_wrapper {
  2300. position: static;
  2301. }
  2302. #thread-editor .emotion_container .ueditor_emotion_tab .s_tab_con_wrapper .s_tab_btn {
  2303. border-radius: 4px;
  2304. background: none;
  2305. background-color: var(--default-background);
  2306. }
  2307. #thread-editor .emotion_container .ueditor_emotion_tab .s_tab_con_wrapper .s_tab_btn .s_tab_btnbg {
  2308. border-radius: 4px;
  2309. background: none;
  2310. transition: var(--default-duration);
  2311. }
  2312. #thread-editor .emotion_container .ueditor_emotion_tab .s_tab_con_wrapper .s_hover {
  2313. filter: brightness(1.2);
  2314. }
  2315. #thread-editor .emotion_container .ueditor_emotion_tab .s_tab_con_wrapper .s_hover .s_tab_btnbg {
  2316. filter: brightness(1.4);
  2317. }
  2318. #thread-editor .emotion_container .ueditor_emotion_tab .s_tab_con_wrapper .selected {
  2319. background: none;
  2320. }
  2321. #thread-editor .emotion_container .ueditor_emotion_tab .s_tab_con_wrapper .selected .s_tab_btnbg {
  2322. background-color: var(--tieba-theme-color);
  2323. color: var(--default-background);
  2324. font-weight: var(--font-weight-bold);
  2325. }.toggle-panel .toggle-container .panel-button.toggle-off[data-v-02e7f412] {
  2326. font-family: "Material Symbols", monospace !important;
  2327. }
  2328. .toggle-panel .toggle-container .panel-button.toggle-off[data-v-02e7f412] {
  2329. font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 40;
  2330. -webkit-user-select: none;
  2331. -moz-user-select: none;
  2332. user-select: none;
  2333. }
  2334. .toggle-panel .toggle-container .panel-button.toggle-on[data-v-02e7f412] {
  2335. font-family: "Material Symbols", monospace !important;
  2336. }
  2337. .toggle-panel .toggle-container .panel-button.toggle-on[data-v-02e7f412] {
  2338. font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 40;
  2339. -webkit-user-select: none;
  2340. -moz-user-select: none;
  2341. user-select: none;
  2342. }
  2343. .toggle-panel[data-v-02e7f412] {
  2344. display: flex;
  2345. flex-wrap: wrap;
  2346. justify-content: center;
  2347. gap: 8px;
  2348. }
  2349. .toggle-panel .toggle-container[data-v-02e7f412] {
  2350. display: flex;
  2351. flex-direction: column;
  2352. align-items: center;
  2353. gap: 4px;
  2354. }
  2355. .toggle-panel .toggle-container .panel-button[data-v-02e7f412] {
  2356. width: 58px;
  2357. height: 58px;
  2358. border-radius: 12px;
  2359. font-size: 24px;
  2360. }
  2361. .toggle-panel .toggle-container .panel-button.toggle-off[data-v-02e7f412] {
  2362. color: var(--minimal-fore);
  2363. }
  2364. .toggle-panel .toggle-container .panel-button.toggle-on[data-v-02e7f412]:focus {
  2365. box-shadow: 0 0 0 1px var(--tieba-theme-color);
  2366. }
  2367. .toggle-panel .toggle-container .toggle-name[data-v-02e7f412] {
  2368. color: var(--light-fore);
  2369. font-size: 12px;
  2370. }@keyframes stretch-f5c2af9e {
  2371. 0% {
  2372. padding: 2px 14px;
  2373. }
  2374. 100% {
  2375. padding: 4px 14px;
  2376. }
  2377. }
  2378. a[data-v-f5c2af9e] {
  2379. color: inherit;
  2380. }
  2381. .dropdown-menu[data-v-f5c2af9e] {
  2382. position: fixed;
  2383. z-index: 1;
  2384. display: flex;
  2385. overflow: hidden;
  2386. width: -moz-max-content;
  2387. width: max-content;
  2388. min-width: 120px;
  2389. flex-direction: column;
  2390. padding: 4px;
  2391. border: 1px solid var(--border-color);
  2392. border-radius: 8px;
  2393. background-color: var(--default-background);
  2394. box-shadow: 0 0 20px rgba(0, 0, 0, 0.08);
  2395. animation: kf-fade-in var(--fast-duration);
  2396. font-size: 14px;
  2397. }
  2398. .dropdown-menu .menu-item[data-v-f5c2af9e] {
  2399. display: flex;
  2400. width: 100%;
  2401. align-items: center;
  2402. padding: 4px 14px;
  2403. border: none;
  2404. border-radius: 6px;
  2405. animation: stretch-f5c2af9e var(--fast-duration) cubic-bezier(0.22, 0.61, 0.36, 1);
  2406. background: none;
  2407. color: var(--default-fore);
  2408. font-size: 14px;
  2409. gap: 6px;
  2410. transition: 0.2s;
  2411. }
  2412. .dropdown-menu .menu-item .menu-title[data-v-f5c2af9e] {
  2413. display: flex;
  2414. width: 100%;
  2415. gap: 12px;
  2416. text-align: justify;
  2417. }
  2418. .dropdown-menu .menu-item .menu-title .menu-inner[data-v-f5c2af9e] {
  2419. margin-left: auto;
  2420. color: var(--minimal-fore);
  2421. }
  2422. .dropdown-menu .menu-item[data-v-f5c2af9e]:hover {
  2423. background-color: var(--default-hover);
  2424. }
  2425. .dropdown-menu .menu-item[data-v-f5c2af9e]:active {
  2426. background-color: var(--default-active);
  2427. }
  2428. .dropdown-menu .menu-separator[data-v-f5c2af9e] {
  2429. width: calc(100% + 8px);
  2430. height: 1px;
  2431. margin: 6px 0 6px -4px;
  2432. background-color: var(--border-color);
  2433. }
  2434. .blur-effect[data-v-f5c2af9e] {
  2435. background-color: var(--trans-default-background);
  2436. }
  2437. html:not([perf-saver]) .blur-effect[data-v-f5c2af9e] {
  2438. -webkit-backdrop-filter: blur(24px);
  2439. backdrop-filter: blur(24px);
  2440. }
  2441. html.dark-theme .blur-effect[data-v-f5c2af9e] {
  2442. -webkit-backdrop-filter: blur(24px) brightness(0.8);
  2443. backdrop-filter: blur(24px) brightness(0.8);
  2444. }#nav-bar[data-v-b4e7e126] {
  2445. position: fixed;
  2446. z-index: 1200;
  2447. top: 0;
  2448. left: 0;
  2449. display: flex;
  2450. width: 100%;
  2451. height: 48px;
  2452. align-items: center;
  2453. justify-content: center;
  2454. border-bottom: 1px solid var(--border-color);
  2455. background-color: var(--trans-page-background);
  2456. box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  2457. transition: all var(--default-duration), width 0s;
  2458. }
  2459. html.dark-theme #nav-bar[data-v-b4e7e126] {
  2460. box-shadow: 0 0 16px rgba(0, 0, 0, 0.6);
  2461. }
  2462. #nav-bar.fold[data-v-b4e7e126] {
  2463. transform: translateY(-32px);
  2464. }
  2465. #nav-bar.fold[data-v-b4e7e126]::after {
  2466. position: absolute;
  2467. top: 48px;
  2468. width: 100%;
  2469. height: 32px;
  2470. content: "";
  2471. }
  2472. #nav-bar.fold[data-v-b4e7e126]:hover {
  2473. transform: translateY(0);
  2474. }
  2475. #nav-bar.fold:hover #nav-container[data-v-b4e7e126] {
  2476. display: flex;
  2477. }
  2478. #nav-bar.fold:hover #fold-bar[data-v-b4e7e126] {
  2479. display: none;
  2480. }
  2481. #nav-bar.fold #fold-bar[data-v-b4e7e126] {
  2482. position: absolute;
  2483. bottom: 6.5px;
  2484. width: 60px;
  2485. height: 3px;
  2486. border-radius: 3px;
  2487. margin: 0 auto;
  2488. background-color: var(--border-color);
  2489. }
  2490. #nav-bar.fold #nav-container[data-v-b4e7e126] {
  2491. display: none;
  2492. }
  2493. #nav-bar.hide[data-v-b4e7e126] {
  2494. box-shadow: none !important;
  2495. }
  2496. #nav-bar.hide[data-v-b4e7e126] {
  2497. transform: translateY(-100%);
  2498. }
  2499. #nav-bar.fixed-on-top[data-v-b4e7e126] {
  2500. position: absolute;
  2501. }
  2502. [no-scrollbar] #nav-bar[data-v-b4e7e126] {
  2503. width: calc(100% - var(--scrollbar-width));
  2504. }
  2505. #nav-bar #nav-container[data-v-b4e7e126] {
  2506. display: flex;
  2507. width: 100%;
  2508. max-width: var(--content-max);
  2509. height: 100%;
  2510. justify-content: space-between;
  2511. }
  2512. .shrink-view #nav-bar #nav-container[data-v-b4e7e126] {
  2513. justify-content: space-around;
  2514. }
  2515. #nav-bar #nav-container .left-container .nav-title-container[data-v-b4e7e126] {
  2516. display: flex;
  2517. height: 100%;
  2518. align-items: center;
  2519. padding: 0;
  2520. border: none;
  2521. background: none;
  2522. gap: 8px;
  2523. -webkit-text-decoration: underline 3px var(--tieba-theme-color);
  2524. text-decoration: underline 3px var(--tieba-theme-color);
  2525. }
  2526. #nav-bar #nav-container .left-container .nav-title-container .nav-icon[data-v-b4e7e126] {
  2527. width: 36px;
  2528. }
  2529. #nav-bar #nav-container .left-container .nav-title-container .nav-title[data-v-b4e7e126] {
  2530. color: var(--default-fore);
  2531. font-size: 20px;
  2532. font-style: italic;
  2533. font-weight: var(--font-weight-bold);
  2534. transition: 0.2s;
  2535. }
  2536. #nav-bar #nav-container .left-container .nav-title-container:hover .nav-title[data-v-b4e7e126], #nav-bar #nav-container .left-container .nav-title-container:active .nav-title[data-v-b4e7e126], #nav-bar #nav-container .left-container .nav-title-container:focus .nav-title[data-v-b4e7e126] {
  2537. color: var(--highlight-fore);
  2538. }
  2539. #nav-bar #nav-container .middle-container[data-v-b4e7e126] {
  2540. display: flex;
  2541. height: 100%;
  2542. justify-content: center;
  2543. }
  2544. #nav-bar #nav-container .middle-container .middle-menu-trigger[data-v-b4e7e126] {
  2545. height: 100%;
  2546. padding: 0 10px;
  2547. border: none;
  2548. color: var(--default-fore);
  2549. font-size: 15px;
  2550. font-weight: var(--font-weight-bold);
  2551. text-decoration: underline;
  2552. -webkit-text-decoration: underline solid rgba(0, 0, 0, 0);
  2553. text-decoration: underline solid rgba(0, 0, 0, 0);
  2554. text-decoration-thickness: 2px;
  2555. -webkit-text-decoration: underline 2px rgba(0, 0, 0, 0);
  2556. text-decoration: underline 2px rgba(0, 0, 0, 0);
  2557. }
  2558. #nav-bar #nav-container .middle-container .middle-menu-trigger[data-v-b4e7e126]:hover {
  2559. -webkit-text-decoration: underline 2px var(--tieba-theme-color);
  2560. text-decoration: underline 2px var(--tieba-theme-color);
  2561. }
  2562. #nav-bar #nav-container .right-container[data-v-b4e7e126] {
  2563. display: flex;
  2564. gap: 6px;
  2565. }
  2566. #nav-bar #nav-container .right-container .avatar-button[data-v-b4e7e126] {
  2567. display: flex;
  2568. height: 100%;
  2569. align-items: center;
  2570. padding: 0;
  2571. padding: 0 2px;
  2572. border: 4px;
  2573. }
  2574. #nav-bar #nav-container .right-container .avatar-button .nav-avatar[data-v-b4e7e126] {
  2575. width: 32px;
  2576. height: 32px;
  2577. border-radius: 24px;
  2578. box-shadow: 0 0 0 1px var(--border-color);
  2579. transition: 0.4s;
  2580. }
  2581. #nav-bar #nav-container .right-container .avatar-button:hover > .nav-avatar[data-v-b4e7e126] {
  2582. box-shadow: 0 0 0 2px var(--tieba-theme-color);
  2583. }
  2584. #nav-bar #nav-container .right-container .menu-button[data-v-b4e7e126] {
  2585. padding: 2px 8px;
  2586. border: none;
  2587. color: var(--highlight-fore);
  2588. font-size: 26px;
  2589. }
  2590. #nav-bar #nav-container .right-container .menu-button[data-v-b4e7e126]:hover {
  2591. color: var(--tieba-theme-color);
  2592. }
  2593. .menu-trigger[data-v-b4e7e126] {
  2594. border-radius: 0;
  2595. background-color: transparent;
  2596. }
  2597. .menu-trigger[data-v-b4e7e126]:hover {
  2598. background-color: var(--default-hover);
  2599. }
  2600. .menu-trigger:hover > .nav-menu[data-v-b4e7e126], .menu-trigger:active > .nav-menu[data-v-b4e7e126] {
  2601. display: block;
  2602. }
  2603. .nav-menu[data-v-b4e7e126] {
  2604. position: absolute;
  2605. z-index: 1201;
  2606. display: none;
  2607. cursor: default;
  2608. font-weight: var(--font-weight-normal);
  2609. }
  2610. .nav-menu[data-v-b4e7e126]:hover {
  2611. display: block;
  2612. }:root {\r
  2613. --myself-theme-background: rgba(25, 110, 153, 0.2);\r
  2614. --myself-theme-fore: rgb(16, 73, 101);\r
  2615. --cengzhu-theme-background: rgba(255, 89, 107, 0.2);\r
  2616. --cengzhu-theme-fore: rgb(178, 62, 90);\r
  2617. }\r
  2618. \r
  2619. @media (prefers-color-scheme: dark) {\r
  2620. :root {\r
  2621. --myself-theme-background: rgba(34, 135, 204, 0.2);\r
  2622. --myself-theme-fore: rgb(40, 160, 242);\r
  2623. --cengzhu-theme-background: rgba(204, 71, 103, 0.2);\r
  2624. --cengzhu-theme-fore: rgb(255, 89, 118);\r
  2625. }\r
  2626. }\r
  2627. \r
  2628. .tag-elem {\r
  2629. display: inline-block;\r
  2630. }\r
  2631. \r
  2632. .tag-elem::after {\r
  2633. padding: 2px 6px;\r
  2634. border-radius: 4px;\r
  2635. margin: 0 4px;\r
  2636. background-color: var(--trans-light-background);\r
  2637. color: var(--light-fore);\r
  2638. font-size: 12px;\r
  2639. font-weight: var(--font-weight-normal);\r
  2640. }\r
  2641. \r
  2642. .tieba-tags-me::after {\r
  2643. /* background-color: var(--myself-theme-background);\r
  2644. color: var(--myself-theme-fore); */\r
  2645. content: "\u6211";\r
  2646. }\r
  2647. \r
  2648. .tieba-tags-lz::after {\r
  2649. /* background-color: var(--tieba-theme-background);\r
  2650. color: var(--tieba-theme-fore); */\r
  2651. content: "\u697C\u4E3B";\r
  2652. }\r
  2653. \r
  2654. .tieba-tags-cz::after {\r
  2655. /* background-color: var(--cengzhu-theme-background);\r
  2656. color: var(--cengzhu-theme-fore); */\r
  2657. content: "\u5C42\u4E3B";\r
  2658. } `);
  2659.  
  2660. (function () {
  2661. 'use strict';
  2662.  
  2663. var __defProp = Object.defineProperty;
  2664. var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
  2665. var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
  2666. (function(_2, vue, marked2) {
  2667. var _GM_addStyle = /* @__PURE__ */ (() => typeof GM_addStyle != "undefined" ? GM_addStyle : undefined)();
  2668. var _GM_deleteValue = /* @__PURE__ */ (() => typeof GM_deleteValue != "undefined" ? GM_deleteValue : undefined)();
  2669. var _GM_getValue = /* @__PURE__ */ (() => typeof GM_getValue != "undefined" ? GM_getValue : undefined)();
  2670. var _GM_info = /* @__PURE__ */ (() => typeof GM_info != "undefined" ? GM_info : undefined)();
  2671. var _GM_listValues = /* @__PURE__ */ (() => typeof GM_listValues != "undefined" ? GM_listValues : undefined)();
  2672. var _GM_openInTab = /* @__PURE__ */ (() => typeof GM_openInTab != "undefined" ? GM_openInTab : undefined)();
  2673. var _GM_registerMenuCommand = /* @__PURE__ */ (() => typeof GM_registerMenuCommand != "undefined" ? GM_registerMenuCommand : undefined)();
  2674. var _GM_setValue = /* @__PURE__ */ (() => typeof GM_setValue != "undefined" ? GM_setValue : undefined)();
  2675. const _sfc_main$q = /* @__PURE__ */ vue.defineComponent({
  2676. __name: "user-button",
  2677. props: {
  2678. isAnchor: { type: Boolean },
  2679. shadowBorder: { type: Boolean },
  2680. unsetBackground: { type: Boolean },
  2681. themeStyle: { type: Boolean },
  2682. noBorder: { type: [Boolean, String] }
  2683. },
  2684. emits: ["click"],
  2685. setup(__props, { emit: __emit }) {
  2686. const props = __props;
  2687. const emit = __emit;
  2688. return (_ctx, _cache) => {
  2689. return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.isAnchor ? "a" : "button"), {
  2690. class: vue.normalizeClass(["user-button", {
  2691. "shadow-border": props.shadowBorder,
  2692. "unset-background": props.unsetBackground,
  2693. "theme-style": props.themeStyle,
  2694. "no-border": props.noBorder,
  2695. "no-border-all": props.noBorder === "all"
  2696. }]),
  2697. onClick: _cache[0] || (_cache[0] = ($event) => emit("click", $event))
  2698. }, {
  2699. default: vue.withCtx(() => [
  2700. vue.renderSlot(_ctx.$slots, "default")
  2701. ]),
  2702. _: 3
  2703. }, 8, ["class"]);
  2704. };
  2705. }
  2706. });
  2707. const _hoisted_1$l = { class: "toast-controls" };
  2708. const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
  2709. __name: "toast",
  2710. props: {
  2711. message: {},
  2712. duration: { default: 6e3 },
  2713. icon: {},
  2714. type: {},
  2715. blurEffect: { type: Boolean }
  2716. },
  2717. setup(__props) {
  2718. const props = __props;
  2719. const toastContainer = vue.ref();
  2720. function chooseIcon() {
  2721. if (props.icon) {
  2722. return props.icon;
  2723. } else {
  2724. if (props.type) {
  2725. switch (props.type) {
  2726. case "basic":
  2727. return undefined;
  2728. case "check":
  2729. return "check";
  2730. case "warning":
  2731. return "warning";
  2732. case "error":
  2733. return "error";
  2734. default:
  2735. return undefined;
  2736. }
  2737. }
  2738. }
  2739. }
  2740. return (_ctx, _cache) => {
  2741. return vue.openBlock(), vue.createElementBlock("div", {
  2742. ref_key: "toastContainer",
  2743. ref: toastContainer,
  2744. class: vue.normalizeClass(["toast-container", { "blur-effect": props.blurEffect }])
  2745. }, [
  2746. chooseIcon() ? (vue.openBlock(), vue.createElementBlock("div", {
  2747. key: 0,
  2748. class: vue.normalizeClass(["toast-icon icon", props.type])
  2749. }, vue.toDisplayString(chooseIcon()), 3)) : vue.createCommentVNode("", true),
  2750. vue.createElementVNode("div", {
  2751. class: vue.normalizeClass(["toast-content", props.type])
  2752. }, vue.toDisplayString(props.message), 3),
  2753. _cache[1] || (_cache[1] = vue.createElementVNode("span", null, "|", -1)),
  2754. vue.createElementVNode("div", _hoisted_1$l, [
  2755. vue.createVNode(_sfc_main$q, {
  2756. class: "close-button icon",
  2757. "shadow-border": true,
  2758. onClick: vue.unref(passToNextToast)
  2759. }, {
  2760. default: vue.withCtx(() => _cache[0] || (_cache[0] = [
  2761. vue.createTextVNode("close")
  2762. ])),
  2763. _: 1
  2764. }, 8, ["onClick"])
  2765. ])
  2766. ], 2);
  2767. };
  2768. }
  2769. });
  2770. const _export_sfc = (sfc, props) => {
  2771. const target = sfc.__vccOpts || sfc;
  2772. for (const [key, val] of props) {
  2773. target[key] = val;
  2774. }
  2775. return target;
  2776. };
  2777. const toastVue = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__scopeId", "data-v-f69d853b"]]);
  2778. function parseMultiCSS(cssObject) {
  2779. return _2.flatMapDeep(cssObject, (value, key) => {
  2780. return [
  2781. `${key} {`,
  2782. ..._2.flatMapDeep(value, (v, k) => `${_2.startsWith(k, "--") ? k : _2.kebabCase(k)}: ${v};`),
  2783. "}",
  2784. ""
  2785. ];
  2786. }).join("\n");
  2787. }
  2788. function parseCSSRule(cssRule) {
  2789. let css = "";
  2790. _2.forOwn(cssRule, (value, key) => {
  2791. css += `${_2.kebabCase(key)}:${value};`;
  2792. });
  2793. return css;
  2794. }
  2795. function injectCSSRule(selector, cssRule) {
  2796. return _GM_addStyle(`${selector}{${parseCSSRule(cssRule)}}`);
  2797. }
  2798. function insertCSS(style) {
  2799. return _GM_addStyle(style);
  2800. }
  2801. function overwriteCSS(...style) {
  2802. const styles = [];
  2803. _2.forEach(style, (styleElement) => {
  2804. styles.push(insertCSS(styleElement));
  2805. });
  2806. waitUntil(() => !_2.isNil(document.body)).then(() => {
  2807. _2.forEach(styles, (styleElement) => {
  2808. document.head.appendChild(styleElement);
  2809. });
  2810. });
  2811. return styles;
  2812. }
  2813. const baseStyle = "html {\n padding: 0;\n margin: 0;\n text-align: justify;\n}\n\nbody {\n overflow-x: hidden;\n overflow-y: scroll;\n overflow: hidden scroll;\n padding: 0;\n margin: 0;\n font-family: var(--code-zh);\n font-weight: var(--font-weight-normal);\n}\nbody[no-scrollbar] {\n overflow: hidden;\n}\n\ndiv,\np {\n margin: 0;\n}\n\nh1,\nh2,\nh3,\nh4,\nh5,\nh6 {\n font-weight: var(--font-weight-bold);\n}\n\nselect {\n padding: 1px 8px;\n border: 1px solid var(--border-color);\n border-radius: 8px;\n cursor: pointer;\n}\n\noption {\n cursor: pointer;\n}\n\noption:checked {\n background-color: var(--tieba-theme-color);\n color: var(--default-background);\n}\n\na {\n color: inherit;\n -webkit-text-decoration: none;\n text-decoration: none;\n word-break: break-all;\n}\n\n.dialogJ {\n position: fixed !important;\n top: 50% !important;\n left: 50% !important;\n}\n\n.dialogJ {\n transform: translate(-50%, -50%);\n}";
  2814. const universalStyle = '.icon,\n.outline-icon {\n font-family: "Material Symbols", monospace !important;\n}\n\n.icon,\n.outline-icon {\n font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 40;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n}\n\n.filled-icon {\n font-family: "Material Symbols", monospace !important;\n}\n\n.filled-icon {\n font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 40;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n}\n\n.anchor, .anchor-underline {\n color: var(--tieba-theme-fore);\n cursor: pointer;\n -webkit-text-decoration: none;\n text-decoration: none;\n transition: var(--default-duration);\n}\n\n.anchor-underline {\n text-decoration: underline;\n -webkit-text-decoration: underline solid currentColor;\n text-decoration: underline solid currentColor;\n text-decoration-thickness: 1.2px;\n -webkit-text-decoration: underline 1.2px;\n text-decoration: underline 1.2px;\n}\n\n.anchor-noback {\n cursor: pointer;\n -webkit-text-decoration: none;\n text-decoration: none;\n transition: var(--default-duration);\n}\n\n.anchor:hover, .anchor-underline:hover {\n background-color: var(--default-hover);\n}\n\n.anchor-underline:hover {\n text-decoration: underline;\n -webkit-text-decoration: underline solid rgba(0, 0, 0, 0);\n text-decoration: underline solid rgba(0, 0, 0, 0);\n text-decoration-thickness: 1.2px;\n -webkit-text-decoration: underline 1.2px rgba(0, 0, 0, 0);\n text-decoration: underline 1.2px rgba(0, 0, 0, 0);\n}\n\n.anchor-noback:hover {\n color: var(--tieba-theme-fore);\n}\n\n.anchor:active, .anchor-underline:active {\n background-color: var(--default-active);\n}\n\n.anchor-noback:active {\n color: var(--tieba-theme-active);\n}\n\n.markdown {\n font-family: var(--code-zh);\n font-size: 16px;\n}\n.markdown code {\n padding: 2px 6px;\n border-radius: 8px;\n background-color: var(--light-border-color);\n font-family: var(--code-monospace);\n word-wrap: break-word;\n}\n.markdown a {\n color: var(--tieba-theme-fore);\n}\n.markdown a:hover {\n -webkit-text-decoration: underline;\n text-decoration: underline;\n}\n.markdown h2 {\n margin: 20px 0 8px;\n font-size: 24px;\n}\n.markdown h3 {\n margin: 16px 0 6px;\n font-size: 18px;\n}\n.markdown ul {\n padding: 0;\n margin: 6px 0;\n}\n.markdown li {\n margin: 6px 0 6px 22px;\n list-style: disc;\n}\n.markdown li::marker {\n color: var(--minimal-fore);\n}\n.markdown blockquote {\n margin: 20px 16px;\n color: var(--minimal-fore);\n}\n.markdown hr {\n border: 2px solid var(--border-color);\n margin: 10px 0;\n}\n\n.settings-toggle-button {\n border: none !important;\n background-color: transparent !important;\n background-color: initial !important;\n}\n\n.settings-toggle-button {\n border-radius: 36px;\n}\n\n.settings-toggle-button.toggle-off {\n color: var(--minimal-fore);\n font-variation-settings: "FILL" 0;\n}\n\n.settings-toggle-button.toggle-off::after {\n content: "toggle_off";\n}\n\n.settings-toggle-button.toggle-on::after {\n content: "toggle_on";\n}\n\n.settings-toggle-button.toggle-on {\n color: var(--tieba-theme-color);\n font-variation-settings: "FILL" 1;\n}\n\n.settings-toggle-button.toggle-off:hover {\n color: var(--default-hover);\n}\n\n.settings-toggle-button.toggle-off:active {\n color: var(--default-active);\n}\n\n.settings-toggle-button.toggle-on:hover {\n color: var(tieba-theme-hover);\n}\n\n.settings-toggle-button.toggle-on:active {\n color: var(--tieba-theme-active);\n}\n\n.level-green {\n background-color: var(--level-green-background) !important;\n color: var(--level-green-fore) !important;\n}\n\n.level-blue {\n background-color: var(--level-blue-background) !important;\n color: var(--level-blue-fore) !important;\n}\n\n.level-yellow {\n background-color: var(--level-yellow-background) !important;\n color: var(--level-yellow-fore) !important;\n}\n\n.level-orange {\n background-color: var(--level-orange-background) !important;\n color: var(--level-orange-fore) !important;\n}\n\n.remove-default {\n line-height: normal !important;\n}\n\n.remove-default {\n font-size: 16px;\n}\n.remove-default button,\n.remove-default input,\n.remove-default optgroup,\n.remove-default select,\n.remove-default textarea {\n font-family: var(--code-zh);\n font-size: 16px;\n}\n.remove-default .content {\n min-height: 0;\n min-height: initial;\n background: transparent none repeat 0 0 / auto auto padding-box border-box scroll;\n background: initial;\n}\n.remove-default code {\n display: inline;\n display: initial;\n width: auto;\n width: initial;\n height: auto;\n height: initial;\n}\n.remove-default .content,\n.remove-default .foot {\n width: auto;\n width: initial;\n}\n.remove-default button {\n color: inherit;\n}\n.remove-default h4 {\n font-family: var(--code-zh);\n}\n\nhtml:not([perf-saver]) body.custom-background .blur-if-custom-background {\n -webkit-backdrop-filter: blur(24px);\n backdrop-filter: blur(24px);\n}\nhtml.dark-theme body.custom-background .blur-if-custom-background {\n -webkit-backdrop-filter: blur(24px) brightness(0.8);\n backdrop-filter: blur(24px) brightness(0.8);\n}\n\nhtml:not([perf-saver]) .blur-effect {\n -webkit-backdrop-filter: blur(24px);\n backdrop-filter: blur(24px);\n}\nhtml.dark-theme .blur-effect {\n -webkit-backdrop-filter: blur(24px) brightness(0.8);\n backdrop-filter: blur(24px) brightness(0.8);\n}\n\nhtml:not([perf-saver]) .raster-effect {\n -webkit-backdrop-filter: saturate(0.8) blur(4px);\n backdrop-filter: saturate(0.8) blur(4px);\n background-color: var(--trans-page-background);\n background-image: radial-gradient(transparent 1px, var(--page-background) 1px);\n background-size: 4px 4px;\n}';
  2815. const tiebaErrorStyle = '@charset "UTF-8";\n/* 搜索栏 */\n.search-form {\n background-color: var(--default-background);\n}\n\n.search-form p {\n display: none;\n}\n\n.page404 {\n background-color: var(--default-background);\n}\n\n.main-title {\n color: var(--default-fore);\n}\n\n.main-title a {\n color: var(--tieba-theme-fore);\n}\n\n.app_download_box {\n display: none;\n}\n\n#error_404_iframe {\n display: none;\n}';
  2816. const tiebaForumStyle = '@charset "UTF-8";\n.search_internal_btn::after, .icon_author::after, .icon_replyer::after {\n font-family: "Material Symbols", monospace !important;\n}\n.search_internal_btn::after, .icon_author::after, .icon_replyer::after {\n font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 40;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n}\n\n.search_bright .search_btn_enter_ba {\n box-sizing: border-box;\n padding: 4px 12px;\n border: none;\n border-radius: 6px;\n background: none;\n background-color: var(--default-background);\n box-shadow: 0 0 0 1px var(--border-color);\n color: var(--default-fore);\n cursor: pointer;\n transition: var(--default-duration);\n}\n.search_bright .search_btn_enter_ba:hover:not([disabled]) {\n background-color: var(--default-hover);\n}\n.search_bright .search_btn_enter_ba:active:not([disabled]) {\n background-color: var(--default-active);\n}\n.search_bright .search_btn_enter_ba:focus:not([disabled]) {\n border-color: var(--tieba-theme-color);\n box-shadow: 0 0 0 2px var(--tieba-theme-color);\n}\n.search_bright .theme-style.search_btn_enter_ba {\n color: var(--default-background) !important;\n}\n.search_bright .theme-style.search_btn_enter_ba {\n background-color: var(--tieba-theme-color);\n}\n.search_bright .theme-style.search_btn_enter_ba:hover {\n background-color: var(--tieba-theme-hover);\n}\n.search_bright .theme-style.search_btn_enter_ba:active {\n background-color: var(--tieba-theme-active);\n}\n.search_bright .unset-background.search_btn_enter_ba {\n background-color: transparent;\n background-color: initial;\n}\n.search_bright .no-border.search_btn_enter_ba {\n box-shadow: none;\n}\n.search_bright .no-border-all.search_btn_enter_ba {\n box-shadow: none;\n}\n.search_bright .no-border-all.search_btn_enter_ba:hover, .search_bright .no-border-all.search_btn_enter_ba:focus {\n box-shadow: none;\n}\n\n#head {\n background: transparent none repeat 0 0 / auto auto padding-box border-box scroll !important;\n background: initial !important;\n background-color: var(--page-background) !important;\n}\n#head .head_inner {\n background-color: var(--page-background);\n}\n\n.threadlist_title a,\n.threadlist_title a:hover,\n.threadlist_title a:visited {\n color: var(--tieba-theme-fore) !important;\n}\n\n.u_menu_item a {\n color: inherit !important;\n}\n\n.u_menu_item a {\n /* 顶部菜单 */\n}\n\n.card_banner,\n.plat_recom_carousel {\n display: none !important;\n}\n\n.card_banner,\n.plat_recom_carousel {\n /* 大卡 */\n}\n\n.search_main {\n /* 固定搜索栏 */\n padding-bottom: 0;\n padding-bottom: initial;\n}\n\n.search_bright .search_logo_fixed {\n width: 36px !important;\n height: 36px !important;\n margin-left: 56px !important;\n background-color: rgba(0, 0, 0, 0) !important;\n background-image: var(--img-tieba-icon) !important;\n background-repeat: no-repeat !important;\n}\n\n.search_bright .search_logo_fixed {\n /* 固定搜索栏 icon */\n}\n\n.head_inner .search_logo {\n display: none !important;\n}\n\n.search_form {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.search_form form {\n margin-left: 0 !important;\n}\n\n.search_bright .search_inp_border,\n.search_bright .search_ipt {\n height: 40px !important;\n border: 2px solid var(--border-color) !important;\n background-color: var(--default-background) !important;\n color: var(--default-fore) !important;\n}\n\n.search_bright .search_inp_border,\n.search_bright .search_ipt {\n box-sizing: border-box;\n transition: var(--default-duration);\n}\n.search_bright .search_inp_border:hover,\n.search_bright .search_ipt:hover {\n border-color: var(--light-background) !important;\n}\n.search_bright .search_inp_border:focus,\n.search_bright .search_ipt:focus {\n border-color: var(--tieba-theme-color) !important;\n}\n\n.search_bright .search_btn {\n height: 40px !important;\n border: 1px solid var(--border-color) !important;\n background-color: var(--default-background) !important;\n box-shadow: none !important;\n color: var(--default-fore) !important;\n line-height: 40px !important;\n}\n\n.search_bright .search_btn {\n box-sizing: border-box;\n transition: var(--default-duration);\n}\n.search_bright .search_btn:hover {\n filter: brightness(1.1);\n}\n.search_bright .search_btn:active {\n filter: brightness(1.2);\n}\n\n.search_bright .search_btn_enter_ba {\n border: none !important;\n background-color: var(--tieba-theme-color) !important;\n color: var(--default-background) !important;\n}\n\n.search_bright .search_btn_enter_ba {\n border-bottom-left-radius: 0;\n border-top-left-radius: 0;\n}\n\n.search_main_fixed {\n display: none !important;\n}\n\n.search_main_fixed {\n border-color: var(--border-color);\n -webkit-backdrop-filter: blur(24px);\n backdrop-filter: blur(24px);\n background-color: var(--trans-default-background);\n box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);\n}\n\n.card_top_theme {\n border: none !important;\n}\n\n#content {\n /* 容器 */\n width: 982px;\n}\n\n.card_top_theme .card_top {\n padding-left: 120px !important;\n}\n\n.card_top_theme .card_top {\n /* 吧标题容器 */\n}\n\n.card_title_fname {\n color: var(--tieba-theme-fore) !important;\n}\n\n.card_title_fname {\n /* 吧标题 */\n font-weight: var(--font-weight-bold);\n}\n\n.card_slogan {\n color: var(--light-fore) !important;\n}\n\n.card_slogan {\n /* 吧 slogan */\n}\n\n.islike_focus {\n background-color: var(--tieba-theme-color) !important;\n background-image: none !important;\n}\n\n.islike_focus {\n /* 关注吧按钮 */\n}\n\n.cancel_focus {\n background: none !important;\n background-color: var(--tieba-theme-background) !important;\n}\n\n.cancel_focus {\n /* 取关吧按钮 */\n}\n\n.sign_box_bright,\n.sign_box_bright_hover {\n background: none !important;\n background-color: var(--tieba-theme-color) !important;\n}\n\n.sign_box_bright,\n.sign_box_bright_hover {\n /* 签到按钮 */\n}\n\n.sign_box_bright_signed,\n.sign_box_bright_noclass_hover {\n background: none !important;\n background-color: var(--tieba-theme-background) !important;\n}\n\n.sign_box_bright_signed,\n.sign_box_bright_noclass_hover {\n /* 签到按钮:已签到 */\n}\n\n.sign_mod_bright .sign_keep_span {\n margin: 0 !important;\n margin: initial !important;\n text-align: center !important;\n}\n\n.forum_content {\n border-color: var(--border-color) !important;\n border-right: none !important;\n background: none !important;\n background-color: var(--elem-color) !important;\n}\n\n.forum_content {\n /* 容器 */\n}\n\n.nav_wrap {\n border-color: var(--border-color) !important;\n}\n\n.nav_wrap {\n /* tab */\n}\n\n.nav_list li.focus {\n background: none !important;\n}\n\n.nav_list li.focus {\n /* 焦点 tab */\n}\n\n.nav_list a {\n color: inherit !important;\n}\n\n.j_tabnav_tab:hover {\n background: none;\n}\n\n.nav_list a:hover,\n.nav_list a:focus {\n background-color: var(--elem-color) !important;\n}\n\n.nav_list a:hover,\n.nav_list a:focus {\n /* tab hover */\n}\n\n.search_internal_input {\n height: 24px !important;\n border-color: var(--border-color) !important;\n color: var(--default-fore) !important;\n}\n\n.search_internal_input {\n /* 吧内搜索 */\n border-radius: 8px 0 0 8px;\n}\n\n.search_internal_btn {\n height: 26px !important;\n background-color: var(--tieba-theme-color) !important;\n background-image: none !important;\n vertical-align: middle !important;\n}\n\n.search_internal_btn {\n /* 吧内搜索按钮 */\n border-radius: 0 8px 8px 0;\n /* background-image: var(--svg-search) !important;\n background-size: 16px !important;\n background-repeat: no-repeat !important;\n background-position: center !important; */\n}\n\n.search_internal_btn::after {\n color: var(--default-background);\n content: "search";\n font-size: 18px;\n font-weight: var(--font-weight-bold);\n line-height: 26px;\n text-align: center;\n}\n\n.aside_region {\n border-bottom: none !important;\n}\n\n.aside_region {\n /* 右侧内容 */\n}\n\n.aside_region .region_header {\n color: var(--default-fore) !important;\n}\n\n.my_tieba .media_left,\n.my_tieba .media-left {\n border: none !important;\n}\n\n.my_tieba .media_left,\n.my_tieba .media-left {\n /* 我的头像 */\n}\n\n.my_current_forum .badge {\n border: 1px solid var(--border-color) !important;\n background-color: var(--light-background) !important;\n color: var(--default-fore) !important;\n}\n\n.my_current_forum .badge {\n /* 我的等级 */\n}\n\n.my_current_forum .badge_name {\n color: var(--default-fore) !important;\n}\n\n.media_top img,\n.media-top img {\n /* 右侧图片 */\n border-radius: 16px;\n}\n\n.aside_media_horizontal a,\n.aside-media-horizontal a {\n color: var(--tieba-theme-fore) !important;\n}\n\n.aside_media_horizontal a,\n.aside-media-horizontal a {\n /* 右侧超链接 */\n}\n\n.threadlist_bright li.thread_top_list_folder,\n.threadlist_bright li.thread_top_list_folder:hover {\n background-color: var(--very-light-background) !important;\n}\n\n.threadlist_bright li.thread_top_list_folder,\n.threadlist_bright li.thread_top_list_folder:hover {\n /* 置顶贴 */\n}\n\n.threadlist_bright > li {\n border: none !important;\n background-color: var(--default-background) !important;\n}\n\n.threadlist_bright > li {\n /* 贴子 */\n}\n\n.threadlist_bright > li:hover {\n background-color: var(--trans-light-background) !important;\n}\n\n.j_th_tit {\n /* 帖子标题 */\n color: var(--tieba-theme-fore);\n font-weight: var(--font-weight-bold);\n}\n\n.threadlist_bright .threadlist_abs_onlyline,\n.threadlist_bright .threadlist_abs {\n color: var(--default-fore) !important;\n}\n\n.threadlist_bright .threadlist_abs_onlyline,\n.threadlist_bright .threadlist_abs {\n /* 帖子摘要 */\n}\n\n/* 隐藏未加载完成的图片 */\n.vpic_wrap img:not([style]) {\n opacity: 0;\n}\n\n.threadlist_bright .threadlist_media li {\n border-radius: 8px !important;\n}\n\n.threadlist_bright .threadlist_media li {\n /* 贴子图片 hover */\n}\n\n.threadlist_media li:hover .threadlist_pic_highlight {\n display: none !important;\n}\n\n.threadlist_media li:hover .threadlist_pic_highlight {\n border-radius: 8px;\n}\n\n.vpic_wrap img {\n border-radius: 8px;\n}\n\n.threadlist_bright .media_disp {\n border: none !important;\n background: none !important;\n}\n\n.threadlist_bright .threadlist_video {\n /* 视频预览 */\n border-radius: 8px;\n}\n\n.threadlist_rep_num {\n height: auto !important;\n height: initial !important;\n background: none !important;\n background-color: var(--tieba-theme-background) !important;\n}\n\n.threadlist_rep_num {\n /* 回贴数 */\n border-radius: 24px;\n color: var(--tieba-theme-fore);\n font-weight: var(--font-weight-bold);\n}\n\n.pagination-default .pagination-item {\n border: none !important;\n background-color: var(--light-background) !important;\n color: var(--light-fore) !important;\n}\n\n.pagination-default .pagination-item {\n border-radius: 8px;\n /* 跳页按钮 */\n}\n\n.pagination-default .pagination-current {\n border: none !important;\n background-color: var(--tieba-theme-color) !important;\n color: var(--default-background) !important;\n}\n\n.pagination-default .pagination-current {\n /* 跳页按钮:当前 */\n}\n\n.pagination-default .pagination-item:not(.pagination-current):hover {\n border: none !important;\n background-color: var(--trans-light-background) !important;\n}\n\n.pagination-default .pagination-item:not(.pagination-current):hover {\n /* 跳页按钮:hover */\n}\n\n/* 底部 */\n#tb_rich_poster_container {\n width: 982px !important;\n background-color: var(--very-light-background) !important;\n}\n#tb_rich_poster_container {\n border-radius: 0 0 24px 24px;\n margin-left: -1px;\n}\n\n.tb_rich_poster .poster_body .editor_textfield {\n border-color: var(--border-color) !important;\n background-color: var(--default-background) !important;\n color: var(--default-fore) !important;\n}\n\n.tb_rich_poster .poster_body .editor_textfield {\n border-radius: 8px;\n /* 标题文本框 */\n}\n\n.tb_rich_poster .poster_body .editor_textfield:focus {\n border-color: var(--tieba-theme-color) !important;\n}\n\n.old_style_wrapper {\n border-color: var(--border-color) !important;\n background-color: var(--elem-color) !important;\n}\n\n.old_style_wrapper {\n /* 编辑器容器 */\n}\n\n.old_style_wrapper .edui-editor-body {\n background: none !important;\n}\n\n.edui-container .edui-toolbar {\n background: none !important;\n}\n\n.edui-container .edui-toolbar {\n /* 编辑器工具栏 */\n}\n\n.edui-editor-body .edui-body-container {\n border-color: var(--border-color) !important;\n background-color: var(--default-background) !important;\n}\n\n.edui-editor-body .edui-body-container {\n /* 编辑器 */\n}\n\n.frs_content_footer_pagelet {\n background: none !important;\n}\n\n.footer {\n display: none !important;\n}\n\n.icon_author {\n background-image: none !important;\n}\n\n.icon_author {\n /* 用户图标 */\n}\n\n.icon_author::after {\n content: "person";\n font-style: normal;\n}\n\n.icon_replyer {\n background-image: none !important;\n}\n\n.icon_replyer {\n /* 回贴图标 */\n}\n\n.icon_replyer::after {\n content: "comment";\n font-style: normal;\n}';
  2817. const tiebaHomeStyle = '@charset "UTF-8";\nbody {\n background-color: var(--page-background);\n color: var(--default-fore);\n}\n\n/* 导航栏 */\n.head_inner {\n /* 导航栏额头 */\n background-color: var(--default-background);\n}\n\n.u_menu_item a {\n /* 顶部超链接 */\n color: var(--default-fore);\n}\n\n.head_inner .search_logo {\n left: 72px;\n width: 60px;\n height: 60px;\n /* logo */\n background-image: var(--img-tieba-icon);\n}\n\n.search_top {\n border: none;\n}\n\n.search_nav a:link,\n.search_nav a:hover,\n.search_nav a:visited {\n /* 导航栏超链接 */\n color: var(--default-fore);\n}\n\n.u_menu_item a:hover,\n.u_menu_item a:visited {\n color: var(--default-fore);\n}\n\n/* 搜索 */\n.search_main {\n padding-bottom: 96px;\n}\n\n.search_bright .search_inp_border {\n /* 搜索框 */\n border-color: var(--border-color);\n border-bottom-left-radius: 8px;\n border-top-left-radius: 8px;\n color: var(--default-fore);\n}\n\n.search_bright .search_inp_border:focus {\n border-color: var(--tieba-theme-color);\n}\n\n.search_bright .search_btn {\n border-color: var(--trans-tieba-theme-color);\n /* 搜索相关按钮 */\n border-radius: 8px;\n background-color: var(--tieba-theme-background);\n color: var(--tieba-theme-fore);\n}\n\n.search_bright .search_btn_enter_ba {\n /* “进入贴吧”按钮 */\n background-color: var(--tieba-theme-color);\n border-bottom-left-radius: 0;\n border-top-left-radius: 0;\n color: var(--default-background);\n}\n\n.search_bright .search_btn:visited {\n color: var(--tieba-theme-fore);\n}\n\n.search_bright .search_btn_enter_ba:visited {\n background-color: var(--tieba-theme-color);\n color: var(--default-background);\n}\n\n.search_bright .search_btn_enter_ba:hover {\n background-color: var(--tieba-theme-color);\n color: var(--default-background);\n}\n\n.suggestion {\n border-color: var(--border-color) !important;\n border-radius: 6px !important;\n background-color: var(--elem-color) !important;\n box-shadow: none !important;\n color: var(--default-fore) !important;\n}\n\n.suggestion {\n transform: translateY(4px);\n}\n\n.suggestion .break_tip {\n background-color: var(--default-background) !important;\n}\n\n.suggestion .highlight {\n color: var(--tieba-theme-color) !important;\n}\n\n.suggestion .highlight {\n /* 高亮文本 */\n}\n\n.suggestion .operation_title {\n color: var(--default-fore) !important;\n}\n\n.suggestion .operation_title {\n /* 热议文字 */\n}\n\n.suggestion .forum_image {\n /* 推荐图标 */\n border-radius: 8px;\n}\n\n.suggestion .forum_name {\n color: var(--default-fore) !important;\n}\n\n.suggestion .forum_name {\n /* 推荐标题 */\n}\n\n.suggestion .on {\n background-color: var(--light-background) !important;\n}\n\n.suggestion .on {\n /* 搜索推荐:选中 */\n}\n\n/* 首页横幅 */\n.page-container .top-sec {\n display: none;\n}\n\n/* 内容 */\n.page-container .content-sec {\n background: none;\n}\n\n/* 左侧悬停 */\n.page-container .left-sec {\n border-radius: 24px;\n border-top: none;\n background: none;\n background-color: var(--elem-color);\n}\n\n.f-d-w {\n border-radius: 24px;\n /* 左侧悬停 2 */\n background-color: var(--elem-color);\n}\n\n.f-d-w .f-d-item {\n background: none;\n}\n\n.aggregate_entrance_wrap {\n /* 专题 */\n display: none;\n}\n\n.u-f-t .gap {\n border: none;\n /* “贴吧分类”分隔符 */\n background: none;\n}\n\n.f-d-w .all {\n /* “查看全部”按钮 */\n background: none;\n}\n\n.forum_rcmd {\n /* 热门吧卡片 */\n border: 0;\n border-radius: 24px;\n background-color: var(--elem-color);\n}\n\n.region_bright .region_header {\n /* “我在贴吧”标题 */\n color: var(--default-fore);\n}\n\n.page-container .left-sec .region_bright {\n border-radius: 24px;\n}\n\n.my_tieba_mod .media_left,\n.my_tieba_mod .media-left {\n /* 头像边框 */\n border: none;\n}\n\n.media_left img,\n.media-left img {\n /* 头像 */\n border-radius: 16px;\n}\n\n#nameValue {\n /* 我的用户名 */\n color: var(--default-fore);\n}\n\n#j_tcharge_dialog {\n /* “获取”超链接 */\n color: var(--default-fore);\n}\n\n#onekey_sign .onekey_btn,\n#onekey_sign a.onekey_btn {\n /* 签到按钮 */\n border-radius: 8px;\n margin-right: -5px;\n background: none;\n background-color: var(--tieba-theme-color);\n color: var(--elem-color);\n text-align: center;\n}\n\n#onekey_sign .onekey_btn::after {\n content: "一键签到";\n}\n\n#onekey_sign a.signed_btn .icon_signed {\n /* 已签到标记 */\n margin-top: 2px;\n background: var(--svg-checkmark);\n background-repeat: no-repeat;\n background-size: 20px;\n filter: drop-shadow(var(--elem-color) 0 9999px);\n transform: translateY(-9999px);\n}\n\n#onekey_sign .onekey_btn:hover {\n box-shadow: 0 0 10px var(--tieba-theme-color);\n}\n\n.u-f-w {\n /* 进吧 div */\n padding-bottom: 20px;\n}\n\n.left-cont-fixed {\n /* 进吧 div 固定 */\n position: relative;\n bottom: 0;\n}\n\n.u-f-w .sign,\n.u-f-w .unsign,\n.always-forum-item .sign,\n.always-forum-item .unsign {\n /* 进吧按钮 */\n border-radius: 8px;\n background: none;\n background-color: var(--light-background);\n color: var(--default-fore);\n}\n\n.u-f-w .sign,\n.always-forum-item .sign {\n /* 已签到 */\n background-color: var(--tieba-theme-background);\n color: var(--tieba-theme-fore);\n}\n\n.u-f-w .sign,\n.u-f-w .unsign {\n margin-bottom: 8px;\n}\n\n.u-f-w .sign:hover,\n.u-f-w .unsign:hover,\n.always-forum-item .sign:hover,\n.always-forum-item .unsign:hover {\n background: none;\n background-color: var(--tieba-theme-color);\n box-shadow: 0 0 10px var(--tieba-theme-color);\n color: var(--elem-color);\n -webkit-text-decoration: none;\n text-decoration: none;\n}\n\n.u-f-w .more {\n /* “查看更多”按钮 */\n border: none;\n border-radius: 8px;\n background: none;\n background-color: var(--elem-color);\n box-shadow: none;\n color: var(--default-fore);\n}\n\n.more-txt {\n /* “查看更多”按钮文字 */\n color: var(--default-fore);\n}\n\n.u-f-w .more-hover {\n width: 188px;\n margin: auto;\n background-color: var(--tieba-theme-color);\n box-shadow: 0 0 10px var(--tieba-theme-color);\n color: var(--elem-color);\n}\n\n.u-f-w .more-hover .more-txt,\n.u-f-w .more:hover .more-txt {\n margin-left: 60px;\n color: var(--elem-color);\n}\n\n.always-forum-title {\n /* 展开标题 */\n border: none;\n margin-top: 10px;\n}\n\n#alwayforum-wraper {\n /* 关注吧展开 */\n background-color: var(--elem-color);\n}\n\n.pop-up-frame {\n /* 展开页面 */\n border: none;\n border-radius: 24px;\n background-color: var(--elem-color);\n border-bottom-left-radius: 0;\n box-shadow: none;\n}\n\n.always-forum-close {\n /* 展开叉号 */\n display: none;\n}\n\n.always-forum-item .addnewforumbtn {\n /* “添加爱逛的吧”按钮 */\n width: 110px;\n padding-left: 0;\n border-radius: 8px;\n background: none;\n background-color: var(--tieba-theme-background);\n color: var(--tieba-theme-fore);\n font-size: 20px;\n text-align: center;\n}\n\n.always-forum-item .addnewforumbtn::after {\n content: "+";\n}\n\n.always-forum-item .addnewforumbtn:hover {\n background-color: var(--tieba-theme-color);\n box-shadow: 0 0 10px var(--tieba-theme-color);\n color: var(--elem-color);\n}\n\n.tbui_scroll_panel .tbui_scroll_button {\n /* 展开滚动条 */\n width: 6px;\n border: none;\n border-radius: 24px;\n background-color: var(--very-light-background);\n}\n\n.tbui_scroll_panel .tbui_scroll_bar {\n width: 6px;\n /* 滚动条背景 */\n background: none;\n}\n\n.forum_rcmd .class_title > div {\n /* 热门吧 icon */\n color: var(--default-fore);\n}\n\n.rcmd_forum_item .forum_name {\n /* 热门吧标题 */\n color: var(--default-fore);\n}\n\n.rcmd_forum_item .rcmd_forum_logo {\n /* 热门吧图片 */\n border: none;\n border-radius: 16px;\n background: none;\n}\n\n/* 动态 */\n.page-container .r-left-sec,\n.sub_nav_wrap,\n.title-tag-wraper,\n.thread-name-wraper,\n.n_reply {\n width: 780px;\n}\n\n.n_txt {\n /* 动态正文 */\n width: 720px;\n color: var(--light-fore);\n}\n\n.sub_nav_wrap {\n /* 动态切换 */\n background: none;\n background-color: var(--default-background);\n box-shadow: none;\n}\n\n.sub_nav_list a.cur {\n /* 当前标签 */\n border: none;\n color: var(--tieba-theme-color);\n}\n\n.sub_nav_list .nav_hover {\n width: 56px !important;\n}\n\n.sub_nav_list .nav_hover {\n /* 标签色块 */\n border-bottom: 3px solid var(--tieba-theme-color);\n}\n\n.sub_nav_list li.sub_nav_line {\n /* 标签分隔符 */\n background: none;\n}\n\n/* 右侧悬停 */\n.page-container .r-right-sec {\n display: none;\n}\n\n.item_hd {\n /* “贴吧热议榜”标题 */\n border: none;\n border-radius: 24px;\n background-color: var(--default-background);\n color: var(--default-fore);\n}\n\n.item_hd .title {\n color: var(--default-fore);\n}\n\n.topic_list .topic_item .topic_flag_hot {\n /* 热点数字编号 */\n border-radius: 4px;\n}\n\n.item .item_hd {\n /* 公告板标题 */\n border: none;\n background-color: var(--default-background);\n color: var(--default-fore);\n}\n\n.item .item_hd .title {\n color: var(--default-fore);\n}\n\n.notice-wrap-fixed {\n /* 公告板悬停 */\n background-color: var(--default-color);\n border-bottom-left-radius: 24px;\n border-bottom-right-radius: 24px;\n}\n\n.notice,\n.notice img {\n /* 公告板图片 */\n border-radius: 24px;\n}\n\n/* 动态内容 */\n.new_list .title {\n /* 贴子标题 */\n color: var(--tieba-theme-color);\n}\n\n.new_list .title:hover {\n color: var(--tieba-theme-color);\n -webkit-text-decoration: underline;\n text-decoration: underline;\n}\n\n.title-tag-wraper a {\n /* 动态贴吧名 */\n padding: 4px 10px;\n border-radius: 24px;\n background-color: var(--light-background);\n color: var(--light-fore);\n font-size: 12px;\n}\n\n.title-tag-wraper a:hover {\n color: var(--light-fore);\n -webkit-text-decoration: none;\n text-decoration: none;\n}\n\n.list-post-num {\n /* 贴子回复数 */\n top: 0;\n padding: 4px 10px;\n border: none;\n border-radius: 16px;\n background-color: var(--tieba-theme-background);\n color: var(--tieba-theme-fore);\n}\n\n.list-triangle-border,\n.list-triangle-body {\n /* 贴子回复数三角 */\n display: none;\n}\n\n.new_list .post_author {\n /* 作者 */\n padding: 0;\n margin-bottom: 24px;\n background: none;\n color: var(--default-fore);\n -webkit-text-decoration: none;\n text-decoration: none;\n}\n\n.new_list .time {\n /* 时间 */\n padding: 0;\n background: none;\n}\n\n.topic-tag {\n /* 动态话题 */\n display: none;\n}\n\n.n_img img {\n /* 动态图片 */\n border: none;\n border-radius: 16px;\n cursor: pointer;\n}\n\n.n_img li {\n border-radius: 16px;\n}\n\n.n_img li .feed_highlight {\n /* 图片放大 */\n background: none;\n cursor: pointer;\n}\n\n.media_box {\n /* 图片控件 */\n border: none;\n border-radius: 16px;\n background-color: var(--light-background);\n}\n\n.media_box img {\n border-radius: 16px;\n cursor: pointer;\n}\n\n.ui_btn {\n /* “进入贴子”按钮 */\n border: none;\n border-radius: 24px;\n background: none;\n background-color: var(--tieba-theme-color);\n color: var(--default-background);\n}\n\n.ui_btn:hover {\n -webkit-text-decoration: none !important;\n text-decoration: none !important;\n}\n\n.ui_btn:hover {\n background: none;\n background-color: var(--tieba-theme-color);\n box-shadow: 0 0 10px var(--tieba-theme-color);\n color: var(--default-background);\n}\n\n.btn_more {\n /* 更多按钮 */\n width: 200px;\n height: auto;\n height: initial;\n border-radius: 24px;\n background: none;\n background-color: var(--tieba-theme-background);\n}\n\n.btn_more:hover,\n.data_error_bar a:hover,\n.btn_more a:hover {\n background: none !important;\n background-color: var(--tieba-theme-color) !important;\n color: var(--default-background) !important;\n}\n\n.data_error_bar a,\n.btn_more a {\n border: none;\n color: var(--tieba-theme-fore);\n}\n\n/* 页脚 */\n.bottom-bg {\n background: none;\n}\n\n.footer {\n border-top: 1px solid var(--light-background);\n background-color: var(--light-background);\n}\n\n/* 无关内容 */\n.f-d-w,\n.left-cont-wraper .ufw-gap {\n display: none;\n}\n\n/* 底部加载 gif */\n#data_loading img {\n display: none;\n}';
  2818. const tiebaMainStyle = '@charset "UTF-8";\n.tbui_aside_float_bar li a {\n font-family: "Material Symbols", monospace !important;\n}\n.tbui_aside_float_bar li a {\n font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 40;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n}\n\n/* 动画 */\n/* 淡入动画 */\n@keyframes animation-fade-in {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n.fade-in-elem {\n animation: animation-fade-in ease 0.3s forwards;\n}\n\n#com_userbar {\n display: none;\n}\n\n/* 功能按钮 */\n.tbui_aside_float_bar {\n border: none !important;\n background: none !important;\n}\n\n.tbui_aside_float_bar li {\n width: 40px;\n height: 40px;\n border-radius: 24px;\n margin: 8px 0;\n background-color: var(--light-background);\n}\n\n.tbui_aside_float_bar li:hover {\n background-color: var(--default-hover);\n}\n\n.tbui_aside_float_bar li:active {\n background-color: var(--default-active);\n}\n\n.tbui_aside_float_bar li a {\n width: 40px !important;\n height: 40px !important;\n background: none !important;\n}\n\n.tbui_aside_float_bar li a {\n border-radius: 24px;\n}\n\n.tbui_aside_float_bar a {\n width: 40px !important;\n height: 40px !important;\n}\n\n.tbui_aside_float_bar a {\n /* 功能按钮 svg 容器 */\n color: var(--minimal-fore);\n font-size: 24px;\n line-height: 40px;\n text-align: center;\n /* background-size: 20px;\n background-repeat: no-repeat;\n background-position: center;\n filter: drop-shadow(var(--minimal-fore) 0 -9999px);\n transform: translateY(9999px); */\n}\n\n/* .tbui_aside_float_bar a:hover {\n color: var(--default-background);\n filter: drop-shadow(var(--default-fore) 0 -9999px);\n} */\n.tbui_aside_float_bar .tbui_fbar_auxiliaryCare a {\n height: 40px !important;\n background: none !important;\n}\n.tbui_aside_float_bar .tbui_fbar_auxiliaryCare a {\n /* 无障碍模式 */\n}\n\n.tbui_fbar_auxiliaryCare a::after {\n content: "accessibility_new";\n /* background-image: var(--svg-accessibility); */\n}\n\n.tbui_fbar_top a::after {\n /* 回到顶部 */\n /* color: var(--tieba-theme-fore); */\n content: "arrow_upward";\n /* background-image: var(--svg-arrow-up);\n filter: drop-shadow(var(--tieba-theme-fore) 0 -9999px); */\n}\n\n/* .tbui_aside_float_bar .tbui_fbar_top a {\n background-color: var(--tieba-theme-background) !important;\n} */\n/* .tbui_fbar_top a:hover::after {\n color: var(--default-background);\n} */\n.tbui_fbar_post a::after {\n /* 回贴 */\n /* color: var(--default-background); */\n content: "chat";\n font-size: 22px;\n /* vertical-align: bottom; */\n /* background-image: var(--svg-message);\n filter: drop-shadow(var(--default-background) 0 -9999px); */\n}\n\n/* .tbui_aside_float_bar .tbui_fbar_post a,\n.tbui_aside_float_bar .tbui_fbar_post a:hover {\n background-color: var(--tieba-theme-color) !important;\n} */\n.tbui_fbar_feedback a::after {\n /* 反馈 */\n content: "report";\n font-size: 26px;\n /* background-image: var(--svg-infomation-outline);\n background-size: 24px; */\n}\n\n.tbui_aside_float_bar li.tbui_fbar_feedback a {\n background: none !important;\n}\n\n.tbui_aside_float_bar li.tbui_fbar_feedback a {\n /* 部分吧反馈 */\n}\n\n.tbui_aside_float_bar .tbui_fbar_feedback a,\n.tbui_aside_float_bar .tbui_fbar_feedback a:hover {\n background: none !important;\n}\n\n.tbui_aside_float_bar .tbui_fbar_down,\n.tbui_aside_float_bar .tbui_fbar_props,\n.tbui_aside_float_bar .tbui_fbar_tsukkomi,\n.tbui_aside_float_bar .tbui_fbar_share,\n.tbui_aside_float_bar .tbui_fbar_favor,\n.tbui_aside_float_bar .tbui_fbar_refresh {\n display: none;\n}\n\n/* 图片缩放控件 */\n.p_tools a {\n padding: 0 10px;\n background: none;\n vertical-align: bottom;\n}\n\n.p_tools span {\n /* 分隔线 */\n display: none;\n}\n\n.p_tools .p_putup::before,\n.p_tools .tb_icon_ypic::before,\n.p_tools .tb_icon_turnleft::before,\n.p_tools .tb_icon_turnright::before {\n margin-right: 4px;\n font-family: "Material Symbols", system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif;\n font-size: 14px;\n vertical-align: bottom;\n}\n\n.p_tools .p_putup::before {\n /* 收起 */\n content: "zoom_out";\n}\n\n.p_tools .tb_icon_ypic::before {\n /* 查看大图 */\n content: "zoom_out_map";\n}\n\n.p_tools .tb_icon_turnleft::before {\n /* 左转 */\n content: "turn_left";\n}\n\n.p_tools .tb_icon_turnright::before {\n /* 右转 */\n content: "turn_right";\n}';
  2819. const tiebaThreadStyle = '@charset "UTF-8";\n.d_name a:hover,\n#container .content a.at:hover {\n -webkit-text-decoration: none;\n text-decoration: none;\n}\n\n.l_reply_num {\n color: inherit !important;\n}\n\n.l_reply_num {\n /* 回帖信息 */\n}\n\n#j_navtab_game,\n.nav_list .more-config-navtab {\n /* 游戏 tab */\n display: none;\n}\n\n#j_navtab_wanle {\n /* 玩乐 tab */\n display: none;\n}\n\n.nav_wrap_add_border {\n border: none;\n}\n\n#head {\n /* 背景 */\n background: none;\n background-color: transparent;\n}\n\n/* 内容 */\n#container .content {\n border-radius: 24px;\n background: transparent none repeat 0 0 / auto auto padding-box border-box scroll;\n background: initial;\n}\n\n.card_top_wrap {\n background: none !important;\n background-color: var(--elem-color) !important;\n}\n\n.card_top_wrap {\n border-radius: 24px 24px 0 0;\n}\n\n.card_top_theme2 {\n border: none;\n margin-right: 0;\n}\n\n/* 去除无关内容 */\n#novel-ranking .novel-ranking-frs-body,\n.novel-award-aside {\n /* 小说人气榜相关 */\n display: none;\n}\n\n/* 吧图标 */\n.card_head,\n.plat_head_theme2 .plat_picbox {\n top: -32px !important;\n width: 64px !important;\n height: 64px !important;\n padding: 0 !important;\n padding: initial !important;\n border: 4px solid var(--border-color) !important;\n border-radius: 24px !important;\n background: none !important;\n}\n.card_head,\n.plat_head_theme2 .plat_picbox {\n overflow: hidden;\n}\n\n.card_head_img,\n.plat_head_theme2 .plat_picbox img {\n width: 64px !important;\n height: 64px !important;\n}\n\n/* 吧名 */\n.card_title,\n.plat_title_h3 {\n margin: 5px 20px 0;\n}\n\n.card_top_theme2 .card_title_fname,\n.plat_title_h3,\n.plat_title_h3:hover,\n.plat_title_h3:visited {\n color: var(--highlight-fore);\n}\n\n.islike_focus {\n margin-top: 4px !important;\n}\n\n.islike_focus {\n /* 关注吧按钮 */\n border-radius: 24px;\n background: none;\n background-color: var(--tieba-theme-color);\n color: var(--elem-color);\n font-size: 14px;\n line-height: 28px;\n text-align: center;\n}\n\n.islike_focus::after {\n content: "关注";\n}\n\n.cancel_focus {\n /* 取关吧按钮 */\n width: 72px;\n border: 2px solid var(--trans-tieba-theme-color);\n border-radius: 24px;\n background: none;\n background-color: var(--tieba-theme-background);\n color: var(--tieba-theme-fore);\n font-size: 14px;\n line-height: 28px;\n text-align: center;\n}\n\n.cancel_focus::after {\n content: "已关注";\n}\n\n.card_top_right {\n /* 签到按钮 container */\n margin-top: 20px;\n}\n\n.sign_box_bright {\n width: 140px !important;\n height: 40px !important;\n}\n\n.sign_box_bright {\n /* 签到按钮 */\n border: 2px solid var(--trans-tieba-theme-color);\n border-radius: 24px;\n background: none;\n background-color: var(--tieba-theme-color);\n color: var(--default-background);\n font-size: 18px;\n line-height: 40px;\n text-align: center;\n}\n\n.sign_btn_bright::before {\n color: var(--elem-color);\n content: "签到";\n}\n\n.sign_box_bright_signed {\n /* 签到按钮:已签到 */\n background-color: var(--tieba-theme-background);\n text-align: inherit;\n}\n\n.sign_today_date,\n.sign_month_lack_days {\n /* 签到日期等 */\n display: none;\n}\n\n.sign_keep_span {\n width: 140px !important;\n}\n\n.sign_keep_span {\n height: 40px;\n}\n\n.sign_keep_span,\n.sign_mod_bright .sign_keep_span {\n /* 已签到按钮文本 */\n margin: 0;\n margin: initial;\n color: var(--tieba-theme-fore);\n font-size: 12px;\n text-align: center;\n}\n\n.sign_box_bright_signed::before {\n content: none !important;\n}\n\n.sign_mod_bright .sign_keep_span::before {\n content: "已签到 | ";\n}\n\n.jump_input_bright {\n padding: 0 10px;\n /* 跳页文本框 */\n border-color: var(--border-color);\n border-radius: 16px;\n}\n\n/* 标题 */\n.left_section {\n background: none;\n}\n\n.core_title_wrap_bright {\n /* 标题栏 */\n border-color: var(--border-color);\n -webkit-backdrop-filter: blur(24px);\n backdrop-filter: blur(24px);\n background-color: var(--trans-default-background);\n}\n\n.core_title_theme_bright,\n.core_title_absolute_bright .core_title_theme_bright {\n /* 部分吧标题栏 */\n border-color: var(--border-color);\n background: none;\n}\n\n.left_section .core_title_absolute_bright {\n -webkit-backdrop-filter: blur(24px);\n backdrop-filter: blur(24px);\n background-color: var(--trans-default-background);\n}\n\n.core_title_txt {\n /* 标题文字 */\n margin-left: 24px;\n background: none;\n}\n\n.tittle_fill_dom.filled {\n background-color: var(--default-background);\n}\n\n.core_title h1 {\n /* 部分吧标题 */\n margin-left: 0;\n color: var(--highlight-fore);\n}\n\n.nav_wrap {\n background-image: none !important;\n}\n\n.nav_wrap {\n border-color: var(--border-color);\n background-color: var(--light-background);\n /* 导航 */\n}\n\n.nav_list a.nav_icon,\n.nav_list .tbnav_arrow {\n /* 部分吧导航栏 */\n padding-left: 22px;\n background: transparent none repeat 0 0 / auto auto padding-box border-box scroll;\n background: initial;\n}\n\n.nav_wrap,\n.nav_list .space,\n.nav_list .focus,\n.nav_list li:hover,\n.nav_list li:hover .tbnav_tab_inner,\n.nav_list .focus .tbnav_tab_inner {\n background: transparent none repeat 0 0 / auto auto padding-box border-box scroll;\n background: initial;\n}\n\n.nav_list a {\n color: var(--default-fore);\n}\n\nspan.tP {\n /* 强调字 */\n color: var(--tieba-theme-fore);\n}\n\n.thread_theme_5 {\n /* 跳页 */\n width: auto;\n width: initial;\n border-color: var(--border-color);\n border-right: none;\n border-left: none;\n background-color: var(--light-background);\n}\n\n.btn_sub,\n.btn-sub,\n.btn-sub-b,\n.core_title_btns li a,\n.p_favthr_main {\n border: none;\n border-radius: 8px;\n /* 部分按钮 */\n background: none;\n background-color: var(--tieba-theme-background);\n color: var(--tieba-theme-fore);\n}\n\n.btn_sub:hover,\n.btn-sub:hover,\n.btn-sub-b:hover,\n.btn_sub:active,\n.btn-sub:active,\n.btn-sub-b:active,\n.btn_sub:focus,\n.btn-sub:focus,\n.btn-sub-b:focus {\n background-color: var(--tieba-theme-color);\n color: var(--default-background);\n}\n\n.l_lzonly:hover,\n.p_favthr_main:hover {\n background-color: var(--tieba-theme-color) !important;\n color: var(--default-background) !important;\n}\n\n.l_lzonly:hover,\n.p_favthr_main:hover {\n /* 部分吧按钮 hover */\n}\n\n#quick_reply {\n /* 回复按钮 */\n display: none;\n}\n\n.d_lzonly_bdaside,\n.p_favthr_main p,\n.j_quick_reply,\n.j_lzl_p a {\n /* 部分吧按钮字体 */\n color: inherit;\n}\n\n.j_quick_reply {\n /* 部分吧额头 */\n padding-left: 0;\n padding-left: initial;\n}\n\n/* 左侧用户信息 */\n.l_post_bright {\n width: auto !important;\n width: initial !important;\n border-color: var(--border-color) !important;\n background: none !important;\n}\n\n.p_author_face {\n border: none !important;\n background: none !important;\n}\n\n.icon_relative img {\n /* 层主头像 */\n border-radius: 16px;\n}\n\n.d_name .p_author_name {\n /* 层主名 */\n color: var(--tieba-theme-fore);\n}\n\n.novel-level-icon {\n /* 小说等级图标 */\n display: none;\n}\n\n.d_badge_bright,\n.user_level .badge {\n /* 等级头衔 */\n border: 1px solid var(--border-color);\n border-radius: 24px;\n background-color: var(--light-background);\n}\n\n.user_level .badge_name {\n /* 等级头衔文本 */\n color: inherit;\n}\n\n.d_badge_bright .d_badge_title {\n padding-left: 4px;\n color: var(--default-fore);\n}\n\n.d_badge_bright .d_badge_lv,\n.user_level .badge_index {\n background-image: none !important;\n}\n\n.d_badge_bright .d_badge_lv,\n.user_level .badge_index {\n /* 等级图标 */\n background-color: var(--tieba-theme-background);\n color: var(--tieba-theme-fore);\n}\n\n.d_badge_lv,\n.user_level .badge_index {\n top: auto !important;\n top: initial !important;\n left: 60px !important;\n width: auto !important;\n width: initial !important;\n height: 8px !important;\n padding: 0 4px !important;\n margin: 12px 4px !important;\n font-family: inherit !important;\n line-height: 2px !important;\n}\n\n.d_badge_lv,\n.user_level .badge_index {\n border-radius: 16px;\n font-size: 14px;\n font-style: italic;\n}\n\n.d_badge_icon1 .d_badge_lv,\n.tieba-lvl-green {\n background-color: var(--level-green-background) !important;\n color: var(--level-green-fore) !important;\n}\n\n.d_badge_icon1 .d_badge_lv,\n.tieba-lvl-green {\n /* 绿牌 */\n}\n\n.d_badge_icon2 .d_badge_lv,\n.d_badge_icon2_1 .d_badge_lv,\n.d_badge_icon2_2 .d_badge_lv,\n.tieba-lvl-blue {\n background-color: var(--level-blue-background) !important;\n color: var(--level-blue-fore) !important;\n}\n\n.d_badge_icon2 .d_badge_lv,\n.d_badge_icon2_1 .d_badge_lv,\n.d_badge_icon2_2 .d_badge_lv,\n.tieba-lvl-blue {\n /* 蓝牌 */\n}\n\n.d_badge_icon3 .d_badge_lv,\n.d_badge_icon3_1 .d_badge_lv,\n.d_badge_icon3_2 .d_badge_lv,\n.tieba-lvl-yellow {\n background-color: var(--level-yellow-background) !important;\n color: var(--level-yellow-fore) !important;\n}\n\n.d_badge_icon3 .d_badge_lv,\n.d_badge_icon3_1 .d_badge_lv,\n.d_badge_icon3_2 .d_badge_lv,\n.tieba-lvl-yellow {\n /* 黄牌 */\n}\n\n.d_badge_icon4 .d_badge_lv,\n.d_badge_icon4_1 .d_badge_lv,\n.d_badge_icon4_2 .d_badge_lv,\n.tieba-lvl-orange {\n background-color: var(--level-orange-background) !important;\n color: var(--level-orange-fore) !important;\n}\n\n.d_badge_icon4 .d_badge_lv,\n.d_badge_icon4_1 .d_badge_lv,\n.d_badge_icon4_2 .d_badge_lv,\n.tieba-lvl-orange {\n /* 橙牌 */\n}\n\n.d_badge_bawu1 .d_badge_lv,\n.d_badge_bawu2 .d_badge_lv {\n text-indent: inherit !important;\n}\n\n.d_badge_bawu1 .d_badge_lv,\n.d_badge_bawu2 .d_badge_lv {\n /* 吧务 */\n}\n\n.d_author .d_pb_icons {\n /* 印记 */\n display: none;\n}\n\n.icon_book_link_icon {\n /* 查看我的印记 */\n display: none;\n}\n\n.region_bright {\n /* 右侧信息 */\n border: none;\n margin-top: 12px;\n background: none;\n background-color: var(--elem-color);\n}\n\n.region_bright .region_title {\n color: var(--default-fore) !important;\n}\n\n#celebrity {\n display: none;\n}\n\n.balv_mod .media_left,\n.balv_mod .media-left {\n /* 我的头像 */\n border: none;\n}\n\n.right_section .tieba_notice {\n /* 右侧反馈 */\n background: none;\n}\n\n.topic_list_box {\n /* 右侧贴吧热议榜 */\n display: none;\n background-color: var(--default-background);\n}\n\n.pb_content {\n /* 容器:右侧剩余部分 */\n border: none;\n background: none;\n background-color: var(--elem-color);\n}\n\n.notice-icon,\n.right_section .tieba_notice {\n padding-left: 0 !important;\n padding-left: initial !important;\n background: none !important;\n}\n\n.notice-icon,\n.right_section .tieba_notice {\n /* 右侧反馈 */\n}\n\n.tieba_notice li {\n background: none;\n}\n\n/* 正文 */\n.p_content {\n border: none;\n background-color: var(--default-background);\n}\n\n.forbid-speech-banner {\n /* 楼主屏蔽 */\n border-top: none;\n}\n\n.BDE_Image {\n /* 正文图片 */\n border-radius: 24px;\n}\n\n.BDE_Image:first-child {\n margin-top: 8px;\n}\n\n.share_btn_wrapper {\n /* 分享控件 */\n display: none;\n}\n\n.post-tail-wrap .icon-jubao {\n /* 楼层举报 */\n display: none;\n}\n\n.post-tail-wrap .icon-jubao::after {\n content: "举报";\n}\n\n.post-tail-wrap .tail-info {\n /* 楼层超链接 */\n color: var(--light-fore);\n}\n\n.complaint {\n /* 部分吧楼层举报 */\n padding-right: 4px;\n background: none;\n}\n\n.complaint::after {\n content: "举报";\n}\n\n.post-tail-wrap .question-image:hover::before {\n /* IP属地说明 */\n border-color: var(--border-color);\n border-radius: 8px;\n background-color: var(--light-background);\n color: var(--default-fore);\n}\n\n.post_bubble_top,\n.post_bubble_bottom {\n /* 特殊气泡 */\n display: none;\n}\n\n.post_bubble_middle {\n background: none !important;\n}\n\n.post_bubble_middle {\n width: auto;\n width: initial;\n padding: 0;\n padding: initial;\n}\n\n.save_face_bg_2 {\n /* 会员右上角标记 */\n display: none;\n}\n\n.replace_div .replace_tip {\n /* 展开图片 */\n border-color: var(--border-color);\n background-color: var(--elem-color);\n}\n\n.achievement_medal_section {\n /* 成就徽章 */\n display: none;\n}\n\n.l_post_bright .d_post_content_main .d_sign_split {\n /* 签名档分割线 */\n border-bottom: 1px solid var(--border-color);\n}\n\n/* 回复 */\n.d_post_content_main {\n background-color: var(--default-background) !important;\n}\n\n.lzl_p_p {\n /* 回复头像边框 */\n border: none;\n}\n\n.lzl_p_p img {\n /* 回复头像 */\n border-radius: 8px;\n}\n\n.core_reply_wrapper {\n border: 1px solid var(--border-color) !important;\n border-radius: 16px !important;\n margin-bottom: 16px !important;\n background: none !important;\n background-color: var(--very-light-background) !important;\n color: var(--default-fore) !important;\n}\n\n.core_reply_wrapper {\n /* 回复 */\n /* border-top-right-radius: 0 !important; */\n}\n\n.core_reply_content li {\n border-top: 0;\n border-top: initial;\n}\n\n.lzl_content_main {\n /* 回复文字 */\n color: var(--default-fore);\n}\n\n.l_post_bright .core_reply_wrapper .core_reply_border_top,\n.core_reply_border_bottom,\n.l_post_bright .core_reply_wrapper .core_reply_content {\n border: none;\n background: none;\n}\n\n/* 收起回复 */\n.lzl_link_fold {\n width: auto;\n height: auto;\n border: none;\n background: none;\n color: var(--minimal-fore);\n}\n\n.core_reply div.hideLzl {\n /* 加载回复 */\n background: none;\n background-color: var(--very-light-background);\n}\n\n.core_reply_wrapper .loading_reply {\n /* 加载动画 */\n display: none;\n}\n\n.lzl_cnt .lzl_s_r {\n /* 回复超链接 */\n color: var(--tieba-theme-fore);\n}\n\n.j_lzl_container .lzl_li_pager_s {\n overflow: visible;\n}\n\n.lzl_li_pager_s .lzl_more,\n.lzl_more span {\n /* 还有x条回复 */\n color: var(--light-fore);\n}\n\n.j_lzl_m {\n /* 点击查看 */\n color: var(--tieba-theme-fore);\n}\n\n.lzl_cnt .lzl_time {\n color: var(--light-fore);\n}\n\n/* 楼中楼举报 */\n.lzl_jb_in,\n.user-jubao-button {\n background: none;\n}\n\n.lzl_jb_in::after,\n.user-jubao-button::after {\n content: "举报";\n}\n\n.lzl_cnt .lzl_content_main {\n display: block;\n}\n\n/* .core_reply .hideLzl {\n opacity: 0;\n height: 0;\n}\n\n.core_reply div:not(.hideLzl) {\n opacity: 1;\n height: unset;\n} */\n/* 贴子内容超链接 */\n.d_post_content a,\n.lzl_cnt .lzl_content_main a:not(.at) {\n margin: auto 2px;\n color: var(--tieba-theme-fore);\n /* text-decoration: underline 1.2px; */\n transition: 0.4s;\n}\n\n/* .d_post_content a:hover,\n.d_post_content a:focus,\n.lzl_cnt .lzl_content_main a:not(.at):hover,\n.lzl_cnt .lzl_content_main a:not(.at):focus {\n background-color: var(--trans-light-background);\n text-decoration: none;\n} */\n.pager_theme_5 a,\n.pager_theme_5 span,\n.jump_btn_bright {\n /* 跳页按钮 */\n border-color: var(--default-background);\n border-radius: 8px;\n background: none;\n background-color: var(--default-background);\n color: var(--minimal-fore);\n}\n\n.pager_theme_5 a:hover,\n.jump_btn_bright:hover {\n border-color: var(--tieba-theme-color);\n background-color: var(--tieba-theme-color);\n color: var(--default-background);\n}\n\n/* 底部 */\n.thread_theme_7 {\n /* 顶栏 */\n width: auto;\n width: initial;\n border-color: var(--border-color);\n background-color: var(--light-background);\n}\n\n#pb-footer-header {\n background-color: var(--default-background);\n}\n\n#tb_rich_poster_container {\n /* 内容 */\n width: auto;\n width: initial;\n border-radius: 24px;\n background-color: var(--default-background);\n}\n\n.poster_head_text a.cur {\n color: var(--highlight-fore) !important;\n}\n\n.edui-editor-body {\n border-color: var(--border-color) !important;\n}\n\n.edui-editor-body {\n /* 文本框 */\n border-radius: 16px;\n background: none;\n}\n\n.edui-container .edui-editor-body.body-container-focus,\n.edui-container .edui-editor-body.body-container-focus .edui-body-container {\n border-color: var(--tieba-theme-color) !important;\n}\n\n.old_style_wrapper {\n border-color: var(--border-color);\n border-radius: 24px;\n background-color: var(--elem-color);\n}\n\n.edui-editor-body .edui-body-container {\n width: auto !important;\n width: initial !important;\n}\n\n.edui-editor-body .edui-body-container {\n /* 全部文本框 */\n border-radius: 16px;\n background: var(--default-background);\n}\n\n.edui-toolbar .edui-btn-toolbar,\n.edui-container .edui-toolbar {\n margin-top: 4px;\n /* 工具栏 */\n background-color: var(--elem-color);\n}\n\n.pb_footer {\n width: auto;\n width: initial;\n border: none;\n border-color: var(--border-color);\n background: none;\n}\n\n.save-to-quick-reply-btn {\n /* “保存至快速回贴”按钮 */\n border-color: var(--border-color);\n background: none;\n background-color: var(--light-background);\n color: inherit;\n}\n\n.save-to-quick-reply-btn span {\n color: var(--tieba-theme-fore);\n}\n\n.footer {\n display: none;\n}\n\n.skin_normal .wrap2 {\n background: none;\n background-color: var(--page-background);\n}\n\n#lcsas-container {\n display: none;\n}\n\n/* TODO: 隐藏用户3天 */\n.user-hide-post-down,\n.user-hide-post-up {\n display: none !important;\n}\n.user-hide-post-down,\n.user-hide-post-up {\n background-color: var(--light-fore);\n background-position: center;\n background-repeat: no-repeat;\n background-size: 16px;\n opacity: 0;\n}\n\n/* 选择搜索 */\n#selectsearch-icon {\n display: none;\n}\n\n/* TODO: 用户卡片 */\n.ui_card_wrap {\n background: none;\n}\n\n.ui_card_content {\n border-color: var(--border-color);\n border-radius: 16px;\n background: none;\n box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);\n}\n\n.card_userinfo_wrap {\n background: none;\n background-color: var(--default-background);\n}\n\n.card_userinfo_left .userinfo_head {\n /* 头像边框 */\n background: none;\n}\n\n.j_avatar img {\n width: 92px;\n height: 92px;\n border: 4px solid var(--border-color);\n border-radius: 24px;\n -webkit-backdrop-filter: blur(24px);\n backdrop-filter: blur(24px);\n}\n\n.card_userinfo_middle .userinfo_sex {\n background: none;\n}\n\n.userinfo_sex_male::after {\n content: "♂";\n}\n\n.userinfo_sex_female::after {\n content: "♀";\n}\n\n.ui_card_wrap .ui_white_down,\n.ui_card_wrap .ui_white_up {\n /* 三角 */\n display: none;\n}\n\n.card_userinfo_guide {\n /* 右上角 */\n display: none;\n}\n\n.user_card_loading {\n /* 加载 */\n background-color: var(--default-background);\n}\n\n.user_card_loading img {\n display: none;\n}\n\n/* TODO: 第三方内容吧适配 */\n/* 由第三方提供的吧 */\n/* 进吧导航 */\n.plat_head_theme2,\n.plat_header {\n border: none;\n background-color: transparent;\n background-color: initial;\n}';
  2820. function hexToRGBA(hex) {
  2821. const hexValue = _2.startsWith(hex, "#") ? _2.trimStart(hex, "#") : hex;
  2822. const tokenConverter = hexValue.length <= 4 ? (chunk) => parseInt(_2.repeat(chunk[0], 2), 16) : (chunk) => parseInt(_2.join(chunk, ""), 16);
  2823. const chunkSize = hexValue.length <= 4 ? 1 : 2;
  2824. const chunks = _2.chunk(hexValue, chunkSize);
  2825. return {
  2826. r: tokenConverter(chunks[0]),
  2827. g: tokenConverter(chunks[1]),
  2828. b: tokenConverter(chunks[2]),
  2829. a: chunks.length === 4 ? tokenConverter(chunks[3]) : 1
  2830. };
  2831. }
  2832. function rgbaToHSLA(rgba) {
  2833. const normalizedR = rgba.r / 255;
  2834. const normalizedG = rgba.g / 255;
  2835. const normalizedB = rgba.b / 255;
  2836. const minValue = Math.min(normalizedR, normalizedG, normalizedB);
  2837. const maxValue = Math.max(normalizedR, normalizedG, normalizedB);
  2838. const lightness = (maxValue + minValue) / 2;
  2839. let saturation;
  2840. if (lightness <= 0.5) {
  2841. saturation = (maxValue - minValue) / (maxValue + minValue);
  2842. } else {
  2843. saturation = (maxValue - minValue) / (2 - maxValue - minValue);
  2844. }
  2845. let hue;
  2846. if (maxValue === minValue) {
  2847. hue = 0;
  2848. } else if (maxValue === normalizedR) {
  2849. hue = (normalizedG - normalizedB) / (maxValue - minValue);
  2850. } else if (maxValue === normalizedG) {
  2851. hue = 2 + (normalizedB - normalizedR) / (maxValue - minValue);
  2852. } else {
  2853. hue = 4 + (normalizedR - normalizedG) / (maxValue - minValue);
  2854. }
  2855. hue *= 60;
  2856. if (hue < 0) {
  2857. hue += 360;
  2858. }
  2859. return {
  2860. h: _2.round(hue, 2),
  2861. s: `${_2.round(saturation * 100)}%`,
  2862. l: `${_2.round(lightness * 100)}%`,
  2863. a: rgba.a
  2864. };
  2865. }
  2866. const darkPrefers = matchMedia("(prefers-color-scheme: dark)");
  2867. async function loadDynamicCSS() {
  2868. const theme = themeColor.get();
  2869. const darkRGBA = hexToRGBA(theme.dark);
  2870. const lightRGBA = hexToRGBA(theme.light);
  2871. const darkHSLA = rgbaToHSLA(darkRGBA);
  2872. const lightHSLA = rgbaToHSLA(lightRGBA);
  2873. const dynCSS = parseMultiCSS({
  2874. ":root": {
  2875. "--content-max": wideScreen.get().noLimit ? "100vw" : `${wideScreen.get().maxWidth}px`,
  2876. "--code-zh": `${_2.join(userFonts.get(), ",")}`,
  2877. "--code-monospace": `${_2.join(monospaceFonts.get(), ",")}`,
  2878. "--font-weight-normal": `${fontWeights.get().normal}`,
  2879. "--font-weight-bold": `${fontWeights.get().bold}`
  2880. },
  2881. "html.dark-theme": {
  2882. "--tieba-theme-color": theme.dark,
  2883. "--trans-tieba-theme-color": `rgb(${darkRGBA.r} ${darkRGBA.g} ${darkRGBA.b} / 80%)`,
  2884. "--tieba-theme-hover": `hsl(${darkHSLA.h}deg ${parseInt(darkHSLA.s) + 40}% ${parseInt(darkHSLA.l) + 10}%)`,
  2885. "--tieba-theme-active": `hsl(${darkHSLA.h}deg ${parseInt(darkHSLA.s) + 50}% ${parseInt(darkHSLA.l) + 20}%)`,
  2886. "--tieba-theme-background": `rgb(${darkRGBA.r} ${darkRGBA.g} ${darkRGBA.b} / 24%)`,
  2887. "--tieba-theme-fore": `hsl(${darkHSLA.h}deg 100% 75%)`
  2888. },
  2889. "html.light-theme": {
  2890. "--tieba-theme-color": theme.light,
  2891. "--trans-tieba-theme-color": `rgb(${lightRGBA.r} ${lightRGBA.g} ${lightRGBA.b} / 80%)`,
  2892. "--tieba-theme-hover": `hsl(${lightHSLA.h}deg ${parseInt(lightHSLA.s) - 40}% ${parseInt(lightHSLA.l) - 10}%)`,
  2893. "--tieba-theme-active": `hsl(${lightHSLA.h}deg ${parseInt(lightHSLA.s) - 50}% ${parseInt(lightHSLA.l) - 20}%)`,
  2894. "--tieba-theme-background": `rgb(${lightRGBA.r} ${lightRGBA.g} ${lightRGBA.b} / 24%)`,
  2895. "--tieba-theme-fore": `hsl(${lightHSLA.h}deg 60% 32%)`
  2896. }
  2897. });
  2898. _GM_addStyle(dynCSS);
  2899. window.addEventListener("load", function() {
  2900. _GM_addStyle(
  2901. parseMultiCSS({
  2902. ":root": {
  2903. "--scrollbar-width": `${scrollbarWidth()}px`
  2904. }
  2905. })
  2906. );
  2907. }, { once: true });
  2908. const customCSS = customStyle.get();
  2909. if (customCSS !== "") _GM_addStyle(customCSS);
  2910. }
  2911. async function loadMainCSS() {
  2912. overwriteCSS(
  2913. baseStyle,
  2914. universalStyle,
  2915. tiebaErrorStyle,
  2916. tiebaForumStyle,
  2917. tiebaHomeStyle,
  2918. tiebaMainStyle,
  2919. tiebaThreadStyle
  2920. );
  2921. document.addEventListener("DOMContentLoaded", function() {
  2922. document.head.appendChild(domrd("link", {
  2923. type: "image/icon",
  2924. rel: "shortcut icon",
  2925. href: getResource("/assets/images/main/favicon32.ico")
  2926. }));
  2927. }, { once: true });
  2928. }
  2929. let customBackgroundElement = undefined;
  2930. async function setCustomBackground() {
  2931. if (customBackgroundElement) {
  2932. document.head.removeChild(customBackgroundElement);
  2933. }
  2934. customBackgroundElement = injectCSSRule("body.custom-background", {
  2935. backgroundImage: `url('${customBackground.get()}') !important`,
  2936. backgroundRepeat: "no-repeat !important",
  2937. backgroundAttachment: "fixed !important",
  2938. backgroundSize: "cover !important"
  2939. });
  2940. waitUntil(() => !_2.isNil(document.body)).then(function() {
  2941. if (customBackground.get()) {
  2942. document.body.classList.add("custom-background");
  2943. } else {
  2944. document.body.classList.remove("custom-background");
  2945. }
  2946. });
  2947. }
  2948. marked2.marked.setOptions({});
  2949. function currentPageType() {
  2950. if (location.hostname.toLowerCase() !== "tieba.baidu.com") return "unhandled";
  2951. const pathname = location.pathname.toLocaleLowerCase();
  2952. if (_2.includes(["/", "/index.html"], pathname)) return "index";
  2953. if (/\/p\/\d+/.test(pathname)) return "thread";
  2954. if (pathname === "/f") return "forum";
  2955. if (pathname === "/home/main") return "user";
  2956. return "unhandled";
  2957. }
  2958. async function getLatestReleaseFromGitee(forceUpdate = false) {
  2959. if (latestRelease.get() && !forceUpdate) {
  2960. return latestRelease.get();
  2961. } else {
  2962. const TTL = function() {
  2963. switch (updateConfig.get().time) {
  2964. case "1h":
  2965. return 1;
  2966. case "3h":
  2967. return 3;
  2968. case "6h":
  2969. return 6;
  2970. case "never":
  2971. return -1;
  2972. }
  2973. }();
  2974. if (TTL < 0) return;
  2975. const updateUrl = `https://gitee.com/api/v5/repos/${Owner}/${RepoName}/releases/latest/`;
  2976. const response = await fetch(updateUrl);
  2977. if (response.ok) {
  2978. const result = await response.json();
  2979. if (result.message) return;
  2980. latestRelease.set(result, spawnOffsetTS(0, 0, 0, TTL));
  2981. return result;
  2982. } else {
  2983. return;
  2984. }
  2985. }
  2986. }
  2987. function checkUpdateAndNotify(showLatest = false) {
  2988. if (updateConfig.get().time === "never") return;
  2989. if (!updateConfig.get().notify) return;
  2990. if (!showUpdateToday.get()) return;
  2991. if (_GM_info.script.version === "developer-only") return;
  2992. getLatestReleaseFromGitee().then((latestRelease2) => {
  2993. if (latestRelease2 && latestRelease2.tag_name.slice(1) !== _GM_info.script.version) {
  2994. if (ignoredTag.get() === latestRelease2.tag_name) return;
  2995. userDialog(vue.createVNode("div", {
  2996. "class": "markdown",
  2997. "innerHTML": marked2.marked(latestRelease2.body),
  2998. "style": parseCSSRule({
  2999. maxWidth: "600px"
  3000. })
  3001. }, null), {
  3002. title: latestRelease2.name,
  3003. dialogButtons: [{
  3004. text: "安装",
  3005. event() {
  3006. installFromRelease(latestRelease2);
  3007. return true;
  3008. },
  3009. style: "themed"
  3010. }, {
  3011. text: "今日不再提醒",
  3012. event() {
  3013. showUpdateToday.set(false);
  3014. return true;
  3015. }
  3016. }, {
  3017. text: "跳过该版本",
  3018. event() {
  3019. ignoredTag.set(latestRelease2.tag_name);
  3020. return true;
  3021. }
  3022. }]
  3023. });
  3024. } else {
  3025. if (showLatest) messageBox({
  3026. title: "检查更新",
  3027. content: "当前已是最新版本",
  3028. type: "okCancel"
  3029. });
  3030. }
  3031. });
  3032. }
  3033. function installFromRelease(release) {
  3034. function notFound() {
  3035. toast({
  3036. message: "安装失败:未找到可用的资源",
  3037. type: "error",
  3038. duration: 6e3,
  3039. blurEffect: true
  3040. });
  3041. }
  3042. if (!release.assets || release.assets.length <= 0) {
  3043. notFound();
  3044. return;
  3045. }
  3046. const asset = function() {
  3047. for (const asset2 of release.assets) {
  3048. if (asset2.name && asset2.name.endsWith(".user.js")) {
  3049. return asset2.browser_download_url;
  3050. }
  3051. }
  3052. }();
  3053. if (asset) {
  3054. _GM_openInTab(asset, {
  3055. active: true
  3056. });
  3057. } else {
  3058. notFound();
  3059. return;
  3060. }
  3061. }
  3062. function getResource(path) {
  3063. return `${GiteeRepo}/raw/beta/${path}`;
  3064. }
  3065. function setTheme(theme) {
  3066. switch (theme) {
  3067. case "dark":
  3068. darkTheme();
  3069. break;
  3070. case "light":
  3071. lightTheme();
  3072. break;
  3073. case "auto":
  3074. default:
  3075. darkPrefers.matches ? darkTheme() : lightTheme();
  3076. break;
  3077. }
  3078. function lightTheme() {
  3079. document.documentElement.classList.add("light-theme");
  3080. document.documentElement.classList.remove("dark-theme");
  3081. document.documentElement.classList.remove("dark");
  3082. }
  3083. function darkTheme() {
  3084. document.documentElement.classList.add("dark-theme");
  3085. document.documentElement.classList.remove("light-theme");
  3086. document.documentElement.classList.add("dark");
  3087. }
  3088. }
  3089. function backupUserConfigs() {
  3090. const excluded = ["unreadFeeds", "latestRelease", "showUpdateToday"];
  3091. const userKeys = _2.filter(_GM_listValues(), (key) => !_2.includes(excluded, key));
  3092. const userValues = _2.map(userKeys, (key) => {
  3093. return _GM_getValue(key);
  3094. });
  3095. const configs = _2.zipObject(userKeys, userValues);
  3096. outputFile(`tieba-remix-backup@${(/* @__PURE__ */ new Date()).getTime()}.json`, JSON.stringify(configs));
  3097. }
  3098. async function restoreUserConfigs() {
  3099. const backupData = JSON.parse(await selectLocalFile());
  3100. _2.forEach(Object.entries(backupData), ([key, value]) => {
  3101. _GM_setValue(key, value);
  3102. });
  3103. }
  3104. class TbObserver {
  3105. constructor(selector, options, initEvent) {
  3106. __publicField(this, "selector");
  3107. __publicField(this, "options");
  3108. __publicField(this, "initEvent");
  3109. __publicField(this, "events", []);
  3110. this.selector = selector;
  3111. this.options = options;
  3112. this.initEvent = initEvent;
  3113. }
  3114. observe() {
  3115. const eventFuncs = () => {
  3116. this.events.forEach((func) => {
  3117. func();
  3118. });
  3119. };
  3120. if (typeof this.initEvent === "undefined") {
  3121. eventFuncs();
  3122. } else {
  3123. window.addEventListener(this.initEvent, eventFuncs);
  3124. }
  3125. const observer = new MutationObserver(eventFuncs);
  3126. const obsElem = dom(this.selector);
  3127. if (obsElem) observer.observe(obsElem, this.options);
  3128. }
  3129. addEvent(...events) {
  3130. _2.forEach(events, (event) => {
  3131. if (this.events.includes(event)) return;
  3132. if (typeof this.initEvent === "undefined") {
  3133. event();
  3134. } else {
  3135. window.addEventListener(this.initEvent, event);
  3136. }
  3137. this.events.push(event);
  3138. });
  3139. }
  3140. }
  3141. const threadFloorsObserver = new TbObserver("#j_p_postlist", { childList: true });
  3142. const threadCommentsObserver = new TbObserver("#j_p_postlist", { childList: true, subtree: true });
  3143. const legacyIndexFeedsObserver = new TbObserver("#new_list", { childList: true });
  3144. const forumThreadsObserver = new TbObserver("#pagelet_frs-list\\/pagelet\\/thread", { attributes: true }, "load");
  3145. function loadPerf() {
  3146. setPerfAttr();
  3147. setThreadLazyload();
  3148. }
  3149. function setPerfAttr() {
  3150. const perfAttr = {
  3151. default: "perf-default",
  3152. saver: "perf-saver",
  3153. performance: "perf-performance"
  3154. };
  3155. _2.forEach(document.documentElement.attributes, (attr) => {
  3156. if (_2.startsWith(attr.name, "perf-")) {
  3157. document.documentElement.removeAttribute(attr.name);
  3158. }
  3159. });
  3160. document.documentElement.toggleAttribute(perfAttr[perfProfile.get()]);
  3161. }
  3162. async function setThreadLazyload() {
  3163. if (currentPageType() !== "thread") return;
  3164. const lazyloadDiff = {
  3165. default: 1e3,
  3166. saver: 500,
  3167. performance: 9999
  3168. };
  3169. await waitUntil(() => typeof datalazyload !== "undefined");
  3170. threadFloorsObserver.addEvent(setDiff);
  3171. function setDiff() {
  3172. setTimeout(() => {
  3173. datalazyload.userConfig.diff = lazyloadDiff[perfProfile.get()];
  3174. }, 500);
  3175. }
  3176. }
  3177. const MainTitle = "Tieba Remix";
  3178. const Owner = "HacksawBlade";
  3179. const RepoName = "Tieba-Remix";
  3180. const GithubRepo = `https://github.com/${Owner}/${RepoName}`;
  3181. const GiteeRepo = `https://gitee.com/${Owner}/${RepoName}`;
  3182. const BaiduPassport = "https://passport.baidu.com/";
  3183. const REMIXED = "\n██████╗ ███████╗███╗ ███╗██╗██╗ ██╗███████╗██████╗ \n██╔══██╗██╔════╝████╗ ████║██║╚██╗██╔╝██╔════╝██╔══██╗\n██████╔╝█████╗ ██╔████╔██║██║ ╚███╔╝ █████╗ ██║ ██║\n██╔══██╗██╔══╝ ██║╚██╔╝██║██║ ██╔██╗ ██╔══╝ ██║ ██║\n██║ ██║███████╗██║ ╚═╝ ██║██║██╔╝ ██╗███████╗██████╔╝\n╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝╚═╝╚═╝ ╚═╝╚══════╝╚═════╝ \n";
  3184. class UserKey {
  3185. constructor(key, defaultValue, listeners, migration) {
  3186. __publicField(this, "key");
  3187. __publicField(this, "defaultValue");
  3188. __publicField(this, "listeners");
  3189. __publicField(this, "migration");
  3190. this.key = key;
  3191. this.defaultValue = defaultValue;
  3192. this.listeners = {
  3193. getter: (listeners == null ? undefined : listeners.getter) ? [listeners.getter] : [],
  3194. setter: (listeners == null ? undefined : listeners.setter) ? [listeners.setter] : []
  3195. };
  3196. this.migration = migration;
  3197. }
  3198. dispatchEvent(event, value) {
  3199. _2.forEach(this.listeners[event], (listener) => listener(value));
  3200. }
  3201. get() {
  3202. let value = _GM_getValue(this.key, this.defaultValue);
  3203. if (isLiteralObject(value) && _2.keys(value).length < _2.keys(this.defaultValue).length) {
  3204. value = _2.merge(this.defaultValue, value);
  3205. }
  3206. if (this.migration) {
  3207. value = this.migration(value);
  3208. _GM_setValue(this.key, value);
  3209. }
  3210. this.dispatchEvent("getter", value);
  3211. return value;
  3212. }
  3213. set(value) {
  3214. _GM_setValue(this.key, value);
  3215. this.dispatchEvent("setter", value);
  3216. }
  3217. remove() {
  3218. _GM_deleteValue(this.key);
  3219. }
  3220. merge(value) {
  3221. if (isLiteralObject(value)) {
  3222. const merged = { ...this.get(), ...value };
  3223. this.set(merged);
  3224. this.dispatchEvent("setter", merged);
  3225. }
  3226. }
  3227. mergeDeeply(value) {
  3228. if (isLiteralObject(value)) {
  3229. const merged = _2.merge(this.get(), value);
  3230. this.set(merged);
  3231. this.dispatchEvent("setter", merged);
  3232. }
  3233. }
  3234. }
  3235. class UserKeyTS extends UserKey {
  3236. constructor(key, defaultValue, invalidfn, listeners, migration) {
  3237. super(key, defaultValue, listeners, migration);
  3238. __publicField(this, "defaultInvalid", () => spawnOffsetTS(0, 0, 0, 12));
  3239. this.defaultInvalid = invalidfn ? invalidfn : this.defaultInvalid;
  3240. }
  3241. get() {
  3242. let value = getUserValueTS(this.key, this.defaultValue);
  3243. if (isLiteralObject(value) && _2.keys(value).length < _2.keys(this.defaultValue).length) {
  3244. value = _2.merge(this.defaultValue, value);
  3245. }
  3246. if (this.migration) value = this.migration(value);
  3247. this.dispatchEvent("getter", value);
  3248. return value;
  3249. }
  3250. /**
  3251. * 设置时间敏感的用户 key
  3252. * @param value 需要设置的值
  3253. * @param invalidTime 失效时间,默认为函数执行 12 小时后
  3254. */
  3255. set(value, invalidTime) {
  3256. setUserValueTS(this.key, value, invalidTime ? invalidTime : this.defaultInvalid());
  3257. this.dispatchEvent("setter", value);
  3258. }
  3259. merge(value, invalidTime) {
  3260. if (isLiteralObject(value)) {
  3261. const merged = { ...this.get(), ...value };
  3262. this.set(merged, invalidTime ? invalidTime : this.defaultInvalid());
  3263. this.dispatchEvent("setter", merged);
  3264. }
  3265. }
  3266. mergeDeeply(value, invalidTime) {
  3267. if (isLiteralObject(value)) {
  3268. const merged = _2.merge(this.get(), value);
  3269. this.set(merged, invalidTime ? invalidTime : this.defaultInvalid());
  3270. this.dispatchEvent("setter", merged);
  3271. }
  3272. }
  3273. }
  3274. const perfProfile = new UserKey("perfProfile", "default", {
  3275. setter() {
  3276. setPerfAttr();
  3277. }
  3278. });
  3279. const disabledModules = new UserKey("disabledModules", []);
  3280. const unreadFeeds = new UserKeyTS("unreadFeeds", []);
  3281. const experimental = new UserKey("experimental", {
  3282. moreBlurEffect: false,
  3283. rasterEffect: false
  3284. });
  3285. const latestRelease = new UserKeyTS("latestRelease", undefined);
  3286. const updateConfig = new UserKey("updateConfig", {
  3287. time: "6h",
  3288. notify: true
  3289. });
  3290. const showUpdateToday = new UserKeyTS("showUpdateToday", true, () => (/* @__PURE__ */ new Date()).setHours(0, 0, 0, 0) + 24 * 60 * 60 * 1e3);
  3291. const ignoredTag = new UserKey("ignoredTag", "");
  3292. const themeType = new UserKey(
  3293. "themeType",
  3294. "auto",
  3295. {
  3296. setter(value) {
  3297. setTheme(value);
  3298. }
  3299. }
  3300. );
  3301. const compactLayout = new UserKey("compactLayout", false);
  3302. const wideScreen = new UserKey("wideScreen", {
  3303. maxWidth: 1080,
  3304. noLimit: false
  3305. });
  3306. const themeColor = new UserKey("themeColor", {
  3307. light: "#614ec2",
  3308. dark: "#7161c1"
  3309. });
  3310. const customBackground = new UserKey(
  3311. "customBackground",
  3312. undefined,
  3313. {
  3314. setter() {
  3315. setCustomBackground();
  3316. }
  3317. }
  3318. );
  3319. const pageExtension = new UserKey("pageExtension", {
  3320. index: true,
  3321. thread: true
  3322. });
  3323. const userFonts = new UserKey("userFonts", []);
  3324. const monospaceFonts = new UserKey("monospaceFonts", [
  3325. "Consolas",
  3326. "JetBrains Mono",
  3327. "Fira Code",
  3328. "Menlo",
  3329. "monospace"
  3330. ]);
  3331. const navBarHideMode = new UserKey("navBarHideMode", "fold");
  3332. const customStyle = new UserKey("customStyle", "");
  3333. const fontWeights = new UserKey("fontWeights", {
  3334. "normal": 400,
  3335. "bold": 700
  3336. });
  3337. function getUserValueTS(key, def) {
  3338. try {
  3339. const valueTS = _GM_getValue(key, {
  3340. value: def,
  3341. invalidTime: 0
  3342. });
  3343. const timeStamp = Date.now();
  3344. if (valueTS.invalidTime >= timeStamp) {
  3345. return valueTS.value;
  3346. } else {
  3347. return def;
  3348. }
  3349. } catch (error) {
  3350. return def;
  3351. }
  3352. }
  3353. function setUserValueTS(key, value, invalidTime) {
  3354. try {
  3355. if (invalidTime) {
  3356. _GM_setValue(key, {
  3357. value,
  3358. invalidTime
  3359. });
  3360. } else {
  3361. _GM_setValue(key, value);
  3362. }
  3363. } catch (error) {
  3364. console.warn("setUserValueTS", error);
  3365. }
  3366. }
  3367. class Queue {
  3368. constructor(items) {
  3369. __publicField(this, "items", []);
  3370. if (items) this.items = items;
  3371. }
  3372. /** 队首 */
  3373. peek() {
  3374. return this.items[0] ? this.items[0] : undefined;
  3375. }
  3376. /** 队列长度 */
  3377. length() {
  3378. return this.items.length;
  3379. }
  3380. /** 入队 */
  3381. enqueue(...elements) {
  3382. this.items.push(...elements);
  3383. }
  3384. /** 出队 */
  3385. dequeue() {
  3386. return this.items.shift();
  3387. }
  3388. /** 队列是否为空 */
  3389. isEmpty() {
  3390. return this.items.length === 0;
  3391. }
  3392. /** 清空队列 */
  3393. clear() {
  3394. this.items = [];
  3395. }
  3396. }
  3397. let publicToastInstance;
  3398. let isToasting = false;
  3399. const toastsQueue = new Queue();
  3400. function toast(props) {
  3401. toastsQueue.enqueue([{
  3402. blurEffect: perfProfile.get() === "performance",
  3403. ...props
  3404. }, -1]);
  3405. const interval = setInterval(() => {
  3406. if (!isToasting) {
  3407. const peek = toastsQueue.peek();
  3408. if (peek) renderToast(peek[0]);
  3409. clearInterval(interval);
  3410. }
  3411. }, 100);
  3412. }
  3413. function renderToast(toastProps) {
  3414. isToasting = true;
  3415. publicToastInstance = vue.createApp(toastVue, toastProps);
  3416. if (!document.getElementById(
  3417. "t-wrapper"
  3418. /* toast-wrapper */
  3419. )) {
  3420. document.body.insertBefore(domrd("div", {
  3421. "id": "t-wrapper"
  3422. }), document.body.firstChild);
  3423. }
  3424. const vm = publicToastInstance.mount("#t-wrapper");
  3425. const peek = toastsQueue.peek();
  3426. if (!peek) return;
  3427. peek[1] = setTimeout(() => {
  3428. publicToastInstance.unmount();
  3429. toastsQueue.dequeue();
  3430. isToasting = false;
  3431. }, toastProps.duration ? toastProps.duration : 6e3);
  3432. return vm;
  3433. }
  3434. function passToNextToast() {
  3435. publicToastInstance.unmount();
  3436. const peek = toastsQueue.peek();
  3437. if (peek) {
  3438. clearTimeout(peek[1]);
  3439. }
  3440. toastsQueue.dequeue();
  3441. isToasting = false;
  3442. const next = toastsQueue.peek();
  3443. if (next) {
  3444. setTimeout(() => {
  3445. renderToast(next[0]);
  3446. }, 10);
  3447. }
  3448. }
  3449. async function requestInstance(api) {
  3450. try {
  3451. const response = await api;
  3452. if (response.ok) {
  3453. return await response.json();
  3454. }
  3455. } catch (error) {
  3456. toast({
  3457. message: errorMessage(error),
  3458. type: "error",
  3459. duration: 6e3
  3460. });
  3461. }
  3462. }
  3463. const modules = [];
  3464. function AllModules() {
  3465. return modules;
  3466. }
  3467. function errorMessage(error) {
  3468. const errBody = error.stack ? error.stack : error.message;
  3469. return `${_GM_info.script.name} ${_GM_info.script.version}
  3470. ${errBody}`;
  3471. }
  3472. function spawnOffsetTS(year = 0, month = 0, day = 0, hours = 0, minutes = 0, seconds = 0) {
  3473. const now = /* @__PURE__ */ new Date();
  3474. const offset = new Date(
  3475. now.getFullYear() + year,
  3476. now.getMonth() + month,
  3477. now.getDate() + day,
  3478. now.getHours() + hours,
  3479. now.getMinutes() + minutes,
  3480. now.getSeconds() + seconds,
  3481. 0
  3482. );
  3483. return offset.getTime();
  3484. }
  3485. function requestBody(body) {
  3486. let reqBody = "";
  3487. _2.forOwn(body, (value, key) => {
  3488. if (!value) value = "";
  3489. reqBody += `${key}=${value}&`;
  3490. });
  3491. return reqBody.slice(0, -1);
  3492. }
  3493. function waitUntil(pred, timeout2 = Infinity) {
  3494. return new Promise((resolve, reject) => {
  3495. const startTime = performance.now();
  3496. let id = -1;
  3497. function tick() {
  3498. if (pred()) {
  3499. cancelAnimationFrame(id);
  3500. resolve();
  3501. } else if (performance.now() - startTime >= timeout2) {
  3502. cancelAnimationFrame(id);
  3503. reject(new Error("等待超时"));
  3504. console.warn("[waitUntil] 等待超时,该函数未在指定时间内得到期望值:", pred);
  3505. console.trace("发生错误的调用者:");
  3506. if (_GM_info.script.version === "developer-only") {
  3507. alert(`等待超时,该函数未在指定时间内得到期望值:${pred}`);
  3508. }
  3509. } else {
  3510. id = requestAnimationFrame(tick);
  3511. }
  3512. }
  3513. id = requestAnimationFrame(tick);
  3514. });
  3515. }
  3516. function isLiteralObject(obj) {
  3517. return obj && typeof obj === "object" && !Array.isArray(obj);
  3518. }
  3519. function outputFile(filename, content) {
  3520. const blob = new Blob([content], { type: "text/plain" });
  3521. const url = URL.createObjectURL(blob);
  3522. const link = document.createElement("a");
  3523. link.href = url;
  3524. link.download = filename;
  3525. link.click();
  3526. URL.revokeObjectURL(url);
  3527. }
  3528. async function selectLocalFile(mode = "text") {
  3529. return new Promise((resolve, reject) => {
  3530. const input = document.createElement("input");
  3531. input.type = "file";
  3532. input.addEventListener("change", function() {
  3533. if (!input.files) return;
  3534. const file = input.files[0];
  3535. const reader = new FileReader();
  3536. reader.addEventListener("loadend", function() {
  3537. const base64String = reader.result;
  3538. resolve(base64String);
  3539. });
  3540. reader.addEventListener("error", function() {
  3541. reject(new Error());
  3542. });
  3543. switch (mode) {
  3544. case "text": {
  3545. reader.readAsText(file);
  3546. break;
  3547. }
  3548. case "base64": {
  3549. reader.readAsDataURL(file);
  3550. break;
  3551. }
  3552. }
  3553. });
  3554. input.click();
  3555. });
  3556. }
  3557. const fadeInElems = [];
  3558. const fadeInClass = "fade-in-elem";
  3559. function dom(selector, arg1, arg2) {
  3560. if (!arg1) {
  3561. return document.querySelector(selector) ?? undefined;
  3562. }
  3563. if (Array.isArray(arg1)) {
  3564. return Array.from(document.querySelectorAll(selector));
  3565. }
  3566. if (!arg2) {
  3567. return arg1.querySelector(selector) ?? undefined;
  3568. }
  3569. return Array.from(arg1.querySelectorAll(selector));
  3570. }
  3571. async function asyncdom(selector, parent, timeout2 = Infinity) {
  3572. return waitUntil(() => !_2.isNil(dom(selector, parent)), timeout2).then(() => dom(selector, parent));
  3573. }
  3574. function afterHead(callbackfn) {
  3575. callbackfn();
  3576. }
  3577. function mergeNodeAttrs(node, attrs) {
  3578. _2.forOwn(attrs, (value, key) => {
  3579. if (value !== node.getAttribute(key)) {
  3580. if (isLiteralObject(value)) {
  3581. node.setAttribute(key, JSON.stringify(attrs[key]));
  3582. } else {
  3583. node.setAttribute(key, attrs[key]);
  3584. }
  3585. }
  3586. });
  3587. }
  3588. function domrd(tag, attrs, children = [], doc) {
  3589. const DOC = document;
  3590. const elem = DOC.createElement(tag);
  3591. if (attrs) {
  3592. mergeNodeAttrs(elem, attrs);
  3593. }
  3594. if (typeof children === "string") {
  3595. elem.appendChild(document.createTextNode(children));
  3596. } else {
  3597. _2.forEach(children, (child) => {
  3598. if (typeof child === "string") {
  3599. elem.appendChild(document.createTextNode(child));
  3600. } else {
  3601. elem.appendChild(child);
  3602. }
  3603. });
  3604. }
  3605. return elem;
  3606. }
  3607. function findParent(el, trait, mode = "className") {
  3608. const verifier = (() => {
  3609. switch (mode) {
  3610. case "selector": {
  3611. const allValid = new Set(dom(trait, []));
  3612. return (parent) => {
  3613. return allValid.has(parent);
  3614. };
  3615. }
  3616. case "className": {
  3617. return (parent) => parent.classList.contains(trait) ?? false;
  3618. }
  3619. case "id": {
  3620. return (parent) => parent.id === trait;
  3621. }
  3622. case "tagName": {
  3623. return (parent) => parent.tagName.toLowerCase() === trait.toLowerCase();
  3624. }
  3625. }
  3626. })();
  3627. while (el.parentElement && !verifier(el.parentElement)) {
  3628. el = el.parentElement;
  3629. }
  3630. return el.parentElement ? el.parentElement : undefined;
  3631. }
  3632. function fadeInLoad(selector) {
  3633. dom(selector, []).forEach((elem) => {
  3634. elem.classList.add(fadeInClass);
  3635. elem.addEventListener("animationend", () => {
  3636. elem.style.opacity = "1";
  3637. elem.classList.remove(fadeInClass);
  3638. });
  3639. });
  3640. }
  3641. class EventProxy {
  3642. constructor() {
  3643. __publicField(this, "records", []);
  3644. }
  3645. /**
  3646. * 注册(不可用)事件
  3647. * @param target 事件目标
  3648. * @param type 事件类型
  3649. * @param callback 事件回调函数
  3650. * @param options 选项
  3651. */
  3652. on(target, type, callback, options) {
  3653. if (!target) return;
  3654. target.addEventListener(type, callback, options);
  3655. this.records.push({ target, type, callback, options });
  3656. }
  3657. /** 销毁通过该代理注册(不可用)的所有事件 */
  3658. release() {
  3659. _2.forEach(this.records, ({ target, type, callback, options }) => {
  3660. target.removeEventListener(type, callback, options);
  3661. });
  3662. this.records = [];
  3663. }
  3664. }
  3665. const USER_DIALOG_ABNORMAL_TYPES = ["duplicate"];
  3666. const _hoisted_1$k = ["data-unique"];
  3667. const _hoisted_2$h = {
  3668. key: 0,
  3669. class: "dialog-title"
  3670. };
  3671. const _hoisted_3$e = { class: "dialog-content" };
  3672. const _hoisted_4$9 = {
  3673. key: 1,
  3674. class: "dialog-button-panel"
  3675. };
  3676. const _sfc_main$o = /* @__PURE__ */ vue.defineComponent({
  3677. __name: "user-dialog",
  3678. props: {
  3679. modal: { type: Boolean, default: true },
  3680. force: { type: Boolean, default: false },
  3681. lockScroll: { type: Boolean, default: true },
  3682. animation: { type: Boolean, default: true },
  3683. blurEffect: { type: Boolean },
  3684. title: {},
  3685. dialogButtons: { default: () => [] },
  3686. shadowMode: { type: Boolean },
  3687. modalStyle: { default: () => ({}) },
  3688. zIndex: { default: 2025 },
  3689. contentStyle: { default: () => ({}) },
  3690. clickModalToUnload: { type: Boolean, default: true },
  3691. pressEscapeToUnload: { type: Boolean, default: true },
  3692. defaultPayload: {},
  3693. renderAnimation: { default: "kf-dialog-in var(--default-duration)" },
  3694. unloadAnimation: { default: "kf-dialog-out var(--default-duration)" },
  3695. uniqueName: {}
  3696. },
  3697. emits: ["unload", "abnormalUnload"],
  3698. setup(__props, { expose: __expose, emit: __emit }) {
  3699. vue.useCssVars((_ctx) => ({
  3700. "790b06c2": _ctx.$props.zIndex,
  3701. "416ec384": _ctx.$props.renderAnimation,
  3702. "07d22c3b": _ctx.$props.unloadAnimation
  3703. }));
  3704. const props = __props;
  3705. const emit = __emit;
  3706. const evproxy = new EventProxy();
  3707. const dialogTrigger = vue.ref(false);
  3708. const dialogModal = vue.ref();
  3709. const userDialog2 = vue.ref();
  3710. const currentPayload = vue.ref(props.defaultPayload);
  3711. const abnormal = _2.zipObject(
  3712. USER_DIALOG_ABNORMAL_TYPES,
  3713. _2.fill(Array(USER_DIALOG_ABNORMAL_TYPES.length), false)
  3714. );
  3715. let focusRelatedTarget = undefined;
  3716. let focusRelatedDialog = undefined;
  3717. vue.onBeforeMount(function() {
  3718. if (props.uniqueName) {
  3719. abnormal.duplicate = !!dom(`.user-dialog[data-unique="${props.uniqueName}"]`);
  3720. }
  3721. });
  3722. vue.onMounted(async function() {
  3723. dialogTrigger.value = true;
  3724. await vue.nextTick();
  3725. if (_2.some(abnormal)) {
  3726. abnormalUnload(_2.findKey(abnormal, (val) => val === true));
  3727. return;
  3728. }
  3729. if (!dialogModal.value) return;
  3730. if (!userDialog2.value) return;
  3731. if (props.modal) {
  3732. evproxy.on(userDialog2.value, "focusin", (e) => {
  3733. focusRelatedTarget = e.relatedTarget ?? undefined;
  3734. if (focusRelatedTarget) focusRelatedDialog = findParent(focusRelatedTarget, "user-dialog");
  3735. }, { once: true });
  3736. userDialog2.value.focus();
  3737. evproxy.on(userDialog2.value, "focusout", (e) => {
  3738. var _a, _b;
  3739. const modalDialogs = dom(".user-dialog-modal", []);
  3740. if (!modalDialogs[modalDialogs.length - 1].contains(userDialog2.value)) return;
  3741. if (_2.isNil(e.relatedTarget) || !((_a = userDialog2.value) == null ? undefined : _a.contains(e.relatedTarget))) {
  3742. (_b = userDialog2.value) == null ? undefined : _b.focus();
  3743. evproxy.on(window, "focusin", function() {
  3744. var _a2;
  3745. (_a2 = userDialog2.value) == null ? undefined : _a2.focus();
  3746. }, { once: true });
  3747. }
  3748. });
  3749. }
  3750. if (props.lockScroll) {
  3751. document.body.setAttribute("no-scrollbar", "");
  3752. document.body.style.paddingRight = `${scrollbarWidth()}px`;
  3753. }
  3754. if (props.force) {
  3755. const FORCE_ALERT_CLASS = "force-alert";
  3756. evproxy.on(dialogModal.value, "mousedown", (e) => {
  3757. var _a, _b;
  3758. if (e.target !== dialogModal.value) return;
  3759. if ((_a = userDialog2.value) == null ? undefined : _a.classList.contains(FORCE_ALERT_CLASS)) return;
  3760. (_b = userDialog2.value) == null ? undefined : _b.classList.add(FORCE_ALERT_CLASS);
  3761. if (userDialog2.value) {
  3762. evproxy.on(userDialog2.value, "transitionend", function() {
  3763. var _a2;
  3764. (_a2 = userDialog2.value) == null ? undefined : _a2.classList.remove(FORCE_ALERT_CLASS);
  3765. }, { once: true });
  3766. }
  3767. });
  3768. } else {
  3769. if (props.clickModalToUnload) {
  3770. evproxy.on(dialogModal.value, "mousedown", (e) => {
  3771. if (e.target !== dialogModal.value) return;
  3772. unload(props.defaultPayload);
  3773. });
  3774. }
  3775. if (props.pressEscapeToUnload) {
  3776. evproxy.on(dialogModal.value, "keydown", (e) => {
  3777. if (e.key === "Escape") {
  3778. unload(props.defaultPayload);
  3779. }
  3780. });
  3781. }
  3782. }
  3783. });
  3784. vue.onBeforeUnmount(function() {
  3785. evproxy.release();
  3786. });
  3787. function unload(payload) {
  3788. currentPayload.value = payload;
  3789. dialogTrigger.value = false;
  3790. }
  3791. function unloadDialog() {
  3792. if (props.modal) {
  3793. if (focusRelatedTarget && document.body.contains(focusRelatedTarget)) {
  3794. focusRelatedTarget.focus();
  3795. } else if (focusRelatedDialog && document.body.contains(focusRelatedDialog)) {
  3796. focusRelatedDialog.focus();
  3797. }
  3798. }
  3799. if (currentPayload.value) {
  3800. emit("unload", currentPayload.value);
  3801. return;
  3802. }
  3803. emit("unload");
  3804. }
  3805. function handleButtonEvent(eventfn) {
  3806. if (eventfn == null ? undefined : eventfn()) {
  3807. unload();
  3808. }
  3809. }
  3810. function abnormalUnload(abnormal2) {
  3811. emit("abnormalUnload", abnormal2);
  3812. }
  3813. __expose({
  3814. unload,
  3815. abnormalUnload
  3816. });
  3817. return (_ctx, _cache) => {
  3818. return vue.openBlock(), vue.createBlock(vue.Teleport, { to: "body" }, [
  3819. !vue.unref(_2).some(vue.unref(abnormal)) ? (vue.openBlock(), vue.createElementBlock("div", {
  3820. key: 0,
  3821. ref_key: "dialogModal",
  3822. ref: dialogModal,
  3823. "aria-modal": "",
  3824. class: "user-dialog-modal",
  3825. style: vue.normalizeStyle(vue.unref(parseCSSRule)(_ctx.modalStyle))
  3826. }, [
  3827. vue.createVNode(vue.Transition, {
  3828. name: "dialog",
  3829. type: "animation",
  3830. onAfterLeave: unloadDialog
  3831. }, {
  3832. default: vue.withCtx(() => [
  3833. vue.withDirectives(vue.createElementVNode("div", {
  3834. ref_key: "userDialog",
  3835. ref: userDialog2,
  3836. class: vue.normalizeClass(["user-dialog remove-default", {
  3837. "default": !_ctx.shadowMode,
  3838. "shadow": _ctx.shadowMode
  3839. }]),
  3840. style: vue.normalizeStyle(vue.unref(parseCSSRule)(_ctx.contentStyle)),
  3841. tabindex: "-1",
  3842. "data-unique": _ctx.uniqueName
  3843. }, [
  3844. _ctx.title ? (vue.openBlock(), vue.createElementBlock("header", _hoisted_2$h, vue.toDisplayString(_ctx.title), 1)) : vue.createCommentVNode("", true),
  3845. vue.createElementVNode("div", _hoisted_3$e, [
  3846. vue.renderSlot(_ctx.$slots, "default", {}, undefined, true)
  3847. ]),
  3848. _ctx.dialogButtons.length > 0 ? (vue.openBlock(), vue.createElementBlock("footer", _hoisted_4$9, [
  3849. (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.dialogButtons, (button) => {
  3850. return vue.openBlock(), vue.createBlock(_sfc_main$q, {
  3851. class: vue.normalizeClass(["dialog-button", { "icon": button.icon }]),
  3852. "shadow-border": "",
  3853. "theme-style": button.style === "themed",
  3854. onClick: ($event) => handleButtonEvent(button.event)
  3855. }, {
  3856. default: vue.withCtx(() => [
  3857. vue.createTextVNode(vue.toDisplayString(button.icon ? button.icon : button.text), 1)
  3858. ]),
  3859. _: 2
  3860. }, 1032, ["theme-style", "onClick", "class"]);
  3861. }), 256))
  3862. ])) : vue.createCommentVNode("", true)
  3863. ], 14, _hoisted_1$k), [
  3864. [vue.vShow, dialogTrigger.value]
  3865. ])
  3866. ]),
  3867. _: 3
  3868. })
  3869. ], 4)) : vue.createCommentVNode("", true)
  3870. ]);
  3871. };
  3872. }
  3873. });
  3874. const UserDialog = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["__scopeId", "data-v-cd3f22c1"]]);
  3875. function _isSlot(s) {
  3876. return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !vue.isVNode(s);
  3877. }
  3878. function renderComponent(root, container, rootProps) {
  3879. const app = vue.createApp(root, rootProps);
  3880. return {
  3881. app,
  3882. instance: app.mount(container)
  3883. };
  3884. }
  3885. const scrollbarWidth = _2.once(function() {
  3886. return window.innerWidth - document.documentElement.clientWidth;
  3887. });
  3888. function renderPage(root, rootProps) {
  3889. if (document.getElementsByTagName("body").length === 0) {
  3890. document.documentElement.appendChild(domrd("body"));
  3891. }
  3892. removeDefault();
  3893. const page = domrd("div", {
  3894. id: "remixed-page"
  3895. });
  3896. document.body.insertBefore(page, document.body.firstChild);
  3897. document.body.appendChild(domrd("div", {
  3898. "id": "carousel_wrap"
  3899. }));
  3900. injectCSSRule("#spage-tbshare-container, .tbui_aside_float_bar", {
  3901. display: "none !important"
  3902. });
  3903. return renderComponent(root, page, rootProps);
  3904. }
  3905. function renderDialog(content, opts, events) {
  3906. var _a, _b;
  3907. (_a = events == null ? undefined : events.beforeRender) == null ? undefined : _a.call(events);
  3908. const dialogWrapper = document.body.appendChild(domrd("div", {
  3909. class: "dialog-wrapper"
  3910. }));
  3911. const dialogApp = vue.createApp(content, {
  3912. ...opts,
  3913. onUnload(payload) {
  3914. var _a2, _b2;
  3915. (_a2 = events == null ? undefined : events.beforeUnload) == null ? undefined : _a2.call(events, rendered);
  3916. _unload();
  3917. (_b2 = events == null ? undefined : events.unloaded) == null ? undefined : _b2.call(events, payload);
  3918. },
  3919. onAbnormalUnload(abnormal) {
  3920. var _a2;
  3921. _unload();
  3922. (_a2 = events == null ? undefined : events.abnormalUnload) == null ? undefined : _a2.call(events, abnormal);
  3923. }
  3924. });
  3925. const rendered = {
  3926. app: dialogApp,
  3927. instance: dialogApp.mount(dialogWrapper)
  3928. };
  3929. (_b = events == null ? undefined : events.rendered) == null ? undefined : _b.call(events, rendered);
  3930. return rendered;
  3931. function _unload() {
  3932. dialogApp.unmount();
  3933. if (dom("[aria-modal]", []).length === 0) {
  3934. document.body.removeAttribute("no-scrollbar");
  3935. document.body.style.paddingRight = "";
  3936. }
  3937. dialogWrapper.remove();
  3938. }
  3939. }
  3940. function userDialog(content, dialogOpts, opts) {
  3941. let _slot;
  3942. return renderDialog(vue.createVNode(UserDialog, dialogOpts, _isSlot(_slot = vue.h(content, opts)) ? _slot : {
  3943. default: () => [_slot]
  3944. }));
  3945. }
  3946. function removeDefault() {
  3947. _2.forEach(document.head.children, (el) => {
  3948. if (el && el.tagName.toUpperCase() === "LINK" && _2.includes(el.getAttribute("href"), "static-common/style")) {
  3949. el.remove();
  3950. }
  3951. if (el && el.tagName.toUpperCase() === "SCRIPT" && _2.includes(el.getAttribute("src"), "static-common/lib")) {
  3952. el.remove();
  3953. }
  3954. });
  3955. _2.forEach(document.body.children, (el) => {
  3956. if (el && el.tagName.toUpperCase() === "STYLE") {
  3957. el.remove();
  3958. }
  3959. if (el && el.tagName.toUpperCase() === "SCRIPT") {
  3960. el.remove();
  3961. }
  3962. if (el && el.tagName.toUpperCase() === "IFRAME") {
  3963. el.remove();
  3964. }
  3965. if (el && _2.includes(el.className, "translatorExtension")) {
  3966. el.remove();
  3967. }
  3968. if (el && _2.includes(el.className, "dialogJ")) {
  3969. el.remove();
  3970. }
  3971. });
  3972. }
  3973. const _hoisted_1$j = {
  3974. ref: "messageWrapper",
  3975. class: "message-wrapper"
  3976. };
  3977. const _sfc_main$n = /* @__PURE__ */ vue.defineComponent({
  3978. __name: "message-box",
  3979. props: {
  3980. title: {},
  3981. content: {},
  3982. type: {
  3983. default: "okOnly"
  3984. }
  3985. },
  3986. setup(__props, {
  3987. expose: __expose
  3988. }) {
  3989. const props = __props;
  3990. const positiveButton = {
  3991. response: "positive",
  3992. text: "确定",
  3993. event: () => unloadHandler("positive"),
  3994. style: "themed"
  3995. };
  3996. const negativeButton = {
  3997. response: "cancel",
  3998. text: "取消",
  3999. event: () => unloadHandler("cancel")
  4000. };
  4001. const forceTrueButton = {
  4002. response: "positive",
  4003. text: "接受",
  4004. event: () => unloadHandler("positive"),
  4005. style: "themed"
  4006. };
  4007. const forceFalseButton = {
  4008. response: "negative",
  4009. text: "拒绝",
  4010. event: () => unloadHandler("negative")
  4011. };
  4012. const dialog = vue.ref();
  4013. const response = vue.ref("cancel");
  4014. const dialogOpts = {
  4015. animation: true,
  4016. lockScroll: true,
  4017. modal: true,
  4018. title: props.title,
  4019. force: props.type === "forceTrueFalse",
  4020. dialogButtons: (() => {
  4021. switch (props.type) {
  4022. case "okOnly":
  4023. return [positiveButton];
  4024. case "okCancel":
  4025. return [positiveButton, negativeButton];
  4026. case "forceTrueFalse":
  4027. return [forceTrueButton, forceFalseButton];
  4028. }
  4029. })(),
  4030. defaultPayload: response.value
  4031. };
  4032. function unloadHandler(_response, event) {
  4033. var _a;
  4034. response.value = _response;
  4035. (_a = dialog.value) == null ? undefined : _a.unload(_response);
  4036. }
  4037. __expose({
  4038. response
  4039. });
  4040. return (_ctx, _cache) => {
  4041. return vue.openBlock(), vue.createBlock(vue.unref(UserDialog), vue.mergeProps({
  4042. ref_key: "dialog",
  4043. ref: dialog
  4044. }, dialogOpts, {
  4045. onUnload: _cache[0] || (_cache[0] = ($event) => unloadHandler(response.value))
  4046. }), {
  4047. default: vue.withCtx(() => [vue.createElementVNode("div", _hoisted_1$j, [_ctx.content ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
  4048. key: 0
  4049. }, [typeof _ctx.content === "string" ? (vue.openBlock(), vue.createElementBlock("div", {
  4050. key: 0,
  4051. ref: "messageContent",
  4052. class: "message markdown"
  4053. }, vue.toDisplayString(_ctx.content), 513)) : (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.content), {
  4054. key: 1
  4055. }))], 64)) : vue.createCommentVNode("", true), vue.renderSlot(_ctx.$slots, "default", {}, undefined, true)], 512)]),
  4056. _: 3
  4057. }, 16);
  4058. };
  4059. }
  4060. });
  4061. const MessageBox = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["__scopeId", "data-v-39288ca3"]]);
  4062. async function messageBox(opts) {
  4063. return new Promise((resolve) => {
  4064. renderDialog(MessageBox, opts, {
  4065. beforeUnload(rendered) {
  4066. const response = rendered.instance.response;
  4067. resolve(response);
  4068. }
  4069. });
  4070. });
  4071. }
  4072. const _hoisted_1$i = { class: "about-wrapper" };
  4073. const _hoisted_2$g = { class: "main-title" };
  4074. const _hoisted_3$d = ["src"];
  4075. const _hoisted_4$8 = { class: "title" };
  4076. const _hoisted_5$7 = { class: "script-info" };
  4077. const _hoisted_6$6 = { class: "author-info" };
  4078. const _hoisted_7$5 = { class: "version" };
  4079. const _hoisted_8$4 = { class: "author" };
  4080. const _hoisted_9$4 = { class: "about-desc" };
  4081. const _hoisted_10$4 = { class: "line" };
  4082. const _hoisted_11$4 = { class: "about-controls" };
  4083. const _sfc_main$m = /* @__PURE__ */ vue.defineComponent({
  4084. __name: "about.detail",
  4085. emits: ["changeView"],
  4086. setup(__props, { emit: __emit }) {
  4087. const scriptInfo = _GM_info;
  4088. const emit = __emit;
  4089. return (_ctx, _cache) => {
  4090. return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$i, [
  4091. vue.createElementVNode("div", _hoisted_2$g, [
  4092. vue.createElementVNode("img", {
  4093. src: vue.unref(getResource)("/assets/images/main/icon.png"),
  4094. alt: "icon",
  4095. class: "main-icon"
  4096. }, null, 8, _hoisted_3$d),
  4097. vue.createElementVNode("div", _hoisted_4$8, vue.toDisplayString(vue.unref(MainTitle)), 1)
  4098. ]),
  4099. vue.createElementVNode("div", _hoisted_5$7, [
  4100. vue.createElementVNode("div", _hoisted_6$6, [
  4101. vue.createElementVNode("div", _hoisted_7$5, vue.toDisplayString(vue.unref(scriptInfo).script.version), 1),
  4102. vue.createElementVNode("div", _hoisted_8$4, "@" + vue.toDisplayString(vue.unref(scriptInfo).script.author), 1)
  4103. ]),
  4104. vue.createElementVNode("div", _hoisted_9$4, [
  4105. (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(`本开源项目使用 MIT 协议`.split("\n"), (line) => {
  4106. return vue.openBlock(), vue.createElementBlock("div", _hoisted_10$4, vue.toDisplayString(line), 1);
  4107. }), 256))
  4108. ])
  4109. ]),
  4110. vue.createElementVNode("div", _hoisted_11$4, [
  4111. vue.createVNode(_sfc_main$q, {
  4112. class: "about-button github",
  4113. "is-anchor": true,
  4114. href: vue.unref(GithubRepo),
  4115. "shadow-border": true,
  4116. target: "_balnk"
  4117. }, {
  4118. default: vue.withCtx(() => _cache[1] || (_cache[1] = [
  4119. vue.createTextVNode("开放源代码 ")
  4120. ])),
  4121. _: 1
  4122. }, 8, ["href"]),
  4123. vue.createVNode(_sfc_main$q, {
  4124. class: "about-button update",
  4125. "shadow-border": true,
  4126. onClick: _cache[0] || (_cache[0] = ($event) => emit("changeView", "about", "update"))
  4127. }, {
  4128. default: vue.withCtx(() => _cache[2] || (_cache[2] = [
  4129. vue.createTextVNode(" 检查更新 ")
  4130. ])),
  4131. _: 1
  4132. })
  4133. ]),
  4134. _cache[3] || (_cache[3] = vue.createElementVNode("div", { class: "about-desc" }, null, -1))
  4135. ]);
  4136. };
  4137. }
  4138. });
  4139. const AboutDetail = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__scopeId", "data-v-08c54454"]]);
  4140. const _hoisted_1$h = {
  4141. key: 0,
  4142. class: "update-wrapper"
  4143. };
  4144. const _hoisted_2$f = { class: "icon" };
  4145. const _hoisted_3$c = { class: "content" };
  4146. const _hoisted_4$7 = { class: "title-container" };
  4147. const _hoisted_5$6 = { class: "title" };
  4148. const _hoisted_6$5 = {
  4149. key: 0,
  4150. class: "is-pre-release"
  4151. };
  4152. const _hoisted_7$4 = { class: "main-info" };
  4153. const _hoisted_8$3 = ["src"];
  4154. const _hoisted_9$3 = { class: "owner" };
  4155. const _hoisted_10$3 = ["innerHTML"];
  4156. const _hoisted_11$3 = { class: "update-controls" };
  4157. const _hoisted_12$2 = {
  4158. key: 1,
  4159. class: "forbidden-wrapper"
  4160. };
  4161. const _sfc_main$l = /* @__PURE__ */ vue.defineComponent({
  4162. __name: "about.update",
  4163. setup(__props) {
  4164. const release = vue.ref();
  4165. const forbidden = vue.ref(false);
  4166. const isLatest = vue.ref();
  4167. const scriptInfo = _GM_info;
  4168. vue.onMounted(async () => {
  4169. const latest = await getLatestReleaseFromGitee();
  4170. if (latest) {
  4171. forbidden.value = false;
  4172. release.value = latest;
  4173. isLatest.value = `v${scriptInfo.script.version}` >= release.value.tag_name;
  4174. } else {
  4175. forbidden.value = true;
  4176. }
  4177. });
  4178. return (_ctx, _cache) => {
  4179. var _a, _b, _c, _d, _e, _f, _g, _h;
  4180. return !forbidden.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$h, [
  4181. isLatest.value !== undefined ? (vue.openBlock(), vue.createElementBlock("div", {
  4182. key: 0,
  4183. class: vue.normalizeClass(["latest-info", { "is-latest": isLatest.value }])
  4184. }, [
  4185. vue.createElementVNode("div", _hoisted_2$f, vue.toDisplayString(isLatest.value ? "check" : "warning"), 1),
  4186. vue.createElementVNode("div", _hoisted_3$c, vue.toDisplayString(isLatest.value ? "当前是最新版本" : "检测到新版本"), 1)
  4187. ], 2)) : vue.createCommentVNode("", true),
  4188. vue.createElementVNode("div", _hoisted_4$7, [
  4189. vue.createElementVNode("h2", _hoisted_5$6, vue.toDisplayString((_a = release.value) == null ? undefined : _a.name), 1),
  4190. ((_b = release.value) == null ? undefined : _b.prerelease) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6$5, "预览版")) : vue.createCommentVNode("", true)
  4191. ]),
  4192. vue.createElementVNode("div", _hoisted_7$4, [
  4193. ((_c = release.value) == null ? undefined : _c.author.avatar_url) ? (vue.openBlock(), vue.createElementBlock("img", {
  4194. key: 0,
  4195. src: (_d = release.value) == null ? undefined : _d.author.avatar_url,
  4196. alt: "",
  4197. class: "avatar"
  4198. }, null, 8, _hoisted_8$3)) : vue.createCommentVNode("", true),
  4199. vue.createElementVNode("div", _hoisted_9$3, vue.toDisplayString((_e = release.value) == null ? undefined : _e.author.name), 1)
  4200. ]),
  4201. vue.createElementVNode("div", {
  4202. class: "release-body markdown",
  4203. innerHTML: ((_f = release.value) == null ? undefined : _f.body) ? vue.unref(marked2.marked)((_g = release.value) == null ? undefined : _g.body) : ""
  4204. }, null, 8, _hoisted_10$3),
  4205. vue.createElementVNode("div", _hoisted_11$3, [
  4206. vue.createVNode(_sfc_main$q, {
  4207. class: "up-button download-button",
  4208. "shadow-border": "",
  4209. "theme-style": "",
  4210. "is-anchor": "",
  4211. href: (_h = release.value) == null ? undefined : _h.assets[0].browser_download_url
  4212. }, {
  4213. default: vue.withCtx(() => _cache[0] || (_cache[0] = [
  4214. vue.createTextVNode("安装更新 ")
  4215. ])),
  4216. _: 1
  4217. }, 8, ["href"])
  4218. ])
  4219. ])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_12$2, _cache[1] || (_cache[1] = [
  4220. vue.createElementVNode("div", { class: "icon" }, "warning", -1),
  4221. vue.createElementVNode("div", { class: "forbidden-text" }, "请求过于频繁,请稍后重试", -1)
  4222. ])));
  4223. };
  4224. }
  4225. });
  4226. const AboutUpdate = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__scopeId", "data-v-c359521c"]]);
  4227. const _hoisted_1$g = { class: "layout-custom-back" };
  4228. const _hoisted_2$e = ["src"];
  4229. const _hoisted_3$b = { class: "custom-back-buttons" };
  4230. const _sfc_main$k = /* @__PURE__ */ vue.defineComponent({
  4231. __name: "layout.custom-back",
  4232. setup(__props) {
  4233. const imageData = vue.ref(customBackground.get());
  4234. const alphaValue = vue.ref("100");
  4235. const imageAlphaInput = vue.ref();
  4236. vue.watch(imageData, (newValue) => {
  4237. customBackground.set(newValue);
  4238. });
  4239. vue.watch(alphaValue, (newValue) => {
  4240. var _a;
  4241. const inputElement = (_a = imageAlphaInput.value) == null ? undefined : _a.$el;
  4242. if (newValue === "" || +newValue < 0) alphaValue.value = "0", inputElement.value = "0";
  4243. if (+newValue > 100) alphaValue.value = "100", inputElement.value = "100";
  4244. });
  4245. vue.onMounted(async function() {
  4246. imageData.value = customBackground.get();
  4247. });
  4248. async function clearImage() {
  4249. imageData.value = undefined;
  4250. }
  4251. async function selectImageFile() {
  4252. imageData.value = await selectLocalFile("base64");
  4253. }
  4254. return (_ctx, _cache) => {
  4255. return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$g, [
  4256. vue.withDirectives(vue.createElementVNode("img", {
  4257. class: "custom-image",
  4258. src: imageData.value ?? "",
  4259. title: "自定义背景",
  4260. alt: "自定义背景",
  4261. style: vue.normalizeStyle(`opacity: ${+alphaValue.value / 100}`)
  4262. }, null, 12, _hoisted_2$e), [
  4263. [vue.vShow, imageData.value]
  4264. ]),
  4265. vue.createElementVNode("div", _hoisted_3$b, [
  4266. vue.createVNode(_sfc_main$q, { onClick: clearImage }, {
  4267. default: vue.withCtx(() => _cache[0] || (_cache[0] = [
  4268. vue.createTextVNode("清除")
  4269. ])),
  4270. _: 1
  4271. }),
  4272. vue.createVNode(_sfc_main$q, { onClick: selectImageFile }, {
  4273. default: vue.withCtx(() => _cache[1] || (_cache[1] = [
  4274. vue.createTextVNode("上传图片")
  4275. ])),
  4276. _: 1
  4277. })
  4278. ])
  4279. ]);
  4280. };
  4281. }
  4282. });
  4283. const LayoutCustomBack = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__scopeId", "data-v-fcb5c431"]]);
  4284. const _hoisted_1$f = { class: "color-picker" };
  4285. const _hoisted_2$d = { key: 0 };
  4286. const DEBOUNCE_TIME = 500;
  4287. const _sfc_main$j = /* @__PURE__ */ vue.defineComponent({
  4288. __name: "color-picker",
  4289. props: /* @__PURE__ */ vue.mergeModels({
  4290. text: { default: "" }
  4291. }, {
  4292. "modelValue": { required: true },
  4293. "modelModifiers": {}
  4294. }),
  4295. emits: /* @__PURE__ */ vue.mergeModels(["change"], ["update:modelValue"]),
  4296. setup(__props, { emit: __emit }) {
  4297. const model = vue.useModel(__props, "modelValue");
  4298. const emit = __emit;
  4299. const debouncedUpdate = _2.debounce(() => {
  4300. emit("change", model.value);
  4301. }, DEBOUNCE_TIME);
  4302. vue.onBeforeUnmount(function() {
  4303. debouncedUpdate.cancel();
  4304. });
  4305. vue.watch(model, function() {
  4306. debouncedUpdate();
  4307. });
  4308. return (_ctx, _cache) => {
  4309. return vue.openBlock(), vue.createElementBlock("label", _hoisted_1$f, [
  4310. vue.withDirectives(vue.createElementVNode("input", {
  4311. class: "color-input",
  4312. type: "color",
  4313. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => model.value = $event)
  4314. }, null, 512), [
  4315. [vue.vModelText, model.value]
  4316. ]),
  4317. _ctx.text ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_2$d, vue.toDisplayString(_ctx.text), 1)) : vue.createCommentVNode("", true)
  4318. ]);
  4319. };
  4320. }
  4321. });
  4322. const ColorPicker = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-faec1870"]]);
  4323. const _hoisted_1$e = { class: "theme-color-component" };
  4324. const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
  4325. __name: "theme.color",
  4326. setup(__props) {
  4327. const lightTheme = vue.ref(themeColor.get().light);
  4328. const darkTheme = vue.ref(themeColor.get().dark);
  4329. function changeThemeColor() {
  4330. themeColor.set({
  4331. dark: darkTheme.value,
  4332. light: lightTheme.value
  4333. });
  4334. }
  4335. function resetThemeColor() {
  4336. themeColor.remove();
  4337. lightTheme.value = themeColor.get().light;
  4338. darkTheme.value = themeColor.get().dark;
  4339. }
  4340. return (_ctx, _cache) => {
  4341. return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$e, [
  4342. vue.createVNode(ColorPicker, {
  4343. text: "浅色主题",
  4344. modelValue: lightTheme.value,
  4345. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => lightTheme.value = $event),
  4346. onChange: changeThemeColor
  4347. }, null, 8, ["modelValue"]),
  4348. vue.createVNode(ColorPicker, {
  4349. text: "深色主题",
  4350. modelValue: darkTheme.value,
  4351. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => darkTheme.value = $event),
  4352. onChange: changeThemeColor
  4353. }, null, 8, ["modelValue"]),
  4354. vue.createVNode(_sfc_main$q, {
  4355. class: "reset-button",
  4356. onClick: resetThemeColor
  4357. }, {
  4358. default: vue.withCtx(() => _cache[2] || (_cache[2] = [
  4359. vue.createTextVNode("重置")
  4360. ])),
  4361. _: 1
  4362. })
  4363. ]);
  4364. };
  4365. }
  4366. });
  4367. const ThemeColor = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-17596762"]]);
  4368. const getUserSettings = _2.once(() => ({
  4369. "visibility": {
  4370. name: "显示",
  4371. icon: "visibility",
  4372. description: "主题、显示设置",
  4373. sub: {
  4374. "theme": {
  4375. name: "主题",
  4376. content: {
  4377. "switch-theme": {
  4378. title: "主题偏好设置",
  4379. description: `在自动模式下,将根据当前系统设置自动选择合适的主题。你也可以手动应用某一种主题。`,
  4380. widgets: [{
  4381. type: "select",
  4382. content: [{
  4383. value: "auto",
  4384. text: "自动",
  4385. desc: "根据系统设置自动切换主题。"
  4386. }, {
  4387. value: "dark",
  4388. text: "深色",
  4389. desc: "使用深色主题。"
  4390. }, {
  4391. value: "light",
  4392. text: "浅色",
  4393. desc: "使用浅色主题。"
  4394. }],
  4395. init() {
  4396. return themeType.get();
  4397. },
  4398. event(theme) {
  4399. themeType.set(theme);
  4400. }
  4401. }]
  4402. },
  4403. "color": {
  4404. title: "主题颜色",
  4405. description: `自定义主题色。由于存在深浅两种主题,需要设置两种主题色。`,
  4406. widgets: [{
  4407. type: "component",
  4408. component: vue.markRaw(ThemeColor)
  4409. }]
  4410. }
  4411. }
  4412. },
  4413. "layout": {
  4414. name: "页面布局",
  4415. content: {
  4416. "compact-layout": {
  4417. title: "紧凑布局",
  4418. widgets: [{
  4419. type: "toggle",
  4420. content: `在尽量保证视觉观感的请款下,针对部分页面应用更加紧凑的布局,以提高信息密度。当前会受到影响的页面有:新版看贴页面。`,
  4421. init() {
  4422. return compactLayout.get();
  4423. },
  4424. event() {
  4425. compactLayout.set(!compactLayout.get());
  4426. document.body.toggleAttribute("compact-layout");
  4427. return compactLayout.get();
  4428. }
  4429. }]
  4430. },
  4431. "custom-background": {
  4432. title: "自定义背景图",
  4433. description: `上传图片作为页面背景图`,
  4434. widgets: [{
  4435. type: "component",
  4436. component: vue.markRaw(LayoutCustomBack)
  4437. }]
  4438. },
  4439. "wide-screen-title": {
  4440. title: "宽屏设置",
  4441. description: `针对宽屏设备进行配置`,
  4442. widgets: [{
  4443. type: "subTitle",
  4444. content: "强制拉伸画幅"
  4445. }, {
  4446. type: "toggle",
  4447. content: `对于宽屏设备,不一定需要页面内容宽度始终等于屏幕宽度。如果你想应用强制宽屏,可以开启此项。`,
  4448. init() {
  4449. return wideScreen.get().noLimit;
  4450. },
  4451. event() {
  4452. const value = wideScreen.get().noLimit;
  4453. wideScreen.merge({
  4454. noLimit: !value
  4455. });
  4456. return !value;
  4457. }
  4458. }, {
  4459. type: "subTitle",
  4460. content: "最大宽度"
  4461. }, {
  4462. type: "desc",
  4463. content: `配置页面元素跟随屏幕拉伸的最大宽度,若开启了 “强制拉伸画幅” 则此项失效`
  4464. }, {
  4465. type: "textbox",
  4466. placeHolder: "输入最大宽度像素值",
  4467. init() {
  4468. return String(wideScreen.get().maxWidth);
  4469. },
  4470. event(e) {
  4471. const newValue = e.target.value;
  4472. if (!isNaN(+newValue)) {
  4473. wideScreen.merge({
  4474. maxWidth: +newValue
  4475. });
  4476. }
  4477. }
  4478. }]
  4479. }
  4480. }
  4481. },
  4482. "page-extension": {
  4483. name: "页面扩展",
  4484. content: {
  4485. "index": {
  4486. title: "首页扩展",
  4487. widgets: [{
  4488. type: "toggle",
  4489. content: `首页扩展旨在提供更纯粹的浏览体验,提供管理关注的吧、贴吧热议、瀑布流推送等功能。`,
  4490. init() {
  4491. return pageExtension.get().index;
  4492. },
  4493. event() {
  4494. pageExtension.merge({
  4495. index: !pageExtension.get().index
  4496. });
  4497. return pageExtension.get().index;
  4498. }
  4499. }]
  4500. },
  4501. "thread": {
  4502. title: "帖子浏览页面扩展",
  4503. widgets: [{
  4504. type: "toggle",
  4505. content: `使用全新的 UI 简化帖子浏览,并改进屏幕空间利用率。`,
  4506. init() {
  4507. return pageExtension.get().thread;
  4508. },
  4509. event() {
  4510. pageExtension.merge({
  4511. thread: !pageExtension.get().thread
  4512. });
  4513. return pageExtension.get().thread;
  4514. }
  4515. }]
  4516. }
  4517. }
  4518. },
  4519. "fonts": {
  4520. name: "字体",
  4521. content: {
  4522. "code-zh": {
  4523. title: "主要字体组合",
  4524. description: `应用在贴吧绝大多数场景的字体组合。`,
  4525. widgets: [{
  4526. type: "textarea",
  4527. placeHolder: "写入字体名,以换行分隔。若需要中英文混排,需将英文字体写在中文字体之前。",
  4528. init() {
  4529. return _2.join(userFonts.get(), "\n");
  4530. },
  4531. event(e) {
  4532. userFonts.set(_2.split(e.target.value, "\n"));
  4533. return _2.join(userFonts.get(), "\n");
  4534. }
  4535. }]
  4536. },
  4537. "code-monospace": {
  4538. title: "等宽字体组合",
  4539. description: `应用在数据显示等场景的等宽字体组合。`,
  4540. widgets: [{
  4541. type: "textarea",
  4542. placeHolder: "写入字体名,以换行分隔。建议在此处写入等宽字体。",
  4543. init() {
  4544. return _2.join(monospaceFonts.get(), "\n");
  4545. },
  4546. event(e) {
  4547. monospaceFonts.set(_2.split(e.target.value, "\n"));
  4548. return _2.join(monospaceFonts.get(), "\n");
  4549. }
  4550. }]
  4551. },
  4552. "font-weights": {
  4553. title: "字重调整",
  4554. description: `设置字体的字重。`,
  4555. widgets: [{
  4556. type: "subTitle",
  4557. content: "默认字重"
  4558. }, {
  4559. type: "textbox",
  4560. placeHolder: "默认字重",
  4561. init() {
  4562. return fontWeights.get().normal;
  4563. },
  4564. event(e) {
  4565. const newValue = e.target.value;
  4566. fontWeights.merge({
  4567. normal: +newValue
  4568. });
  4569. }
  4570. }, {
  4571. type: "subTitle",
  4572. content: "粗体字重"
  4573. }, {
  4574. type: "textbox",
  4575. placeHolder: "粗体字重",
  4576. init() {
  4577. return fontWeights.get().bold;
  4578. },
  4579. event(e) {
  4580. const newValue = e.target.value;
  4581. fontWeights.merge({
  4582. bold: +newValue
  4583. });
  4584. }
  4585. }]
  4586. }
  4587. }
  4588. },
  4589. "nav-bar": {
  4590. name: "导航栏",
  4591. content: {
  4592. "nav-bar-mode": {
  4593. title: "导航栏隐藏模式",
  4594. description: `设置导航栏的隐藏模式。`,
  4595. widgets: [{
  4596. type: "select",
  4597. content: [{
  4598. value: "fold",
  4599. text: "滚动折叠",
  4600. desc: "当页面以一定速度向下滚动时,会将导航栏折叠,只会占据很小的屏幕空间,但能更方便地重新访问导航栏。"
  4601. }, {
  4602. value: "alwaysFold",
  4603. text: "始终折叠",
  4604. desc: "导航栏始终保持折叠状态。"
  4605. }, {
  4606. value: "hideWhenScroll",
  4607. text: "滚动隐藏",
  4608. desc: "当页面以一定速度向下滚动时,彻底隐藏导航栏,重新访问导航栏则需要以一定速度向上滚动页面。"
  4609. }, {
  4610. value: "fixedOnTop",
  4611. text: "顶部固定",
  4612. desc: "导航栏不会在视图上跟随移动,仅在页面最顶部固定。"
  4613. }, {
  4614. value: "never",
  4615. text: "始终显示",
  4616. desc: "始终显示完整的导航栏。"
  4617. }],
  4618. init() {
  4619. return navBarHideMode.get();
  4620. },
  4621. event(hideMode) {
  4622. navBarHideMode.set(hideMode);
  4623. }
  4624. }]
  4625. }
  4626. }
  4627. }
  4628. }
  4629. },
  4630. "modules": {
  4631. name: "模块",
  4632. icon: "deployed_code",
  4633. description: "用户模块管理及部署",
  4634. sub: AllModules().reduce((accu, curr, index2) => {
  4635. function toSubSettingKey(module) {
  4636. return {
  4637. name: module.name,
  4638. description: module.brief,
  4639. content: {
  4640. "module-info": {
  4641. title: module.name,
  4642. description: `${module.id} ${module.version}`,
  4643. widgets: [{
  4644. type: "toggle",
  4645. content: module.description,
  4646. init() {
  4647. return _2.includes(disabledModules.get(), module.id) ? false : true;
  4648. },
  4649. event() {
  4650. if (_2.includes(disabledModules.get(), module.id)) {
  4651. const newSet = new Set(disabledModules.get());
  4652. newSet.delete(module.id);
  4653. disabledModules.set([...newSet]);
  4654. return true;
  4655. } else {
  4656. disabledModules.set([module.id, ...disabledModules.get()]);
  4657. return false;
  4658. }
  4659. }
  4660. }]
  4661. },
  4662. ...module.settings
  4663. }
  4664. };
  4665. }
  4666. if (index2 === 1) {
  4667. const accuObject = toSubSettingKey(accu);
  4668. accu = {};
  4669. accu[accuObject.name] = accuObject;
  4670. }
  4671. accu[curr.name] = toSubSettingKey(curr);
  4672. return accu;
  4673. })
  4674. },
  4675. "performance": {
  4676. name: "性能",
  4677. icon: "speed",
  4678. description: "硬件性能与流量相关",
  4679. sub: {
  4680. "perfPresets": {
  4681. name: "性能预设",
  4682. content: {
  4683. "persets": {
  4684. title: "性能预设",
  4685. description: "从以下预设性能等级选择其一,将会自动对相关场景进行行为调整。",
  4686. widgets: [{
  4687. type: "select",
  4688. content: [{
  4689. value: "default",
  4690. text: "默认"
  4691. }, {
  4692. value: "saver",
  4693. text: "节能"
  4694. }, {
  4695. value: "performance",
  4696. text: "高性能"
  4697. }],
  4698. init() {
  4699. return perfProfile.get();
  4700. },
  4701. event(perf) {
  4702. perfProfile.set(perf);
  4703. }
  4704. }]
  4705. }
  4706. }
  4707. }
  4708. }
  4709. },
  4710. "enhanced": {
  4711. name: "高级",
  4712. icon: "labs",
  4713. description: "提前测试一些尚不稳定的新功能",
  4714. sub: {
  4715. "experimental": {
  4716. name: "实验性功能",
  4717. content: {
  4718. "title": {
  4719. title: "实验室",
  4720. description: `本版块列举了一些实验性功能,这些功能正处于开发阶段,它们当中的大部分都是默认关闭的。
  4721. 这些功能可能会产生已知、未知的错误或性能问题,如果这些问题能被更及时全面地反馈,将有助于整个项目的发展。
  4722. 需要注意的是,这些特性并不保证会保留到后续版本中。`,
  4723. widgets: [{
  4724. type: "icon",
  4725. content: "lab_research"
  4726. }]
  4727. },
  4728. "moreBlurEffect": {
  4729. title: "更多模糊效果",
  4730. widgets: [{
  4731. type: "toggle",
  4732. content: `优先考虑提供更多的模糊效果。仅当性能预设为“高性能”时,才会生效。`,
  4733. init() {
  4734. return experimental.get().moreBlurEffect;
  4735. },
  4736. event() {
  4737. experimental.merge({
  4738. moreBlurEffect: !experimental.get().moreBlurEffect
  4739. });
  4740. }
  4741. }]
  4742. },
  4743. "rasterEffect": {
  4744. title: "栅格特效",
  4745. widgets: [{
  4746. type: "toggle",
  4747. content: `将部分场景的模糊效果替换为栅格特效。可能会使文字可见度降低。存在性能问题。`,
  4748. init() {
  4749. return experimental.get().rasterEffect;
  4750. },
  4751. event() {
  4752. experimental.merge({
  4753. rasterEffect: !experimental.get().rasterEffect
  4754. });
  4755. }
  4756. }]
  4757. }
  4758. }
  4759. },
  4760. "backup-recover": {
  4761. name: "备份与恢复",
  4762. content: {
  4763. "data-backup": {
  4764. title: "数据备份",
  4765. description: `备份脚本所有自定义配置`,
  4766. widgets: [{
  4767. type: "button",
  4768. content: "备份",
  4769. event() {
  4770. backupUserConfigs();
  4771. }
  4772. }]
  4773. },
  4774. "recover-backup": {
  4775. title: "数据恢复",
  4776. description: `从备份文件中恢复脚本所有自定义配置`,
  4777. widgets: [{
  4778. type: "button",
  4779. content: "恢复",
  4780. event() {
  4781. restoreUserConfigs();
  4782. }
  4783. }]
  4784. }
  4785. }
  4786. },
  4787. "custom-style": {
  4788. name: "自定义样式",
  4789. content: {
  4790. "content": {
  4791. title: "自定义样式",
  4792. description: `你可以在这里添加一些自定义的CSS代码,用以覆盖脚本内置的一些样式。`,
  4793. widgets: [{
  4794. type: "textarea",
  4795. init() {
  4796. return customStyle.get();
  4797. },
  4798. event(e) {
  4799. customStyle.set(e.target.value);
  4800. }
  4801. }]
  4802. }
  4803. }
  4804. },
  4805. "factory-reset": {
  4806. name: "重置所有配置",
  4807. content: {
  4808. "title": {
  4809. title: "重置所有配置",
  4810. description: `如果你需要将脚本的一切配置恢复默认,请使用此功能。`
  4811. },
  4812. "reset": {
  4813. widgets: [{
  4814. type: "button",
  4815. content: "重置",
  4816. async event() {
  4817. if (await messageBox({
  4818. title: "重置所有配置",
  4819. content: "该操作是不可逆的,请做最后一次确认。",
  4820. type: "forceTrueFalse"
  4821. }) === "positive") {
  4822. _2.forEach(_GM_listValues(), (key) => {
  4823. _GM_deleteValue(key);
  4824. });
  4825. location.reload();
  4826. }
  4827. }
  4828. }]
  4829. }
  4830. }
  4831. }
  4832. }
  4833. },
  4834. "about": {
  4835. name: "关于",
  4836. icon: "person",
  4837. description: "开发信息与检查更新",
  4838. sub: {
  4839. "update": {
  4840. name: "检查更新",
  4841. content: {
  4842. "update-time": {
  4843. title: "检查更新设置",
  4844. description: `发行信息追踪频率`,
  4845. widgets: [{
  4846. type: "select",
  4847. content: [{
  4848. value: "1h",
  4849. text: "1 小时"
  4850. }, {
  4851. value: "3h",
  4852. text: "3 小时"
  4853. }, {
  4854. value: "6h",
  4855. text: "6 小时"
  4856. }, {
  4857. value: "never",
  4858. text: "从不"
  4859. }],
  4860. init() {
  4861. return updateConfig.get().time;
  4862. },
  4863. event(updateTime) {
  4864. updateConfig.merge({
  4865. time: updateTime
  4866. });
  4867. }
  4868. }]
  4869. },
  4870. "update-notify": {
  4871. widgets: [{
  4872. type: "toggle",
  4873. content: `启用一个对话框提示用户更新。该对话框可以立即安装更新,也可以推迟更新操作。`,
  4874. init() {
  4875. return updateConfig.get().notify;
  4876. },
  4877. event() {
  4878. updateConfig.merge({
  4879. notify: !updateConfig.get().notify
  4880. });
  4881. }
  4882. }]
  4883. },
  4884. "update-component": {
  4885. widgets: [{
  4886. type: "component",
  4887. component: vue.markRaw(AboutUpdate)
  4888. }]
  4889. }
  4890. }
  4891. },
  4892. "about": {
  4893. name: "关于项目",
  4894. content: {
  4895. "about-component": {
  4896. widgets: [{
  4897. type: "component",
  4898. component: vue.markRaw(AboutDetail)
  4899. }]
  4900. }
  4901. }
  4902. }
  4903. }
  4904. }
  4905. }));
  4906. const TOGGLE_ON_CLASS = "toggle-on";
  4907. const TOGGLE_OFF_CLASS = "toggle-off";
  4908. const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
  4909. __name: "toggle-button",
  4910. props: {
  4911. "modelValue": { type: Boolean, ...{
  4912. required: true,
  4913. default: false
  4914. } },
  4915. "modelModifiers": {}
  4916. },
  4917. emits: ["update:modelValue"],
  4918. setup(__props) {
  4919. const model = vue.useModel(__props, "modelValue");
  4920. const toggleClass = vue.computed(() => {
  4921. return model.value ? TOGGLE_ON_CLASS : TOGGLE_OFF_CLASS;
  4922. });
  4923. function toggle() {
  4924. model.value = !model.value;
  4925. }
  4926. return (_ctx, _cache) => {
  4927. return vue.openBlock(), vue.createBlock(_sfc_main$q, {
  4928. class: vue.normalizeClass(["toggle-button", toggleClass.value]),
  4929. onClick: toggle
  4930. }, {
  4931. default: vue.withCtx(() => [
  4932. vue.renderSlot(_ctx.$slots, "default", {}, undefined, true)
  4933. ]),
  4934. _: 3
  4935. }, 8, ["class"]);
  4936. };
  4937. }
  4938. });
  4939. const ToggleButton = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-6728dba5"]]);
  4940. const _hoisted_1$d = {
  4941. class: "user-check"
  4942. };
  4943. const _hoisted_2$c = ["for"];
  4944. const _hoisted_3$a = {
  4945. class: "label-text"
  4946. };
  4947. const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
  4948. __name: "user-check",
  4949. props: /* @__PURE__ */ vue.mergeModels({
  4950. id: {},
  4951. text: {
  4952. default: ""
  4953. }
  4954. }, {
  4955. "modelValue": {
  4956. type: Boolean,
  4957. ...{
  4958. required: true,
  4959. default: false
  4960. }
  4961. },
  4962. "modelModifiers": {}
  4963. }),
  4964. emits: /* @__PURE__ */ vue.mergeModels(["change"], ["update:modelValue"]),
  4965. setup(__props, {
  4966. emit: __emit
  4967. }) {
  4968. const model = vue.useModel(__props, "modelValue");
  4969. const emit = __emit;
  4970. return (_ctx, _cache) => {
  4971. return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$d, [vue.createElementVNode("label", {
  4972. for: _ctx.id,
  4973. class: "check-label"
  4974. }, [vue.createVNode(ToggleButton, {
  4975. modelValue: model.value,
  4976. "onUpdate:modelValue": [_cache[0] || (_cache[0] = ($event) => model.value = $event), _cache[1] || (_cache[1] = ($event) => emit("change", model.value))],
  4977. id: _ctx.id,
  4978. class: "check-button icon",
  4979. "theme-style": model.value
  4980. }, {
  4981. default: vue.withCtx(() => [vue.createTextVNode(vue.toDisplayString(model.value ? "check" : ""), 1)]),
  4982. _: 1
  4983. }, 8, ["modelValue", "id", "theme-style"]), vue.createElementVNode("p", _hoisted_3$a, vue.toDisplayString(_ctx.text), 1)], 8, _hoisted_2$c)]);
  4984. };
  4985. }
  4986. });
  4987. const UserCheck = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-48d9506d"]]);
  4988. const _hoisted_1$c = {
  4989. class: "user-select"
  4990. };
  4991. const _hoisted_2$b = {
  4992. class: "current-text"
  4993. };
  4994. const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
  4995. __name: "user-select",
  4996. props: /* @__PURE__ */ vue.mergeModels({
  4997. data: {},
  4998. defaultValue: {}
  4999. }, {
  5000. "value": {},
  5001. "valueModifiers": {}
  5002. }),
  5003. emits: /* @__PURE__ */ vue.mergeModels(["change"], ["update:value"]),
  5004. setup(__props, {
  5005. emit: __emit
  5006. }) {
  5007. const props = __props;
  5008. vue.useModel(__props, "value");
  5009. const emit = __emit;
  5010. const selectToggle = vue.ref();
  5011. const selectContainer = vue.ref();
  5012. const useSelect = vue.ref(false);
  5013. const currentIndex = vue.ref(function() {
  5014. if (!props.defaultValue) return 0;
  5015. const index2 = _2.findIndex(props.data, (d) => d.value === props.defaultValue);
  5016. return index2 === -1 ? 0 : index2;
  5017. }());
  5018. const hoverIndex = vue.ref(currentIndex.value);
  5019. vue.watch(useSelect, function() {
  5020. hoverIndex.value = currentIndex.value;
  5021. });
  5022. vue.watch(currentIndex, (index2) => {
  5023. emit("change", props.data[index2].value);
  5024. });
  5025. function selectFocusout(e) {
  5026. var _a;
  5027. ((_a = selectContainer.value) == null ? undefined : _a.contains(e.relatedTarget)) ? useSelect.value = true : useSelect.value = false;
  5028. }
  5029. return (_ctx, _cache) => {
  5030. return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$c, [vue.createVNode(ToggleButton, {
  5031. ref_key: "selectToggle",
  5032. ref: selectToggle,
  5033. modelValue: useSelect.value,
  5034. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => useSelect.value = $event),
  5035. class: "select-toggle",
  5036. onFocusout: selectFocusout
  5037. }, {
  5038. default: vue.withCtx(() => [vue.createElementVNode("p", _hoisted_2$b, vue.toDisplayString(_ctx.data[currentIndex.value].text), 1), _cache[1] || (_cache[1] = vue.createElementVNode("div", {
  5039. class: "icon"
  5040. }, "keyboard_arrow_down", -1))]),
  5041. _: 1
  5042. }, 8, ["modelValue"]), vue.createVNode(vue.Transition, {
  5043. name: "select"
  5044. }, {
  5045. default: vue.withCtx(() => [vue.withDirectives(vue.createElementVNode("div", {
  5046. ref_key: "selectContainer",
  5047. ref: selectContainer,
  5048. class: "select-container"
  5049. }, [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.data, (value, i) => {
  5050. return vue.openBlock(), vue.createBlock(_sfc_main$q, {
  5051. "theme-style": currentIndex.value === i,
  5052. class: "select-transition select-button",
  5053. onClick: ($event) => (currentIndex.value = i, useSelect.value = false),
  5054. onMouseenter: ($event) => hoverIndex.value = i,
  5055. onFocusout: selectFocusout
  5056. }, {
  5057. default: vue.withCtx(() => [vue.createTextVNode(vue.toDisplayString(value.text), 1)]),
  5058. _: 2
  5059. }, 1032, ["theme-style", "onClick", "onMouseenter"]);
  5060. }), 256)), vue.withDirectives(vue.createElementVNode("div", {
  5061. class: "select-transition select-desc",
  5062. tabindex: "-1",
  5063. onFocusout: selectFocusout
  5064. }, vue.toDisplayString(useSelect.value ? _ctx.data[hoverIndex.value].desc : ""), 545), [[vue.vShow, _ctx.data[hoverIndex.value].desc]])], 512), [[vue.vShow, useSelect.value]])]),
  5065. _: 1
  5066. })]);
  5067. };
  5068. }
  5069. });
  5070. const UserSelect = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-7da72ee3"]]);
  5071. const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
  5072. __name: "user-textbox",
  5073. props: {
  5074. modelValue: { default: "" },
  5075. mutiLines: { type: Boolean },
  5076. lodashStyle: { type: Boolean, default: false }
  5077. },
  5078. emits: ["update:modelValue"],
  5079. setup(__props) {
  5080. const props = __props;
  5081. return (_ctx, _cache) => {
  5082. return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(props.mutiLines ? "textarea" : "input"), {
  5083. class: vue.normalizeClass(["user-textbox", { "lodash-style": props.lodashStyle }]),
  5084. type: "text",
  5085. value: _ctx.modelValue,
  5086. onInput: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:modelValue", $event.target.value)),
  5087. autocomplete: "off"
  5088. }, null, 40, ["class", "value"]);
  5089. };
  5090. }
  5091. });
  5092. const UserTextbox = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-a690d550"]]);
  5093. const _hoisted_1$b = {
  5094. class: "settings-wrapper remove-default"
  5095. };
  5096. const _hoisted_2$a = {
  5097. class: "left-container"
  5098. };
  5099. const _hoisted_3$9 = {
  5100. class: "search-controls"
  5101. };
  5102. const _hoisted_4$6 = {
  5103. class: "left-panel"
  5104. };
  5105. const _hoisted_5$5 = {
  5106. class: "icon"
  5107. };
  5108. const _hoisted_6$4 = {
  5109. class: "key-info"
  5110. };
  5111. const _hoisted_7$3 = {
  5112. class: "key-title"
  5113. };
  5114. const _hoisted_8$2 = {
  5115. class: "key-desc"
  5116. };
  5117. const _hoisted_9$2 = {
  5118. class: "middle-container"
  5119. };
  5120. const _hoisted_10$2 = {
  5121. class: "key-title"
  5122. };
  5123. const _hoisted_11$2 = {
  5124. class: "right-container"
  5125. };
  5126. const _hoisted_12$1 = {
  5127. key: 0,
  5128. class: "content-title"
  5129. };
  5130. const _hoisted_13$1 = {
  5131. key: 1,
  5132. class: "content-desc"
  5133. };
  5134. const _hoisted_14$1 = {
  5135. class: "line"
  5136. };
  5137. const _hoisted_15$1 = {
  5138. class: "setting-control"
  5139. };
  5140. const _hoisted_16$1 = {
  5141. key: 1,
  5142. class: "icon-component icon"
  5143. };
  5144. const _hoisted_17$1 = {
  5145. key: 4,
  5146. class: "content-sub-title"
  5147. };
  5148. const _hoisted_18$1 = {
  5149. key: 5,
  5150. class: "content-desc"
  5151. };
  5152. const _hoisted_19$1 = {
  5153. class: "line"
  5154. };
  5155. const _hoisted_20$1 = ["src", "alt", "title", "onLoad"];
  5156. const _hoisted_21$1 = {
  5157. key: 1,
  5158. class: "empty-container filled-icon"
  5159. };
  5160. const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
  5161. __name: "settings",
  5162. setup(__props, {
  5163. expose: __expose
  5164. }) {
  5165. const userSettings = getUserSettings();
  5166. const dialogOpts = {
  5167. uniqueName: "settings",
  5168. animation: true,
  5169. modal: true,
  5170. lockScroll: true,
  5171. modalStyle: {
  5172. justifyContent: "flex-start"
  5173. },
  5174. contentStyle: {
  5175. display: "flex",
  5176. flexDirection: "column",
  5177. width: "100%",
  5178. height: "max-content",
  5179. maxWidth: "var(--content-max)",
  5180. overflow: "hidden"
  5181. }
  5182. };
  5183. const searchText = vue.ref("");
  5184. const selectedKey = vue.ref();
  5185. const selectedSubKey = vue.ref();
  5186. function selectMainKey(key) {
  5187. selectedKey.value = key;
  5188. selectedSubKey.value = undefined;
  5189. }
  5190. function selectSubKey(key) {
  5191. selectedSubKey.value = key;
  5192. }
  5193. function changeView(key, sub) {
  5194. selectedKey.value = userSettings[key];
  5195. selectedSubKey.value = userSettings[key].sub[sub];
  5196. }
  5197. function clearSelections() {
  5198. selectedKey.value = undefined;
  5199. selectedSubKey.value = undefined;
  5200. }
  5201. function searchKey() {
  5202. if (searchText.value.length <= 0) {
  5203. clearSelections();
  5204. return;
  5205. }
  5206. if (!_2.find(userSettings, (mainKey) => {
  5207. if (_2.find(mainKey.sub, (subKey) => {
  5208. if (subKey.name.toLowerCase().includes(searchText.value.toLowerCase())) {
  5209. selectedKey.value = mainKey;
  5210. selectedSubKey.value = subKey;
  5211. return true;
  5212. } else {
  5213. return false;
  5214. }
  5215. })) return true;
  5216. else return false;
  5217. })) clearSelections();
  5218. }
  5219. const debSearchKey = _2.debounce(searchKey, 500);
  5220. __expose({
  5221. dialogOpts
  5222. });
  5223. return (_ctx, _cache) => {
  5224. return vue.openBlock(), vue.createBlock(vue.unref(UserDialog), vue.normalizeProps(vue.guardReactiveProps(dialogOpts)), {
  5225. default: vue.withCtx(() => {
  5226. var _a, _b;
  5227. return [vue.createElementVNode("div", _hoisted_1$b, [vue.createElementVNode("div", _hoisted_2$a, [vue.createElementVNode("div", _hoisted_3$9, [_cache[1] || (_cache[1] = vue.createElementVNode("div", {
  5228. class: "title"
  5229. }, "设置", -1)), vue.createVNode(UserTextbox, {
  5230. modelValue: searchText.value,
  5231. "onUpdate:modelValue": [_cache[0] || (_cache[0] = ($event) => searchText.value = $event), vue.unref(debSearchKey)],
  5232. class: "search-box",
  5233. placeholder: "输入需要搜索的设置"
  5234. }, null, 8, ["modelValue", "onUpdate:modelValue"])]), vue.createElementVNode("div", _hoisted_4$6, [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(userSettings), (setting) => {
  5235. var _a2;
  5236. return vue.openBlock(), vue.createBlock(_sfc_main$q, {
  5237. class: vue.normalizeClass(["key-button main-key", {
  5238. "selected": ((_a2 = selectedKey.value) == null ? undefined : _a2.name) === setting.name
  5239. }]),
  5240. onClick: ($event) => selectMainKey(setting),
  5241. "no-border": "all"
  5242. }, {
  5243. default: vue.withCtx(() => [_cache[2] || (_cache[2] = vue.createElementVNode("div", {
  5244. class: "main-key-selected"
  5245. }, null, -1)), vue.createElementVNode("div", _hoisted_5$5, vue.toDisplayString(setting.icon), 1), vue.createElementVNode("div", _hoisted_6$4, [vue.createElementVNode("div", _hoisted_7$3, vue.toDisplayString(setting.name), 1), vue.createElementVNode("div", _hoisted_8$2, vue.toDisplayString(setting.description), 1)])]),
  5246. _: 2
  5247. }, 1032, ["class", "onClick"]);
  5248. }), 256))])]), vue.withDirectives(vue.createElementVNode("div", _hoisted_9$2, [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList((_a = selectedKey.value) == null ? undefined : _a.sub, (setting) => {
  5249. var _a2;
  5250. return vue.openBlock(), vue.createBlock(_sfc_main$q, {
  5251. class: vue.normalizeClass(["key-button sub-key", {
  5252. "selected": ((_a2 = selectedSubKey.value) == null ? undefined : _a2.name) === setting.name
  5253. }]),
  5254. onClick: ($event) => selectSubKey(setting),
  5255. "no-border": "all"
  5256. }, {
  5257. default: vue.withCtx(() => [vue.createElementVNode("div", _hoisted_10$2, vue.toDisplayString(setting.name), 1)]),
  5258. _: 2
  5259. }, 1032, ["class", "onClick"]);
  5260. }), 256))], 512), [[vue.vShow, selectedKey.value]]), vue.createElementVNode("div", _hoisted_11$2, [((_b = selectedSubKey.value) == null ? undefined : _b.name) ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, {
  5261. key: 0
  5262. }, vue.renderList(selectedSubKey.value.content, (content) => {
  5263. return vue.openBlock(), vue.createElementBlock("div", {
  5264. key: Math.random(),
  5265. class: "setting-content"
  5266. }, [(content == null ? undefined : content.title) ? (vue.openBlock(), vue.createElementBlock("h3", _hoisted_12$1, vue.toDisplayString(content == null ? undefined : content.title), 1)) : vue.createCommentVNode("", true), (content == null ? undefined : content.description) ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_13$1, [(content == null ? undefined : content.description) ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, {
  5267. key: 0
  5268. }, vue.renderList(content.description.split("\n"), (line) => {
  5269. return vue.openBlock(), vue.createElementBlock("p", _hoisted_14$1, vue.toDisplayString(line), 1);
  5270. }), 256)) : vue.createCommentVNode("", true)])) : vue.createCommentVNode("", true), (content == null ? undefined : content.widgets) ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, {
  5271. key: 2
  5272. }, vue.renderList(content.widgets, (widget) => {
  5273. var _a2, _b2;
  5274. return vue.openBlock(), vue.createElementBlock("div", _hoisted_15$1, [widget.type === "toggle" ? (vue.openBlock(), vue.createBlock(UserCheck, {
  5275. key: 0,
  5276. class: "settings-toggle",
  5277. "model-value": widget.init ? widget.init() : undefined,
  5278. text: typeof widget.content === "string" ? widget.content : undefined,
  5279. onChange: widget.event
  5280. }, null, 8, ["model-value", "text", "onChange"])) : vue.createCommentVNode("", true), widget.type === "icon" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_16$1, vue.toDisplayString(widget.content), 1)) : vue.createCommentVNode("", true), widget.type === "button" ? (vue.openBlock(), vue.createBlock(_sfc_main$q, {
  5281. key: 2,
  5282. onClick: widget.event,
  5283. "shadow-border": ""
  5284. }, {
  5285. default: vue.withCtx(() => [vue.createTextVNode(vue.toDisplayString(widget.content), 1)]),
  5286. _: 2
  5287. }, 1032, ["onClick"])) : vue.createCommentVNode("", true), widget.type === "select" && Array.isArray(widget.content) ? (vue.openBlock(), vue.createBlock(UserSelect, {
  5288. key: 3,
  5289. class: "settings-select",
  5290. data: widget.content,
  5291. "default-value": (_a2 = widget.init) == null ? undefined : _a2.call(widget),
  5292. onChange: widget.event
  5293. }, null, 8, ["data", "default-value", "onChange"])) : vue.createCommentVNode("", true), widget.type === "subTitle" ? (vue.openBlock(), vue.createElementBlock("h4", _hoisted_17$1, vue.toDisplayString(widget.content), 1)) : vue.createCommentVNode("", true), widget.type === "desc" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_18$1, [widget.content && typeof widget.content === "string" ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, {
  5294. key: 0
  5295. }, vue.renderList(widget.content.split("\n"), (line) => {
  5296. return vue.openBlock(), vue.createElementBlock("div", _hoisted_19$1, vue.toDisplayString(line), 1);
  5297. }), 256)) : vue.createCommentVNode("", true)])) : vue.createCommentVNode("", true), vue.unref(_2).includes(["textbox", "textarea"], widget.type) ? (vue.openBlock(), vue.createBlock(UserTextbox, {
  5298. key: 6,
  5299. class: vue.normalizeClass(["content-textbox", {
  5300. "textarea": widget.type === "textarea"
  5301. }]),
  5302. value: widget.init ? widget.init() : "",
  5303. "muti-lines": widget.type === "textarea",
  5304. placeholder: widget.placeHolder,
  5305. onChange: widget.event
  5306. }, null, 8, ["class", "value", "muti-lines", "placeholder", "onChange"])) : vue.createCommentVNode("", true), widget.type === "image" ? (vue.openBlock(), vue.createElementBlock("img", {
  5307. key: 7,
  5308. class: "content-image",
  5309. src: (_b2 = widget.content) == null ? undefined : _b2.toString(),
  5310. alt: widget.altContent,
  5311. title: widget.altContent,
  5312. onLoad: widget.init
  5313. }, null, 40, _hoisted_20$1)) : vue.createCommentVNode("", true), widget.component ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(widget == null ? undefined : widget.component), {
  5314. key: 8,
  5315. onChangeView: changeView
  5316. }, null, 32)) : vue.createCommentVNode("", true)]);
  5317. }), 256)) : vue.createCommentVNode("", true)]);
  5318. }), 128)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_21$1, "settings"))])])];
  5319. }),
  5320. _: 1
  5321. }, 16);
  5322. };
  5323. }
  5324. });
  5325. const Settings = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-ae6e43ab"]]);
  5326. function parseUserModules(glob, callbackfn) {
  5327. const modules2 = [];
  5328. _2.forEach(glob, async (moduleExport) => {
  5329. const currentModule = (await moduleExport()).default;
  5330. const disabledSet = new Set(disabledModules.get());
  5331. const runnable = (() => {
  5332. if (currentModule.switch || currentModule.switch === undefined) {
  5333. if (disabledSet.has(currentModule.id)) {
  5334. return false;
  5335. }
  5336. if (currentModule.scope === true) {
  5337. return true;
  5338. }
  5339. if (Array.isArray(currentModule.scope)) {
  5340. for (let i = 0; i < currentModule.scope.length; i++) {
  5341. const scope = currentModule.scope[i];
  5342. if (currentPageType() === scope) {
  5343. return true;
  5344. }
  5345. }
  5346. }
  5347. if (currentModule.scope instanceof RegExp) {
  5348. if (currentModule.scope.test(location.href)) {
  5349. return true;
  5350. }
  5351. }
  5352. }
  5353. return false;
  5354. })();
  5355. const runModule = {
  5356. "immediately": () => {
  5357. currentModule.entry();
  5358. },
  5359. "afterHead": () => {
  5360. afterHead(() => {
  5361. currentModule.entry();
  5362. });
  5363. },
  5364. "DOMLoaded": () => {
  5365. document.addEventListener("DOMContentLoaded", () => {
  5366. currentModule.entry();
  5367. });
  5368. },
  5369. "loaded": () => {
  5370. window.addEventListener("load", () => {
  5371. currentModule.entry();
  5372. });
  5373. }
  5374. };
  5375. currentModule.runnable = runnable;
  5376. if (runnable) {
  5377. runModule[currentModule.runAt]();
  5378. }
  5379. modules2.push(currentModule);
  5380. callbackfn(currentModule);
  5381. });
  5382. return modules2;
  5383. }
  5384. const tiebaAPI = {
  5385. /** 首页推荐 */
  5386. feedlist: () => fetch(`/f/index/feedlist?${requestBody({
  5387. "is_new": 1,
  5388. "tag_id": "like"
  5389. })}`),
  5390. /** 用户头像 */
  5391. URL_profile: (portrait) => `https://gss0.baidu.com/7Ls0a8Sm2Q5IlBGlnYG/sys/portrait/item/${portrait}`,
  5392. /** 当前登录(不可用)用户信息 */
  5393. userInfo: (serverTime) => fetch(`/f/user/json_userinfo?${requestBody({
  5394. "_": serverTime
  5395. })}`),
  5396. /** 用户主页 */
  5397. URL_userHome: (portrait) => `/home/main?id=${portrait}&fr=index`,
  5398. /** 搜索建议 */
  5399. suggestions: (query, encoding = "UTF-8", serverTime) => fetch(`/suggestion?${requestBody({
  5400. "query": query,
  5401. "ie": encoding,
  5402. "_": serverTime
  5403. })}`),
  5404. /** 贴吧热议 */
  5405. topicList: () => fetch("/hottopic/browse/topicList"),
  5406. /** 吧跳转 */
  5407. URL_forum: (keywords, encoding = "utf-8") => `/f?ie=${encoding}&kw=${keywords}`,
  5408. /** 未读消息 */
  5409. unreadMessages: (serverTime) => fetch(`/im/pcmsg/query/getAllUnread?${requestBody({
  5410. "_": serverTime
  5411. })}`),
  5412. /** 收藏更新 */
  5413. favUpdateNum: () => fetch("/sysmsg/userpost/queryStoreUpdateNum"),
  5414. /** 获取 tbs */
  5415. tbs: () => fetch("/dc/common/tbs"),
  5416. /** imgtbs */
  5417. imgtbs: () => fetch("/dc/common/imgtbs"),
  5418. /** 获取已关注的吧 */
  5419. followedForums: () => fetch("/mo/q/newmoindex"),
  5420. /** 更详细的用户信息 */
  5421. userInfoAll: (un, encoding = "UTF-8") => fetch(`/home/get/panel?${requestBody({
  5422. "ie": encoding,
  5423. "un": un
  5424. })}`),
  5425. /** 关注吧 */
  5426. followForum: (tbs, forumId, forumName) => fetch(`/mo/q/favolike?${requestBody({
  5427. "itb_tbs": tbs,
  5428. "fid": forumId,
  5429. "kw": forumName
  5430. })}`),
  5431. /** 取消关注吧 */
  5432. unfollowForum: (tbs, forumName) => fetch(`/mo/q/delmylike?${requestBody({
  5433. "itb_tbs": tbs,
  5434. "forum_name": forumName
  5435. })}`),
  5436. /** 通过 `uid` 查找用户 */
  5437. getUserFromUID: (uid) => fetch(`/im/pcmsg/query/getUserInfo?${requestBody({
  5438. "chatUid": uid
  5439. })}`),
  5440. /** 一键签到(Web 端) */
  5441. oneKeySign: () => fetch("/tbmall/onekeySignin1"),
  5442. /** 热门动态 */
  5443. hotFeeds: (un, pn, encoding = "utf-8", serverTime) => fetch(`/mo/q/newmoindex?${requestBody({
  5444. "un": un,
  5445. "pn": pn,
  5446. "ie": encoding,
  5447. "_": serverTime
  5448. })}`),
  5449. /** 获取当前页所有楼中楼数据 */
  5450. totalComments: (timeStamp, tid, fid, pn, lzOnly = false) => fetch(`/p/totalComment?${requestBody({
  5451. "t": timeStamp,
  5452. "tid": tid,
  5453. "fid": fid,
  5454. "pn": pn,
  5455. "see_lz": Number(lzOnly)
  5456. })}`),
  5457. /** 获取热门话题相关贴 */
  5458. topicRelatedThreads: (topicName, page, lastId, topicId, sortType = 1) => fetch(`/hottopic/browse/getTopicRelateThread?${requestBody({
  5459. "topic_name": topicName,
  5460. "page_no": page,
  5461. "last_id": lastId,
  5462. "topic_id": topicId,
  5463. "sort_type": sortType
  5464. })}`),
  5465. /** 将贴子添加到收藏 */
  5466. addFavoritePost: (tbs, tid, fid, encoding = "utf-8") => fetch("/i/submit/open_storethread", {
  5467. method: "POST",
  5468. body: JSON.stringify({ tbs, tid, fid, encoding })
  5469. }),
  5470. forumSignInfo: (forumName, encoding = "utf-8") => fetch(`/sign/info?${requestBody({
  5471. "kw": forumName,
  5472. "ie": encoding
  5473. })}`),
  5474. forumLoadMonth: (forumName, encoding = "utf-8") => fetch(`/sign/loadmonth?${requestBody({
  5475. "kw": forumName,
  5476. "ie": encoding
  5477. })}`),
  5478. addFloor: (tbs, forum, forumId, threadId, content, floorNum, richText, ev = "comment", __type__ = "reply") => fetch("/f/commit/post/add", {
  5479. method: "POST",
  5480. body: JSON.stringify({
  5481. "ie": "utf-8",
  5482. "kw": forum,
  5483. "fid": forumId,
  5484. "tid": threadId,
  5485. "floor_num": floorNum,
  5486. "rich_text": Number(richText),
  5487. "tbs": tbs,
  5488. "content": content,
  5489. "basilisk": 1,
  5490. "nick_name": PageData.user.user_nickname,
  5491. "ev": ev,
  5492. "biz[po]": PageData.user.portrait.split("?")[0],
  5493. "__type__": __type__,
  5494. "geetest_success": 0
  5495. })
  5496. })
  5497. };
  5498. function parsePostFromElement(elem) {
  5499. const titleTagWrapperAnch = dom(".title-tag-wraper a", elem);
  5500. const threadNameWrapper = elem.getElementsByClassName("thread-name-wraper")[0];
  5501. const threadNameWrapperAnch = threadNameWrapper.getElementsByTagName("a")[0];
  5502. const listPostNum = dom(".list-post-num em", threadNameWrapper);
  5503. const imgs = dom("img:not(.nicknameEmoji)", elem, []);
  5504. const nReply = elem.getElementsByClassName("n_reply")[0];
  5505. const nReplyAnch = nReply.getElementsByTagName("a")[0];
  5506. const imgArray = [];
  5507. if (imgs.length > 0) {
  5508. _2.forEach(imgs, (img) => {
  5509. imgArray.push({
  5510. thumb: img.src,
  5511. original: _2.defaultTo(img.getAttribute("original"), "")
  5512. });
  5513. });
  5514. }
  5515. return {
  5516. id: _2.defaultTo(elem.getAttribute("data-thread-id"), ""),
  5517. forum: {
  5518. id: _2.defaultTo(elem.getAttribute("data-forum-id"), ""),
  5519. name: (titleTagWrapperAnch == null ? undefined : titleTagWrapperAnch.title) ?? "",
  5520. href: (titleTagWrapperAnch == null ? undefined : titleTagWrapperAnch.href) ?? ""
  5521. },
  5522. author: {
  5523. portrait: _2.split(nReplyAnch.href, /(\?id=)|&/)[2],
  5524. name: transEmojiFromDOMString(nReplyAnch.innerHTML),
  5525. href: nReplyAnch.href
  5526. },
  5527. time: _2.defaultTo(elem.getElementsByClassName("time")[0].textContent, ""),
  5528. title: threadNameWrapperAnch.title,
  5529. content: _2.defaultTo(elem.getElementsByClassName("n_txt")[0].textContent, ""),
  5530. replies: _2.defaultTo(listPostNum == null ? undefined : listPostNum.getAttribute("data-num"), 0),
  5531. images: imgArray
  5532. };
  5533. }
  5534. function parsePostsFromString(responseString, callbackfn) {
  5535. const feedList = [];
  5536. const dom2 = new DOMParser().parseFromString(responseString, "text/html");
  5537. const threads = dom2.getElementsByClassName("j_feed_li");
  5538. const undesired = "home-place-item";
  5539. _2.forEach(threads, (thread2) => {
  5540. if (thread2.classList.contains(undesired)) return;
  5541. const post = parsePostFromElement(thread2);
  5542. feedList.push(post);
  5543. });
  5544. return feedList;
  5545. }
  5546. function transEmojiFromDOMString(str) {
  5547. const indexRegex = new RegExp("(?<=nickemoji\\/).*?(?=.png)", "gi");
  5548. if (!str.match(indexRegex)) return str;
  5549. const emojis = [
  5550. "º",
  5551. "◎",
  5552. "▫",
  5553. "◆",
  5554. "♤",
  5555. "♀",
  5556. "♂",
  5557. "ლ",
  5558. "♬",
  5559. "☞",
  5560. "☜",
  5561. "✆",
  5562. "☎",
  5563. "♋",
  5564. "Ω",
  5565. "℃",
  5566. "℉",
  5567. "😄",
  5568. "😍",
  5569. "😘",
  5570. "😚",
  5571. "😜",
  5572. "😳",
  5573. "😁",
  5574. "😞",
  5575. "😢",
  5576. "😂",
  5577. "😫",
  5578. "😨",
  5579. "😱",
  5580. "😡",
  5581. "😷",
  5582. "😲",
  5583. "😈",
  5584. "🐷",
  5585. "🐶",
  5586. "🐑",
  5587. "🐵",
  5588. "🐨",
  5589. "🐴",
  5590. "🐼",
  5591. "🐯",
  5592. "🍪",
  5593. "🍺",
  5594. "🍦",
  5595. "🍭",
  5596. "🍗",
  5597. "🍼",
  5598. "🔯",
  5599. "🍒",
  5600. "👀",
  5601. "🐭",
  5602. "😇",
  5603. "😺",
  5604. "😻",
  5605. "🙀",
  5606. "😿",
  5607. "😹",
  5608. "😾",
  5609. "👹",
  5610. "👺",
  5611. "🌞",
  5612. "🌝",
  5613. "🌚",
  5614. "🌜",
  5615. "🌛",
  5616. "👦",
  5617. "👧",
  5618. "🎎",
  5619. "🌸",
  5620. "🍀",
  5621. "🌹",
  5622. "🌻",
  5623. "🌺",
  5624. "🍁",
  5625. "🌿",
  5626. "🍄",
  5627. "🌵",
  5628. "🌴",
  5629. "🌳",
  5630. "🌰",
  5631. "🌱",
  5632. "🌼",
  5633. "🌐",
  5634. "🌙",
  5635. "🌋",
  5636. "🌌",
  5637. "⛅",
  5638. "⚡",
  5639. "☔",
  5640. "⛄",
  5641. "🌀",
  5642. "🌈",
  5643. "🌊",
  5644. "🔥",
  5645. "✨",
  5646. "🌟",
  5647. "💥",
  5648. "💫",
  5649. "💢",
  5650. "💦",
  5651. "💧",
  5652. "💤",
  5653. "💨",
  5654. "🎀",
  5655. "🌂",
  5656. "💄",
  5657. "💕",
  5658. "💖",
  5659. "💞",
  5660. "💘",
  5661. "💌",
  5662. "💋",
  5663. "💝",
  5664. "🎒",
  5665. "🎓",
  5666. "🎏",
  5667. "🎃",
  5668. "👻",
  5669. "🎅",
  5670. "🎄",
  5671. "🎁",
  5672. "🙈",
  5673. "🐒",
  5674. "💯",
  5675. "👯",
  5676. "💍"
  5677. ];
  5678. const transformed = [
  5679. "1-1.png",
  5680. "1-2.png",
  5681. "1-4.png",
  5682. "1-5.png",
  5683. "1-6.png",
  5684. "1-7.png",
  5685. "1-8.png",
  5686. "1-9.png",
  5687. "1-10.png",
  5688. "1-11.png",
  5689. "1-12.png",
  5690. "1-13.png",
  5691. "1-14.png",
  5692. "1-15.png",
  5693. "1-16.png",
  5694. "1-17.png",
  5695. "1-18.png",
  5696. "1-19.png",
  5697. "1-20.png",
  5698. "1-21.png",
  5699. "1-22.png",
  5700. "1-23.png",
  5701. "1-24.png",
  5702. "1-25.png",
  5703. "1-26.png",
  5704. "1-27.png",
  5705. "1-28.png",
  5706. "1-29.png",
  5707. "1-30.png",
  5708. "1-31.png",
  5709. "1-32.png",
  5710. "1-33.png",
  5711. "1-34.png",
  5712. "1-35.png",
  5713. "2-1.png",
  5714. "2-2.png",
  5715. "2-3.png",
  5716. "2-4.png",
  5717. "2-5.png",
  5718. "2-6.png",
  5719. "2-7.png",
  5720. "2-8.png",
  5721. "2-9.png",
  5722. "2-10.png",
  5723. "2-11.png",
  5724. "2-12.png",
  5725. "2-13.png",
  5726. "2-14.png",
  5727. "2-15.png",
  5728. "2-16.png",
  5729. "2-17.png",
  5730. "2-18.png",
  5731. "2-19.png",
  5732. "2-20.png",
  5733. "2-21.png",
  5734. "2-22.png",
  5735. "2-23.png",
  5736. "2-24.png",
  5737. "2-25.png",
  5738. "2-26.png",
  5739. "2-27.png",
  5740. "2-28.png",
  5741. "2-29.png",
  5742. "2-30.png",
  5743. "2-31.png",
  5744. "2-32.png",
  5745. "2-33.png",
  5746. "2-34.png",
  5747. "2-35.png",
  5748. "3-1.png",
  5749. "3-2.png",
  5750. "3-3.png",
  5751. "3-4.png",
  5752. "3-5.png",
  5753. "3-6.png",
  5754. "3-7.png",
  5755. "3-8.png",
  5756. "3-9.png",
  5757. "3-10.png",
  5758. "3-11.png",
  5759. "3-12.png",
  5760. "3-13.png",
  5761. "3-14.png",
  5762. "3-15.png",
  5763. "3-16.png",
  5764. "3-17.png",
  5765. "3-18.png",
  5766. "3-19.png",
  5767. "3-20.png",
  5768. "3-21.png",
  5769. "3-22.png",
  5770. "3-23.png",
  5771. "3-24.png",
  5772. "3-25.png",
  5773. "3-26.png",
  5774. "3-27.png",
  5775. "3-28.png",
  5776. "3-29.png",
  5777. "3-30.png",
  5778. "3-31.png",
  5779. "3-32.png",
  5780. "3-33.png",
  5781. "3-34.png",
  5782. "3-35.png",
  5783. "4-1.png",
  5784. "4-2.png",
  5785. "4-3.png",
  5786. "4-4.png",
  5787. "4-5.png",
  5788. "4-6.png",
  5789. "4-7.png",
  5790. "4-8.png",
  5791. "4-9.png",
  5792. "4-10.png",
  5793. "4-11.png",
  5794. "4-12.png",
  5795. "4-13.png",
  5796. "4-14.png",
  5797. "4-15.png",
  5798. "4-16.png",
  5799. "4-17.png",
  5800. "4-18.png",
  5801. "4-19.png",
  5802. "4-20.png",
  5803. "4-21.png",
  5804. "4-22.png",
  5805. "4-23.png"
  5806. ];
  5807. const arrIndex = str.match(indexRegex);
  5808. arrIndex == null ? undefined : arrIndex.forEach((index2) => {
  5809. const emoji = emojis[transformed.indexOf(`${index2}.png`)];
  5810. const arrInner = _2.split(str, RegExp(
  5811. `<img[^>]*?${index2}.png(?:[^>]*?)*>`,
  5812. "g"
  5813. ));
  5814. str = _2.join(arrInner, decodeURIComponent(emoji));
  5815. });
  5816. return str;
  5817. }
  5818. function levelToClass(level) {
  5819. if (level < 0) return;
  5820. if (level >= 1 && level <= 3) return "green";
  5821. if (level >= 4 && level <= 9) return "blue";
  5822. if (level >= 9 && level <= 15) return "yellow";
  5823. if (level >= 16) return "orange";
  5824. }
  5825. const _sfc_main$c = {};
  5826. const _hoisted_1$a = { class: "block-panel blur-if-custom-background" };
  5827. function _sfc_render(_ctx, _cache) {
  5828. return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$a, [
  5829. vue.renderSlot(_ctx.$slots, "default")
  5830. ]);
  5831. }
  5832. const BlockPanel = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render]]);
  5833. /**
  5834. * Flex Masonry
  5835. * @author @HacksawBlade
  5836. * @version 1.1
  5837. * @license MIT
  5838. */
  5839. class FlexMasonry {
  5840. constructor(options) {
  5841. __publicField(this, "container");
  5842. __publicField(this, "items");
  5843. __publicField(this, "columnContainers", []);
  5844. __publicField(this, "columnWidth");
  5845. __publicField(this, "gap");
  5846. __publicField(this, "options");
  5847. __publicField(this, "containerSelector");
  5848. __publicField(this, "itemsSelector");
  5849. __publicField(this, "columnSelector", ".masonry-column");
  5850. __publicField(this, "columnsHeight", []);
  5851. __publicField(this, "fragment");
  5852. /** 当前布局的列数 */
  5853. __publicField(this, "_columns");
  5854. options = parseOptions(options);
  5855. this.container = (() => {
  5856. if (typeof options.container === "string") {
  5857. this.containerSelector = options.container;
  5858. const _container = document.querySelector(options.container);
  5859. if (_container) {
  5860. return _container;
  5861. } else {
  5862. throw new Error("Can't find container element.");
  5863. }
  5864. } else {
  5865. return options.container;
  5866. }
  5867. })();
  5868. if (options.items) {
  5869. this.items = (() => {
  5870. if (typeof options.items === "string") {
  5871. this.itemsSelector = options.items;
  5872. const _items = document.querySelectorAll(options.items);
  5873. if (_items) {
  5874. return Array.from(_items);
  5875. } else {
  5876. return [];
  5877. }
  5878. } else {
  5879. return options.items;
  5880. }
  5881. })().map((el) => {
  5882. el.style.visibility = "hidden";
  5883. return { element: el, cachedHeight: el.clientHeight };
  5884. });
  5885. } else {
  5886. this.items = [];
  5887. }
  5888. this.columnWidth = options.columnWidth;
  5889. if (options.gap) {
  5890. if (Array.isArray(options.gap)) {
  5891. this.gap = options.gap;
  5892. } else {
  5893. this.gap = [options.gap, options.gap];
  5894. }
  5895. } else {
  5896. this.gap = [0, 0];
  5897. }
  5898. this._columns = 0;
  5899. this.options = options;
  5900. this.initStyle();
  5901. if (options.autoExec) this.exec();
  5902. }
  5903. initStyle() {
  5904. this.container.style.display = "flex";
  5905. this.container.style.alignItems = "flex-start";
  5906. this.container.style.justifyContent = "center";
  5907. this.container.style.gap = `${this.gap[0]}px`;
  5908. }
  5909. get columns() {
  5910. return this._columns;
  5911. }
  5912. /** 执行布局 */
  5913. exec() {
  5914. this.calcColumns();
  5915. const originalPosition = window.scrollY;
  5916. this.calc();
  5917. this.layout();
  5918. if (this.options.fixScrollOffset) window.scrollTo(0, originalPosition);
  5919. }
  5920. adjustWidth() {
  5921. const elColumns = this.container.querySelectorAll(this.columnSelector);
  5922. const width = (this.container.clientWidth - this.gap[0] * (this._columns - 1)) / this._columns;
  5923. elColumns.forEach((el) => {
  5924. el.style.width = `${width}px`;
  5925. });
  5926. }
  5927. /** 仅计算布局 */
  5928. calc() {
  5929. this.columnsHeight = Array(this.calcColumns()).fill(0);
  5930. const fragment = document.createDocumentFragment();
  5931. const _col = this.container.querySelectorAll(this.columnSelector);
  5932. _col.forEach((col) => {
  5933. col.remove();
  5934. });
  5935. this.columnContainers.length = 0;
  5936. for (let i = 0; i < this._columns; i++) {
  5937. this.columnContainers.push(
  5938. fragment.appendChild(createNewElement("div", {
  5939. class: this.columnSelector.substring(1),
  5940. style: `width: ${(this.container.clientWidth - this.gap[0] * (this._columns - 1)) / this._columns}px;`
  5941. }))
  5942. );
  5943. }
  5944. this.columnContainers.forEach((ccontainer) => {
  5945. ccontainer.style.display = "flex";
  5946. ccontainer.style.flexDirection = "column";
  5947. ccontainer.style.gap = `${this.gap[1]}px`;
  5948. });
  5949. this.items.forEach((el) => {
  5950. this._appendElement(el);
  5951. });
  5952. this.fragment = fragment;
  5953. }
  5954. /**
  5955. * 仅应用布局
  5956. *
  5957. * 调用该函数前需要已经至少计算过一次布局
  5958. */
  5959. layout() {
  5960. if (this.fragment) {
  5961. this.container.appendChild(this.fragment);
  5962. } else {
  5963. throw Error("Never conducted layout calculations before. You should use exec() or calc() first.");
  5964. }
  5965. }
  5966. removeUnusedColumns() {
  5967. const _col = this.container.querySelectorAll(this.columnSelector);
  5968. _col.forEach((col) => {
  5969. if (col.children.length === 0) col.remove();
  5970. });
  5971. }
  5972. /**
  5973. * 清空布局中的所有 `items`
  5974. *
  5975. * 该操作并不会将元素从文档中移除
  5976. */
  5977. clear() {
  5978. this.items.length = 0;
  5979. this.columnsHeight = Array(this.calcColumns()).fill(0);
  5980. }
  5981. /** 仅计算当前需要的列数 */
  5982. calcColumns() {
  5983. this._columns = Math.ceil((this.container.clientWidth - this.columnWidth) / (this.columnWidth + this.gap[0]));
  5984. return this._columns;
  5985. }
  5986. /**
  5987. * 向布局中加入元素
  5988. * @param el 要添加的元素
  5989. */
  5990. appendElement(...elems) {
  5991. const masonryElements = elems.map((el) => {
  5992. return {
  5993. element: el,
  5994. cachedHeight: el.clientHeight
  5995. };
  5996. });
  5997. this._appendElement(...masonryElements);
  5998. this.items.push(...masonryElements);
  5999. }
  6000. _appendElement(...elems) {
  6001. elems.forEach((el) => {
  6002. const minIndex = this.columnsHeight.indexOf(Math.min(...this.columnsHeight));
  6003. this.columnsHeight[minIndex] += el.cachedHeight;
  6004. this.columnContainers[minIndex].appendChild(el.element);
  6005. el.element.style.visibility = "visible";
  6006. const clientHeight = this.columnContainers[minIndex].clientHeight;
  6007. if (clientHeight !== 0) {
  6008. this.columnsHeight[minIndex] = this.columnContainers[minIndex].clientHeight;
  6009. }
  6010. });
  6011. }
  6012. /**
  6013. * 在原有子项的基础上追加子项
  6014. * @param newItems 要添加的新元素,接受 CSS选择器
  6015. * @param interval 插入每个元素间的时间间隔
  6016. */
  6017. append(newItems, interval) {
  6018. const appended = (() => {
  6019. if (newItems) {
  6020. if (typeof newItems === "string") {
  6021. const _items = document.querySelectorAll(newItems);
  6022. return Array.from(_items);
  6023. } else {
  6024. return newItems;
  6025. }
  6026. } else {
  6027. if (this.itemsSelector) {
  6028. const _items = Array.from(document.querySelectorAll(this.itemsSelector));
  6029. const appendCount = _items.length - this.items.length;
  6030. if (appendCount > 0) {
  6031. const _appended = _items.slice(-appendCount);
  6032. return _appended;
  6033. }
  6034. }
  6035. }
  6036. })();
  6037. if (appended) {
  6038. if (!interval || interval <= 0) {
  6039. appended.forEach((el) => {
  6040. this.appendElement(el);
  6041. });
  6042. } else {
  6043. appended.forEach((el, index2) => {
  6044. setTimeout(() => {
  6045. this.appendElement(el);
  6046. }, interval * index2);
  6047. });
  6048. }
  6049. }
  6050. }
  6051. refreshContainer() {
  6052. if (this.containerSelector) {
  6053. const newContainer = document.querySelector(this.containerSelector);
  6054. if (newContainer) {
  6055. this.container = newContainer;
  6056. }
  6057. }
  6058. }
  6059. }
  6060. function parseOptions(options) {
  6061. options.gap = options.gap || 0;
  6062. options.autoExec = options.autoExec === undefined ? true : options.autoExec;
  6063. options.fixScrollOffset = options.fixScrollOffset === undefined ? false : options.fixScrollOffset;
  6064. return options;
  6065. }
  6066. function createNewElement(tag, attrs) {
  6067. const el = document.createElement(tag);
  6068. for (const key in attrs) {
  6069. el.setAttribute(key, attrs[key]);
  6070. }
  6071. return el;
  6072. }
  6073. class FrameInterval {
  6074. constructor(callback) {
  6075. __publicField(this, "id");
  6076. __publicField(this, "callback");
  6077. __publicField(this, "thenfn", () => undefined);
  6078. __publicField(this, "stopCondition");
  6079. this.callback = callback ?? (() => undefined);
  6080. this.stopCondition = () => false;
  6081. this.id = requestAnimationFrame(this.tick.bind(this));
  6082. }
  6083. tick() {
  6084. if (this.stopCondition()) {
  6085. this.cancel();
  6086. return;
  6087. }
  6088. this.callback();
  6089. this.id = requestAnimationFrame(this.tick.bind(this));
  6090. }
  6091. cancel() {
  6092. if (this.id) {
  6093. cancelAnimationFrame(this.id);
  6094. this.id = undefined;
  6095. }
  6096. this.thenfn();
  6097. }
  6098. until(stopCondition) {
  6099. this.stopCondition = stopCondition;
  6100. return this;
  6101. }
  6102. then(thenfn) {
  6103. this.thenfn = thenfn;
  6104. }
  6105. }
  6106. const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
  6107. __name: "header-progress",
  6108. props: {
  6109. calc: { type: Function }
  6110. },
  6111. setup(__props) {
  6112. const props = __props;
  6113. const headerProgress2 = vue.ref();
  6114. const valueRef = vue.ref(0);
  6115. vue.onMounted(function() {
  6116. if (headerProgress2.value) {
  6117. new FrameInterval(calcValue).until(() => valueRef.value >= 100);
  6118. }
  6119. });
  6120. function calcValue() {
  6121. valueRef.value = props.calc();
  6122. }
  6123. return (_ctx, _cache) => {
  6124. return vue.openBlock(), vue.createElementBlock("div", {
  6125. ref_key: "headerProgress",
  6126. ref: headerProgress2,
  6127. id: "header-progress",
  6128. class: vue.normalizeClass({ "complete": valueRef.value >= 100 }),
  6129. style: vue.normalizeStyle(`width: ${valueRef.value}vw;`)
  6130. }, null, 6);
  6131. };
  6132. }
  6133. });
  6134. const HeaderProgress = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-782eb887"]]);
  6135. function renderJSX(jsxel, parent) {
  6136. vue.render(jsxel, parent);
  6137. const root = parent.firstChild;
  6138. return {
  6139. root,
  6140. vnode: jsxel,
  6141. remove() {
  6142. vue.render(null, parent);
  6143. if (root.parentNode) root.remove();
  6144. }
  6145. };
  6146. }
  6147. function createJSXWrapper() {
  6148. return domrd("div", {
  6149. class: "jsx-wrapper"
  6150. });
  6151. }
  6152. function insertJSX(jsxel, parent, position) {
  6153. const jsxWrapper = createJSXWrapper();
  6154. return renderJSX(jsxel, parent.insertBefore(jsxWrapper, position ?? null));
  6155. }
  6156. function appendJSX(jsxel, parent) {
  6157. const jsxWrapper = createJSXWrapper();
  6158. return renderJSX(jsxel, parent.appendChild(jsxWrapper));
  6159. }
  6160. function headerProgress(props, delay = 2e3, timeout2 = 1e4) {
  6161. const progressBar = vue.createVNode(HeaderProgress, {
  6162. "calc": props.calc
  6163. }, null);
  6164. const rendered = insertJSX(progressBar, document.body, document.body.firstChild ?? undefined);
  6165. const timeoutTimer = setTimeout(() => {
  6166. rendered.root.remove();
  6167. }, timeout2);
  6168. waitUntil(() => rendered.root.style.width === "100vw", timeout2).then(function() {
  6169. setTimeout(() => {
  6170. rendered.root.remove();
  6171. clearTimeout(timeoutTimer);
  6172. }, delay);
  6173. });
  6174. return rendered;
  6175. }
  6176. const shieldList = new UserKey(
  6177. "shieldList",
  6178. [],
  6179. undefined,
  6180. (maybeLegacy) => _2.map(maybeLegacy, shieldRuleMigration)
  6181. );
  6182. function matchShield(rule, str, scope) {
  6183. if (!rule.toggle) return false;
  6184. if (rule.scope !== scope) return false;
  6185. if (rule.ignoreCase === undefined) rule.ignoreCase = true;
  6186. if (rule.type === "text") {
  6187. if (rule.ignoreCase) {
  6188. rule.content = rule.content.toLowerCase();
  6189. str = str.toLowerCase();
  6190. }
  6191. if (str.indexOf(rule.content) !== -1) {
  6192. return true;
  6193. }
  6194. }
  6195. if (rule.type === "regex") {
  6196. let regex;
  6197. if (rule.ignoreCase) {
  6198. regex = new RegExp(rule.content, "i");
  6199. } else {
  6200. regex = new RegExp(rule.content);
  6201. }
  6202. if (regex.test(str)) {
  6203. return true;
  6204. }
  6205. }
  6206. return false;
  6207. }
  6208. function shieldRuleMigration(rule) {
  6209. if (!_2.has(rule, "rule")) return rule;
  6210. rule = rule;
  6211. const newRule = {
  6212. content: rule.rule,
  6213. type: "text",
  6214. scope: "content",
  6215. toggle: rule.switch,
  6216. ignoreCase: rule.ignoreCase,
  6217. matchHTML: rule.matchHTML
  6218. };
  6219. if (rule.type === "string") newRule.type = "text";
  6220. if (rule.scope === "posts") newRule.scope = "content";
  6221. if (rule.scope === "users") newRule.scope = "username";
  6222. return newRule;
  6223. }
  6224. const _hoisted_1$9 = {
  6225. id: "shield-editor"
  6226. };
  6227. const _hoisted_2$9 = {
  6228. id: "shield-editor-rule-control"
  6229. };
  6230. const _hoisted_3$8 = {
  6231. id: "shield-editor-toggle-control"
  6232. };
  6233. const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
  6234. __name: "shield-editor",
  6235. props: {
  6236. rule: {}
  6237. },
  6238. setup(__props) {
  6239. const props = __props;
  6240. const dialog = vue.ref();
  6241. const useRegex = vue.ref(props.rule.type === "regex");
  6242. const userScope = vue.ref(props.rule.scope === "username");
  6243. const ruleRef = vue.ref({
  6244. ...props.rule
  6245. });
  6246. function keyPressHandler(e) {
  6247. if (e.key === "Enter") {
  6248. e.preventDefault();
  6249. submit();
  6250. }
  6251. }
  6252. function submit() {
  6253. var _a;
  6254. const newRule = {
  6255. ...ruleRef.value,
  6256. type: useRegex.value ? "regex" : "text",
  6257. scope: userScope.value ? "username" : "content"
  6258. };
  6259. (_a = dialog.value) == null ? undefined : _a.unload(newRule);
  6260. }
  6261. function unload() {
  6262. var _a;
  6263. (_a = dialog.value) == null ? undefined : _a.unload({
  6264. ...props.rule
  6265. });
  6266. }
  6267. function deleteRule() {
  6268. var _a;
  6269. (_a = dialog.value) == null ? undefined : _a.unload();
  6270. }
  6271. return (_ctx, _cache) => {
  6272. return vue.openBlock(), vue.createBlock(vue.unref(UserDialog), {
  6273. ref_key: "dialog",
  6274. ref: dialog,
  6275. title: "编辑",
  6276. "dialog-buttons": [{
  6277. text: "确定",
  6278. event: submit,
  6279. style: "themed"
  6280. }, {
  6281. text: "取消",
  6282. event: unload
  6283. }],
  6284. "default-payload": {
  6285. ...props.rule
  6286. }
  6287. }, {
  6288. default: vue.withCtx(() => [vue.createElementVNode("div", _hoisted_1$9, [vue.createElementVNode("div", _hoisted_2$9, [_cache[4] || (_cache[4] = vue.createElementVNode("label", {
  6289. for: "shield-editor-rule"
  6290. }, "规则", -1)), vue.createVNode(UserTextbox, {
  6291. modelValue: ruleRef.value.content,
  6292. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => ruleRef.value.content = $event),
  6293. id: "shield-editor-rule",
  6294. "muti-lines": "",
  6295. onKeypress: keyPressHandler
  6296. }, null, 8, ["modelValue"])]), vue.createElementVNode("div", _hoisted_3$8, [vue.createVNode(UserCheck, {
  6297. modelValue: ruleRef.value.toggle,
  6298. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => ruleRef.value.toggle = $event),
  6299. id: "shield-editor-toggle",
  6300. text: "启用"
  6301. }, null, 8, ["modelValue"]), vue.createVNode(UserCheck, {
  6302. modelValue: useRegex.value,
  6303. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => useRegex.value = $event),
  6304. id: "shield-editor-regex",
  6305. text: "正则表达式"
  6306. }, null, 8, ["modelValue"]), vue.createVNode(UserCheck, {
  6307. modelValue: userScope.value,
  6308. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => userScope.value = $event),
  6309. id: "shield-editor-user",
  6310. text: "屏蔽用户名"
  6311. }, null, 8, ["modelValue"])]), vue.createVNode(_sfc_main$q, {
  6312. id: "shield-editor-delete",
  6313. onClick: deleteRule
  6314. }, {
  6315. default: vue.withCtx(() => _cache[5] || (_cache[5] = [vue.createTextVNode("删除规则")])),
  6316. _: 1
  6317. })])]),
  6318. _: 1
  6319. }, 8, ["dialog-buttons", "default-payload"]);
  6320. };
  6321. }
  6322. });
  6323. const ShieldEditor = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-8cfcb5eb"]]);
  6324. const _hoisted_1$8 = {
  6325. class: "shield-container"
  6326. };
  6327. const _hoisted_2$8 = {
  6328. key: 0,
  6329. class: "words-container"
  6330. };
  6331. const _hoisted_3$7 = {
  6332. class: "icon"
  6333. };
  6334. const _hoisted_4$5 = {
  6335. class: "content"
  6336. };
  6337. const _hoisted_5$4 = {
  6338. key: 1,
  6339. class: "empty-list-container"
  6340. };
  6341. const _hoisted_6$3 = {
  6342. class: "shield-controls"
  6343. };
  6344. const _hoisted_7$2 = {
  6345. class: "submit-controls"
  6346. };
  6347. const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
  6348. __name: "module.shield",
  6349. setup(__props) {
  6350. const shieldListRef = vue.ref(shieldList.get());
  6351. const inputRule = vue.ref("");
  6352. const useRegex = vue.ref(false);
  6353. const userScope = vue.ref(false);
  6354. function inputKeyPress(e) {
  6355. if (e.key === "Enter") {
  6356. e.preventDefault();
  6357. updateShieldList();
  6358. }
  6359. }
  6360. function editRule(rule, index2) {
  6361. renderDialog(ShieldEditor, {
  6362. rule
  6363. }, {
  6364. unloaded(rule2) {
  6365. if (!rule2) {
  6366. shieldListRef.value.splice(index2, 1);
  6367. shieldList.set(shieldListRef.value);
  6368. return;
  6369. }
  6370. shieldListRef.value[index2] = rule2;
  6371. shieldList.set(shieldListRef.value);
  6372. }
  6373. });
  6374. }
  6375. function removeAll() {
  6376. shieldListRef.value.length = 0;
  6377. shieldList.remove();
  6378. }
  6379. async function removeAllWithConfirm() {
  6380. if (await messageBox({
  6381. content: "该操作将无法恢复,确定要删除所有屏蔽规则吗?",
  6382. type: "forceTrueFalse"
  6383. }) === "positive") {
  6384. removeAll();
  6385. }
  6386. }
  6387. function updateShieldList() {
  6388. if (inputRule.value.length <= 0) return;
  6389. const rule = {
  6390. content: inputRule.value,
  6391. type: useRegex.value ? "regex" : "text",
  6392. scope: userScope.value ? "username" : "content",
  6393. toggle: true
  6394. };
  6395. shieldListRef.value.push(rule);
  6396. inputRule.value = "";
  6397. shieldList.set(shieldListRef.value);
  6398. }
  6399. return (_ctx, _cache) => {
  6400. return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$8, [shieldListRef.value.length > 0 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$8, [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(shieldListRef.value, (sh, index2) => {
  6401. return vue.openBlock(), vue.createBlock(_sfc_main$q, {
  6402. class: vue.normalizeClass(["shield-elem", {
  6403. "content-scope": sh.scope === "content",
  6404. "user-scope": sh.scope === "username",
  6405. "disabled": !sh.toggle
  6406. }]),
  6407. onClick: ($event) => editRule(sh, index2)
  6408. }, {
  6409. default: vue.withCtx(() => [vue.createElementVNode("div", _hoisted_3$7, vue.toDisplayString(sh.scope === "content" ? "chat" : "account_circle"), 1), vue.createElementVNode("p", _hoisted_4$5, vue.toDisplayString(sh.content), 1)]),
  6410. _: 2
  6411. }, 1032, ["class", "onClick"]);
  6412. }), 256)), vue.createVNode(_sfc_main$q, {
  6413. class: "remove-all shield-elem icon",
  6414. onClick: removeAllWithConfirm
  6415. }, {
  6416. default: vue.withCtx(() => _cache[3] || (_cache[3] = [vue.createTextVNode("delete")])),
  6417. _: 1
  6418. })])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_5$4, "当前没有记录屏蔽规则")), vue.createElementVNode("div", _hoisted_6$3, [vue.createVNode(UserTextbox, {
  6419. modelValue: inputRule.value,
  6420. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputRule.value = $event),
  6421. "muti-lines": "",
  6422. class: "shield-input",
  6423. placeholder: "输入屏蔽规则,按下 [ENTER] 提交。",
  6424. onKeypress: inputKeyPress
  6425. }, null, 8, ["modelValue"]), vue.createElementVNode("div", _hoisted_7$2, [vue.createVNode(UserCheck, {
  6426. modelValue: useRegex.value,
  6427. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => useRegex.value = $event),
  6428. id: "use-regex",
  6429. text: "正则表达式"
  6430. }, null, 8, ["modelValue"]), vue.createVNode(UserCheck, {
  6431. modelValue: userScope.value,
  6432. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => userScope.value = $event),
  6433. id: "user-scope",
  6434. text: "屏蔽用户名"
  6435. }, null, 8, ["modelValue"]), vue.createVNode(_sfc_main$q, {
  6436. class: "submit-button",
  6437. "shadow-border": true,
  6438. "theme-style": true,
  6439. onClick: updateShieldList
  6440. }, {
  6441. default: vue.withCtx(() => _cache[4] || (_cache[4] = [vue.createTextVNode("确定 ")])),
  6442. _: 1
  6443. })])])]);
  6444. };
  6445. }
  6446. });
  6447. const moduleShieldVue = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-1dec7a04"]]);
  6448. const index$f = {
  6449. id: "shield",
  6450. name: "贴吧屏蔽",
  6451. author: "锯条",
  6452. version: "1.2",
  6453. brief: "眼不见为净",
  6454. description: `用户自定义屏蔽规则,符合规则的贴子和楼层将不会显示在首页、看贴页面和进吧页面。支持正则匹配`,
  6455. scope: true,
  6456. runAt: "immediately",
  6457. settings: {
  6458. "shield-controls": {
  6459. title: "管理屏蔽规则",
  6460. description: `这些屏蔽规则将会在首页、看贴页面生效,会自动隐藏所有符合匹配规则的贴子和楼层。`,
  6461. widgets: [{
  6462. type: "component",
  6463. component: vue.markRaw(moduleShieldVue)
  6464. }]
  6465. }
  6466. },
  6467. entry: main$6
  6468. };
  6469. function shieldBySelector(observer, scope, parentSelector, subSelector) {
  6470. observer.addEvent(() => {
  6471. dom(parentSelector, []).forEach((elem) => {
  6472. let isMatch = false;
  6473. const content = _2.join(_2.map(dom(subSelector, elem, []), (el) => el.textContent ?? ""), "\n");
  6474. for (const rule of shieldList.get()) {
  6475. if (matchShield(rule, content, scope)) {
  6476. isMatch = true;
  6477. break;
  6478. }
  6479. }
  6480. if (isMatch) {
  6481. elem.style.display = "none";
  6482. }
  6483. });
  6484. });
  6485. }
  6486. function main$6() {
  6487. shieldBySelector(threadFloorsObserver, "content", ".l_post_bright", ".d_post_content");
  6488. shieldBySelector(threadFloorsObserver, "username", ".l_post_bright", ".p_author_name");
  6489. shieldBySelector(threadCommentsObserver, "content", ".lzl_single_post", ".lzl_content_main");
  6490. shieldBySelector(threadCommentsObserver, "username", ".lzl_single_post", ".lzl_cnt .j_user_card");
  6491. shieldBySelector(legacyIndexFeedsObserver, "content", ".j_feed_li", ".title, .n_txt");
  6492. shieldBySelector(legacyIndexFeedsObserver, "username", ".j_feed_li", ".post_author");
  6493. shieldBySelector(forumThreadsObserver, "content", ".j_thread_list", ".threadlist_title a");
  6494. shieldBySelector(forumThreadsObserver, "username", ".j_thread_list", ".frs-author-name-wrap");
  6495. }
  6496. const index$g = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  6497. __proto__: null,
  6498. default: index$f,
  6499. matchShield,
  6500. shieldList,
  6501. shieldRuleMigration
  6502. }, Symbol.toStringTag, { value: "Module" }));
  6503. const _hoisted_1$7 = ["src"];
  6504. const _hoisted_2$7 = { class: "zoom-size" };
  6505. const _hoisted_3$6 = ["src", "onClick"];
  6506. const MIN_SIZE = 0.1;
  6507. const MAX_SIZE = 8;
  6508. const VLI_THRESHOLD = 5;
  6509. const VLI_WIDTH_SCALE = 2;
  6510. const DEFAULT_HIDE_CONTROLS_DELAY = 1e3;
  6511. const SHOW_CONTROLS_THRESHOLD_X = 180;
  6512. const SHOW_CONTROLS_THRESHOLD_Y = 140;
  6513. const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
  6514. __name: "images-viewer",
  6515. props: {
  6516. content: {},
  6517. defaultIndex: { default: 0 }
  6518. },
  6519. setup(__props) {
  6520. const props = __props;
  6521. const imageArray = [];
  6522. if (typeof props.content === "string") {
  6523. imageArray.push(props.content);
  6524. } else if (Array.isArray(props.content)) {
  6525. imageArray.push(...props.content);
  6526. } else {
  6527. _2.map(props.content.images, (value) => {
  6528. imageArray.push(value.original);
  6529. });
  6530. }
  6531. const dialog = vue.ref();
  6532. const imagesViewer2 = vue.ref();
  6533. const imageContainer = vue.ref();
  6534. const currImage = vue.ref();
  6535. const curr = vue.ref(props.defaultIndex);
  6536. const scale = vue.ref(1);
  6537. const deg = vue.ref(0);
  6538. const imageLeft = vue.ref(undefined);
  6539. const imageTop = vue.ref(undefined);
  6540. const showControls = vue.ref({
  6541. left: false,
  6542. right: false,
  6543. top: false,
  6544. bottom: false
  6545. });
  6546. const lockControls = vue.ref({
  6547. left: false,
  6548. right: false,
  6549. top: false,
  6550. bottom: false
  6551. });
  6552. const vliMode = vue.ref(false);
  6553. const imageStyle = vue.computed(() => {
  6554. return {
  6555. transform: `scale(${scale.value}) rotate(${deg.value}deg)`,
  6556. left: `${imageLeft.value}px`,
  6557. top: `${imageTop.value}px`,
  6558. transition: vliMode.value ? "all 0.4s ease, left 0s, top 0.1s ease-out" : "all 0.4s ease, left 0s, top 0s"
  6559. };
  6560. });
  6561. const imageProps = vue.computed(function() {
  6562. var _a;
  6563. const naturalHeight = ((_a = currImage.value) == null ? undefined : _a.naturalHeight) ?? 0;
  6564. return {
  6565. naturalHeight: naturalHeight ?? 0,
  6566. scaledHeight: naturalHeight ?? 0 * scale.value,
  6567. vliMaxTop: -(naturalHeight * (1 - scale.value) / 2) + window.innerHeight / 2,
  6568. vliMinTop: -(naturalHeight * scale.value) - naturalHeight * (1 - scale.value) / 2 + window.innerHeight / 2
  6569. };
  6570. });
  6571. const dialogOpts = {
  6572. blurEffect: false,
  6573. shadowMode: true,
  6574. contentStyle: {
  6575. width: "100%",
  6576. height: "100%"
  6577. },
  6578. renderAnimation: "kf-fade-in var(--fast-duration)",
  6579. unloadAnimation: "kf-fade-out var(--fast-duration)"
  6580. };
  6581. const evproxy = new EventProxy();
  6582. let lastMousePos = { x: window.innerWidth / 2, y: window.innerHeight / 2 };
  6583. let lastControlTimeout = {
  6584. left: 0,
  6585. right: 0,
  6586. top: 0,
  6587. bottom: 0
  6588. };
  6589. vue.onMounted(async () => {
  6590. await vue.nextTick();
  6591. let offsetX = 0, offsetY = 0;
  6592. evproxy.on(window, "mousemove", _2.throttle(function(e) {
  6593. const { clientX, clientY } = e;
  6594. lastMousePos = { x: clientX, y: clientY };
  6595. showControls.value = verifyPos();
  6596. }, 100, { leading: true }));
  6597. lockControlsTemporarily("all", DEFAULT_HIDE_CONTROLS_DELAY);
  6598. evproxy.on(imagesViewer2.value, "wheel", imageWheel, { passive: true });
  6599. evproxy.on(currImage.value, "mousedown", (e) => {
  6600. if (!currImage.value) return;
  6601. e.preventDefault();
  6602. if (vliMode.value) return;
  6603. offsetX = e.clientX - currImage.value.offsetLeft;
  6604. offsetY = e.clientY - currImage.value.offsetTop;
  6605. document.addEventListener("mousemove", moveHandler);
  6606. });
  6607. evproxy.on(document, "mouseup", (e) => {
  6608. e.preventDefault();
  6609. document.removeEventListener("mousemove", moveHandler);
  6610. });
  6611. evproxy.on(currImage.value, "load", function() {
  6612. if (!currImage.value) return;
  6613. vliMode.value = false;
  6614. (() => {
  6615. if (currImage.value.naturalHeight < window.innerHeight && currImage.value.naturalWidth < window.innerWidth) {
  6616. scale.value = 1;
  6617. return;
  6618. }
  6619. if (currImage.value.naturalHeight / currImage.value.naturalWidth >= VLI_THRESHOLD) {
  6620. vliMode.value = true;
  6621. scale.value = window.innerWidth / VLI_WIDTH_SCALE / currImage.value.naturalWidth;
  6622. imageLeft.value = undefined;
  6623. return;
  6624. }
  6625. vliMode.value = false;
  6626. scale.value = Math.min(
  6627. window.innerWidth / currImage.value.naturalWidth,
  6628. window.innerHeight / currImage.value.naturalHeight
  6629. );
  6630. })();
  6631. currImage.value.classList.remove("changing");
  6632. });
  6633. evproxy.on(currImage.value, "transitionend", function() {
  6634. var _a, _b, _c;
  6635. if (Math.abs(deg.value) >= 360) {
  6636. (_a = currImage.value) == null ? undefined : _a.classList.add("changing");
  6637. deg.value = Math.abs(deg.value) % 360;
  6638. (_b = currImage.value) == null ? undefined : _b.offsetHeight;
  6639. (_c = currImage.value) == null ? undefined : _c.classList.remove("changing");
  6640. }
  6641. });
  6642. function moveHandler(e) {
  6643. if (!currImage.value) return;
  6644. imageLeft.value = e.clientX - offsetX;
  6645. imageTop.value = e.clientY - offsetY;
  6646. }
  6647. });
  6648. vue.onUnmounted(function() {
  6649. evproxy.release();
  6650. });
  6651. vue.watch(curr, function() {
  6652. var _a;
  6653. (_a = currImage.value) == null ? undefined : _a.classList.add("changing");
  6654. deg.value = 0;
  6655. imageLeft.value = undefined;
  6656. imageTop.value = undefined;
  6657. });
  6658. vue.watch(imageTop, function(newTop) {
  6659. if (vliMode.value) {
  6660. if (!currImage.value || !imageTop.value || !newTop) return;
  6661. if (newTop > imageProps.value.vliMaxTop) {
  6662. imageTop.value = imageProps.value.vliMaxTop;
  6663. }
  6664. if (newTop < imageProps.value.vliMinTop) {
  6665. imageTop.value = imageProps.value.vliMinTop;
  6666. }
  6667. }
  6668. });
  6669. vue.watch(vliMode, function(newMode) {
  6670. lockControlsTemporarily("top", DEFAULT_HIDE_CONTROLS_DELAY);
  6671. if (newMode && currImage.value && !imageTop.value) {
  6672. imageTop.value = Math.max(
  6673. imageProps.value.vliMinTop,
  6674. -(currImage.value.naturalHeight * (1 - scale.value) / 2)
  6675. );
  6676. }
  6677. });
  6678. function unload() {
  6679. var _a;
  6680. (_a = dialog.value) == null ? undefined : _a.unload();
  6681. }
  6682. function listBack() {
  6683. if (curr.value > 0) curr.value--;
  6684. }
  6685. function listForward() {
  6686. if (curr.value < imageArray.length - 1) curr.value++;
  6687. }
  6688. function zoomImage(delta) {
  6689. scale.value += delta;
  6690. if (scale.value < MIN_SIZE) {
  6691. scale.value = MIN_SIZE;
  6692. }
  6693. if (scale.value > MAX_SIZE) {
  6694. scale.value = MAX_SIZE;
  6695. }
  6696. }
  6697. function rotateImage(delta) {
  6698. deg.value += delta;
  6699. }
  6700. function imageWheel(e) {
  6701. if (!currImage.value) return;
  6702. if (!vliMode.value) {
  6703. zoomImage(-e.deltaY / 1e3);
  6704. } else {
  6705. if (!imageTop.value) imageTop.value = 0;
  6706. imageTop.value += -e.deltaY / 1e3 * window.innerHeight;
  6707. }
  6708. }
  6709. function clickModal(e) {
  6710. if (e.target === imageContainer.value) {
  6711. unload();
  6712. }
  6713. }
  6714. function lockControlsTemporarily(direction, timeout2) {
  6715. if (direction !== "all") {
  6716. lock(direction);
  6717. } else {
  6718. lock("left");
  6719. lock("right");
  6720. lock("top");
  6721. lock("bottom");
  6722. }
  6723. function lock(direction2) {
  6724. lockControls.value[direction2] = true;
  6725. if (lastControlTimeout[direction2]) {
  6726. clearTimeout(lastControlTimeout[direction2]);
  6727. }
  6728. showControls.value[direction2] = true;
  6729. lastControlTimeout[direction2] = setTimeout(() => {
  6730. lockControls.value[direction2] = false;
  6731. showControls.value = verifyPos();
  6732. }, timeout2);
  6733. }
  6734. }
  6735. function verifyPos(pos = lastMousePos) {
  6736. const distanceToLeft = pos.x;
  6737. const distanceToRight = window.innerWidth - pos.x;
  6738. const distanceToTop = pos.y;
  6739. const distanceToBottom = window.innerHeight - pos.y;
  6740. const calcValue = {
  6741. left: false,
  6742. right: false,
  6743. top: false,
  6744. bottom: false
  6745. };
  6746. distanceToLeft <= SHOW_CONTROLS_THRESHOLD_X || lockControls.value.left ? calcValue.left = true : calcValue.left = false;
  6747. distanceToRight <= SHOW_CONTROLS_THRESHOLD_X || lockControls.value.right ? calcValue.right = true : calcValue.right = false;
  6748. distanceToTop <= SHOW_CONTROLS_THRESHOLD_Y || lockControls.value.top ? calcValue.top = true : calcValue.top = false;
  6749. distanceToBottom <= SHOW_CONTROLS_THRESHOLD_Y || lockControls.value.bottom ? calcValue.bottom = true : calcValue.bottom = false;
  6750. return calcValue;
  6751. }
  6752. return (_ctx, _cache) => {
  6753. return vue.openBlock(), vue.createBlock(vue.unref(UserDialog), vue.mergeProps({
  6754. ref_key: "dialog",
  6755. ref: dialog
  6756. }, dialogOpts), {
  6757. default: vue.withCtx(() => [
  6758. vue.createElementVNode("div", {
  6759. ref_key: "imagesViewer",
  6760. ref: imagesViewer2,
  6761. class: "images-viewer",
  6762. onClick: clickModal
  6763. }, [
  6764. vue.createElementVNode("div", {
  6765. ref_key: "imageContainer",
  6766. ref: imageContainer,
  6767. class: "image-container dialog-toggle"
  6768. }, [
  6769. vue.createElementVNode("img", {
  6770. ref_key: "currImage",
  6771. ref: currImage,
  6772. class: "curr-image changing",
  6773. src: imageArray[curr.value],
  6774. style: vue.normalizeStyle(vue.unref(parseCSSRule)(imageStyle.value))
  6775. }, null, 12, _hoisted_1$7)
  6776. ], 512),
  6777. vue.createElementVNode("div", {
  6778. class: vue.normalizeClass(["control-panel head-controls", { "hide": !showControls.value.top }])
  6779. }, [
  6780. vue.createVNode(ToggleButton, {
  6781. class: "vli-mode head-btn icon",
  6782. title: "长图模式",
  6783. modelValue: vliMode.value,
  6784. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => vliMode.value = $event)
  6785. }, {
  6786. default: vue.withCtx(() => _cache[5] || (_cache[5] = [
  6787. vue.createTextVNode("chrome_reader_mode ")
  6788. ])),
  6789. _: 1
  6790. }, 8, ["modelValue"]),
  6791. _cache[11] || (_cache[11] = vue.createElementVNode("span", null, "|", -1)),
  6792. vue.createVNode(_sfc_main$q, {
  6793. class: "zoom-in head-btn icon",
  6794. title: "缩小",
  6795. onClick: _cache[1] || (_cache[1] = ($event) => zoomImage(0.5))
  6796. }, {
  6797. default: vue.withCtx(() => _cache[6] || (_cache[6] = [
  6798. vue.createTextVNode(" zoom_in ")
  6799. ])),
  6800. _: 1
  6801. }),
  6802. vue.createVNode(_sfc_main$q, {
  6803. class: "zoom-out head-btn icon",
  6804. title: "放大",
  6805. onClick: _cache[2] || (_cache[2] = ($event) => zoomImage(-0.5))
  6806. }, {
  6807. default: vue.withCtx(() => _cache[7] || (_cache[7] = [
  6808. vue.createTextVNode(" zoom_out ")
  6809. ])),
  6810. _: 1
  6811. }),
  6812. vue.createElementVNode("span", _hoisted_2$7, vue.toDisplayString(vue.unref(_2).round(scale.value * 100) + "%"), 1),
  6813. _cache[12] || (_cache[12] = vue.createElementVNode("span", null, "|", -1)),
  6814. vue.createVNode(_sfc_main$q, {
  6815. class: "turn-left head-btn icon",
  6816. title: "逆时针旋转",
  6817. onClick: _cache[3] || (_cache[3] = ($event) => rotateImage(-90))
  6818. }, {
  6819. default: vue.withCtx(() => _cache[8] || (_cache[8] = [
  6820. vue.createTextVNode(" undo ")
  6821. ])),
  6822. _: 1
  6823. }),
  6824. vue.createVNode(_sfc_main$q, {
  6825. class: "turn-right head-btn icon",
  6826. title: "顺时针旋转",
  6827. onClick: _cache[4] || (_cache[4] = ($event) => rotateImage(90))
  6828. }, {
  6829. default: vue.withCtx(() => _cache[9] || (_cache[9] = [
  6830. vue.createTextVNode(" redo ")
  6831. ])),
  6832. _: 1
  6833. }),
  6834. _cache[13] || (_cache[13] = vue.createElementVNode("span", null, "|", -1)),
  6835. vue.createVNode(_sfc_main$q, {
  6836. class: "close head-btn icon",
  6837. title: "关闭",
  6838. onClick: unload
  6839. }, {
  6840. default: vue.withCtx(() => _cache[10] || (_cache[10] = [
  6841. vue.createTextVNode(" close ")
  6842. ])),
  6843. _: 1
  6844. })
  6845. ], 2),
  6846. imageArray.length > 1 ? (vue.openBlock(), vue.createBlock(_sfc_main$q, {
  6847. key: 0,
  6848. class: vue.normalizeClass(["control-panel back icon", { "hide": !showControls.value.left }]),
  6849. title: "上一张",
  6850. onClick: listBack
  6851. }, {
  6852. default: vue.withCtx(() => _cache[14] || (_cache[14] = [
  6853. vue.createTextVNode(" chevron_left ")
  6854. ])),
  6855. _: 1
  6856. }, 8, ["class"])) : vue.createCommentVNode("", true),
  6857. imageArray.length > 1 ? (vue.openBlock(), vue.createBlock(_sfc_main$q, {
  6858. key: 1,
  6859. class: vue.normalizeClass(["control-panel forward icon", { "hide": !showControls.value.right }]),
  6860. title: "下一张",
  6861. onClick: listForward
  6862. }, {
  6863. default: vue.withCtx(() => _cache[15] || (_cache[15] = [
  6864. vue.createTextVNode(" chevron_right ")
  6865. ])),
  6866. _: 1
  6867. }, 8, ["class"])) : vue.createCommentVNode("", true),
  6868. vue.createElementVNode("div", {
  6869. class: vue.normalizeClass(["control-panel bottom-controls", { "hide": !showControls.value.bottom }])
  6870. }, [
  6871. (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, vue.renderList(imageArray, (image, index2) => {
  6872. return vue.createVNode(_sfc_main$q, {
  6873. class: vue.normalizeClass(["bottom-btn", { "selected": index2 === curr.value }]),
  6874. "no-border": "all"
  6875. }, {
  6876. default: vue.withCtx(() => [
  6877. vue.createElementVNode("img", {
  6878. class: "image-list",
  6879. src: image,
  6880. alt: "",
  6881. onClick: ($event) => curr.value = index2
  6882. }, null, 8, _hoisted_3$6)
  6883. ]),
  6884. _: 2
  6885. }, 1032, ["class"]);
  6886. }), 64))
  6887. ], 2)
  6888. ], 512)
  6889. ]),
  6890. _: 1
  6891. }, 16);
  6892. };
  6893. }
  6894. });
  6895. const ImagesViewer = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-f4016c3f"]]);
  6896. function imagesViewer(opts) {
  6897. renderDialog(vue.createVNode(ImagesViewer, opts, null));
  6898. }
  6899. const _hoisted_1$6 = { class: "main-content" };
  6900. const _hoisted_2$6 = { class: "title" };
  6901. const _hoisted_3$5 = {
  6902. key: 0,
  6903. class: "content"
  6904. };
  6905. const _hoisted_4$4 = {
  6906. key: 0,
  6907. class: "img-container"
  6908. };
  6909. const _hoisted_5$3 = ["src"];
  6910. const _hoisted_6$2 = { class: "bottom-controls" };
  6911. const _hoisted_7$1 = ["src"];
  6912. const _hoisted_8$1 = { class: "author-info" };
  6913. const _hoisted_9$1 = { class: "author-name" };
  6914. const _hoisted_10$1 = { class: "post-time" };
  6915. const _hoisted_11$1 = { class: "replies" };
  6916. const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
  6917. __name: "post-container",
  6918. props: {
  6919. post: {},
  6920. lazyLoad: { type: Boolean, default: false },
  6921. dynamic: { type: Boolean, default: false }
  6922. },
  6923. emits: ["clickImage", "assetsLoaded"],
  6924. setup(__props, { emit: __emit }) {
  6925. const props = __props;
  6926. const emit = __emit;
  6927. const postContainer = vue.ref();
  6928. const isIntersecting = vue.ref(!props.lazyLoad);
  6929. const loadedAssets = vue.ref(0);
  6930. vue.onMounted(() => {
  6931. if (!postContainer.value) return;
  6932. if (props.post.images.length === 0) {
  6933. emit("assetsLoaded", postContainer.value);
  6934. }
  6935. if (!props.lazyLoad) return;
  6936. const iObs = new IntersectionObserver((entries) => {
  6937. entries.forEach((entry) => {
  6938. if (entry.isIntersecting) {
  6939. isIntersecting.value = true;
  6940. iObs.disconnect();
  6941. }
  6942. });
  6943. });
  6944. iObs.observe(postContainer.value.$el);
  6945. });
  6946. function showImage(e, index2) {
  6947. e.preventDefault();
  6948. emit("clickImage", (() => {
  6949. const output = [];
  6950. _2.map(props.post.images, (value) => {
  6951. output.push(value.original);
  6952. });
  6953. return output;
  6954. })(), index2);
  6955. }
  6956. function addLoadedPost() {
  6957. loadedAssets.value += 1;
  6958. if (loadedAssets.value === props.post.images.length) {
  6959. emit("assetsLoaded", postContainer.value);
  6960. }
  6961. }
  6962. return (_ctx, _cache) => {
  6963. return vue.openBlock(), vue.createBlock(_sfc_main$q, {
  6964. ref_key: "postContainer",
  6965. ref: postContainer,
  6966. "is-anchor": true,
  6967. class: vue.normalizeClass(["post-container", { "dynamic": props.dynamic, "assets-loaded": loadedAssets.value === props.post.images.length }]),
  6968. href: "/p/" + props.post.id,
  6969. target: "_blank"
  6970. }, {
  6971. default: vue.withCtx(() => [
  6972. vue.createElementVNode("div", null, [
  6973. vue.createVNode(_sfc_main$q, {
  6974. "is-anchor": true,
  6975. class: "forum-btn",
  6976. "shadow-border": true,
  6977. href: props.post.forum.href,
  6978. target: "_blank"
  6979. }, {
  6980. default: vue.withCtx(() => [
  6981. vue.createTextVNode(vue.toDisplayString(props.post.forum.name + " 吧"), 1)
  6982. ]),
  6983. _: 1
  6984. }, 8, ["href"])
  6985. ]),
  6986. vue.createElementVNode("div", _hoisted_1$6, [
  6987. vue.createElementVNode("p", _hoisted_2$6, vue.toDisplayString(props.post.title), 1),
  6988. props.post.content && props.post.content !== " " ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_3$5, vue.toDisplayString(props.post.content), 1)) : vue.createCommentVNode("", true)
  6989. ]),
  6990. props.post.images.length > 0 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$4, [
  6991. (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(props.post.images, (image, index2) => {
  6992. return vue.openBlock(), vue.createBlock(_sfc_main$q, {
  6993. class: "img-button",
  6994. onClick: ($event) => showImage($event, index2),
  6995. "no-border": "all"
  6996. }, {
  6997. default: vue.withCtx(() => [
  6998. vue.createElementVNode("img", {
  6999. class: "post-img",
  7000. src: isIntersecting.value ? image.original : "",
  7001. onLoad: addLoadedPost
  7002. }, null, 40, _hoisted_5$3)
  7003. ]),
  7004. _: 2
  7005. }, 1032, ["onClick"]);
  7006. }), 256))
  7007. ])) : vue.createCommentVNode("", true),
  7008. vue.createElementVNode("div", _hoisted_6$2, [
  7009. vue.createVNode(_sfc_main$q, {
  7010. class: "author",
  7011. "is-anchor": true,
  7012. href: props.post.author.href,
  7013. target: "_blank",
  7014. "shadow-border": true
  7015. }, {
  7016. default: vue.withCtx(() => [
  7017. vue.createElementVNode("img", {
  7018. class: "author-portrait",
  7019. src: isIntersecting.value ? vue.unref(tiebaAPI).URL_profile(props.post.author.portrait) : ""
  7020. }, null, 8, _hoisted_7$1),
  7021. vue.createElementVNode("div", _hoisted_8$1, [
  7022. vue.createElementVNode("div", _hoisted_9$1, vue.toDisplayString(props.post.author.name), 1),
  7023. vue.createElementVNode("div", _hoisted_10$1, vue.toDisplayString(props.post.time), 1)
  7024. ])
  7025. ]),
  7026. _: 1
  7027. }, 8, ["href"]),
  7028. vue.createElementVNode("div", _hoisted_11$1, vue.toDisplayString(props.post.replies), 1)
  7029. ])
  7030. ]),
  7031. _: 1
  7032. }, 8, ["href", "class"]);
  7033. };
  7034. }
  7035. });
  7036. const PostContainer = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-6cdcd181"]]);
  7037. const maxFeeds = 1e3;
  7038. const nextFeedsMargin = 320;
  7039. const unreadTTL = 2;
  7040. const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
  7041. __name: "feeds-masonry",
  7042. props: {
  7043. initFeeds: { default: () => [] },
  7044. showProgress: { type: Boolean, default: false }
  7045. },
  7046. setup(__props, { expose: __expose }) {
  7047. const props = __props;
  7048. const feeds = vue.ref([]);
  7049. const masonryWrapper = vue.ref();
  7050. const masonryContainer = vue.ref();
  7051. const hasMoreFeeds = vue.ref(true);
  7052. let currentLoadedFeeds = [];
  7053. let isFetchingFeeds = false;
  7054. const debAddFeeds = _2.debounce(addFeeds, 2e3, { leading: true });
  7055. let flexMasonry;
  7056. window.addEventListener("resize", _2.throttle(function() {
  7057. flexMasonry.adjustWidth();
  7058. if (flexMasonry.columns !== flexMasonry.calcColumns()) flexMasonry.exec();
  7059. }, 100), { passive: true });
  7060. vue.onMounted(() => {
  7061. if (!masonryWrapper.value) return;
  7062. if (!masonryContainer.value) return;
  7063. debAddFeeds(props.initFeeds);
  7064. renderMasonry();
  7065. window.addEventListener("scroll", () => {
  7066. if (isFetchingFeeds) return;
  7067. const scrollHeight = document.documentElement.scrollHeight;
  7068. const scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
  7069. const clientHeight = document.documentElement.clientHeight;
  7070. if (scrollTop + clientHeight >= scrollHeight - nextFeedsMargin) {
  7071. if (feeds.value.length < maxFeeds) {
  7072. debAddFeeds();
  7073. }
  7074. }
  7075. });
  7076. });
  7077. vue.watch(hasMoreFeeds, (newVal) => {
  7078. if (!newVal) {
  7079. toast({
  7080. message: "没有更多推送了",
  7081. type: "warning"
  7082. });
  7083. }
  7084. });
  7085. async function addFeeds(newFeeds) {
  7086. if (!newFeeds) newFeeds = [];
  7087. if (isFetchingFeeds) return;
  7088. isFetchingFeeds = true;
  7089. if (newFeeds.length <= 0) {
  7090. const response = await requestInstance(tiebaAPI.feedlist());
  7091. if (response) {
  7092. newFeeds = parsePostsFromString(response.data.html);
  7093. hasMoreFeeds.value = !!response.data.has_more;
  7094. const ruleList = shieldList.get();
  7095. newFeeds = _2.filter(newFeeds, (feed) => {
  7096. for (const rule of ruleList) {
  7097. if (matchShield(rule, feed.author.name, "username") || matchShield(rule, feed.title, "content") || matchShield(rule, feed.content, "content")) {
  7098. return false;
  7099. }
  7100. }
  7101. return true;
  7102. });
  7103. if (props.showProgress) {
  7104. headerProgress({ calc: () => currentLoadedFeeds.length / ((newFeeds == null ? undefined : newFeeds.length) ?? 0) * 100 });
  7105. }
  7106. }
  7107. }
  7108. feeds.value.push(...newFeeds);
  7109. await waitUntil(() => currentLoadedFeeds.length >= (newFeeds ?? []).length);
  7110. renderMasonry().then(function() {
  7111. unreadFeeds.set(newFeeds ? newFeeds : [], spawnOffsetTS(0, 0, 0, unreadTTL));
  7112. currentLoadedFeeds.length = 0;
  7113. isFetchingFeeds = false;
  7114. });
  7115. }
  7116. async function renderMasonry() {
  7117. await vue.nextTick();
  7118. if (!masonryContainer.value) return;
  7119. if (!flexMasonry) {
  7120. flexMasonry = new FlexMasonry({
  7121. container: masonryContainer.value,
  7122. // items: ".post-elem.assets-loaded",
  7123. columnWidth: 320,
  7124. gap: 12,
  7125. fixScrollOffset: true
  7126. });
  7127. } else {
  7128. flexMasonry.append(".masonry-wrapper > .post-elem.assets-loaded", 60);
  7129. }
  7130. }
  7131. function addToLoaded(payload) {
  7132. currentLoadedFeeds.push(payload.$el);
  7133. }
  7134. function showImages(images, index2) {
  7135. imagesViewer({
  7136. content: images,
  7137. defaultIndex: index2
  7138. });
  7139. }
  7140. function refresh() {
  7141. if (!isFetchingFeeds) {
  7142. feeds.value.length = 0;
  7143. flexMasonry.clear();
  7144. debAddFeeds();
  7145. }
  7146. }
  7147. function refreshAndMove() {
  7148. var _a;
  7149. window.scrollTo({ top: (_a = masonryContainer.value) == null ? undefined : _a.offsetTop, behavior: "smooth" });
  7150. refresh();
  7151. }
  7152. __expose({
  7153. feeds,
  7154. isFetchingFeeds,
  7155. refresh,
  7156. refreshAndMove
  7157. });
  7158. return (_ctx, _cache) => {
  7159. return vue.openBlock(), vue.createElementBlock("div", {
  7160. ref_key: "masonryWrapper",
  7161. ref: masonryWrapper,
  7162. class: "masonry-wrapper"
  7163. }, [
  7164. vue.createElementVNode("div", {
  7165. ref_key: "masonryContainer",
  7166. ref: masonryContainer,
  7167. class: "masonry-container"
  7168. }, null, 512),
  7169. (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(feeds.value, (post) => {
  7170. return vue.openBlock(), vue.createBlock(PostContainer, {
  7171. key: post.id,
  7172. post,
  7173. class: "post-elem",
  7174. dynamic: "",
  7175. "shadow-border": "",
  7176. onClickImage: showImages,
  7177. onAssetsLoaded: addToLoaded
  7178. }, null, 8, ["post"]);
  7179. }), 128))
  7180. ], 512);
  7181. };
  7182. }
  7183. });
  7184. const FeedsMasonry = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-a26c04a0"]]);
  7185. const _hoisted_1$5 = { class: "index-wrapper" };
  7186. const _hoisted_2$5 = { class: "grid-container" };
  7187. const _hoisted_3$4 = { class: "head-controls" };
  7188. const _hoisted_4$3 = { class: "search-controls" };
  7189. const _hoisted_5$2 = { class: "search-suggestions" };
  7190. const _hoisted_6$1 = ["src"];
  7191. const _hoisted_7 = { class: "sugg-content" };
  7192. const _hoisted_8 = { class: "sugg-title" };
  7193. const _hoisted_9 = { class: "sugg-desc" };
  7194. const _hoisted_10 = {
  7195. key: 0,
  7196. class: "block-wrapper followed-container"
  7197. };
  7198. const _hoisted_11 = { class: "block-controls followed" };
  7199. const _hoisted_12 = { class: "block-container followed-list" };
  7200. const _hoisted_13 = {
  7201. key: 0,
  7202. class: "icon signed"
  7203. };
  7204. const _hoisted_14 = { class: "forum-title" };
  7205. const _hoisted_15 = {
  7206. key: 1,
  7207. class: "block-wrapper topic-container"
  7208. };
  7209. const _hoisted_16 = { class: "block-controls topics" };
  7210. const _hoisted_17 = { class: "block-container topic-list" };
  7211. const _hoisted_18 = ["src"];
  7212. const _hoisted_19 = { class: "topic-content" };
  7213. const _hoisted_20 = { class: "topic-title" };
  7214. const _hoisted_21 = { class: "topic-name" };
  7215. const _hoisted_22 = { class: "topic-desc" };
  7216. const _hoisted_23 = { class: "block-controls feeds" };
  7217. const _hoisted_24 = {
  7218. key: 0,
  7219. class: "empty-container"
  7220. };
  7221. const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
  7222. __name: "index",
  7223. setup(__props) {
  7224. const initFeeds = vue.ref([]);
  7225. const userInfo = vue.ref();
  7226. const followed = vue.ref();
  7227. const masonryContainer = vue.ref();
  7228. const feedsContainer = vue.ref();
  7229. const searchText = vue.ref("");
  7230. const suggToggle = vue.ref(false);
  7231. const suggestions = vue.ref([]);
  7232. vue.ref(false);
  7233. const configMenu = vue.ref();
  7234. vue.ref(false);
  7235. const profileMenu = vue.ref();
  7236. const topicList = vue.ref([]);
  7237. const feedsIntersecting = vue.ref(false);
  7238. const feedsMasonry = vue.ref({});
  7239. let signedForums = 0;
  7240. initFeeds.value = unreadFeeds.get();
  7241. vue.onMounted(async () => {
  7242. init().then(() => {
  7243. if (masonryContainer.value) {
  7244. const iObs = new IntersectionObserver((entries) => {
  7245. if (entries[0].isIntersecting) {
  7246. feedsIntersecting.value = true;
  7247. } else {
  7248. feedsIntersecting.value = false;
  7249. }
  7250. });
  7251. iObs.observe(masonryContainer.value);
  7252. }
  7253. });
  7254. });
  7255. window.addEventListener("focusin", (ev) => toggleSuggControls(ev));
  7256. window.addEventListener("mousedown", (ev) => toggleSuggControls(ev));
  7257. async function init() {
  7258. userInfo.value = await (async () => {
  7259. try {
  7260. const userInfoResp = await (await tiebaAPI.userInfo()).json();
  7261. if (userInfoResp) {
  7262. return userInfoResp.data;
  7263. }
  7264. } catch (error) {
  7265. toast({
  7266. message: errorMessage(error),
  7267. type: "error",
  7268. duration: 6e3
  7269. });
  7270. }
  7271. })();
  7272. configMenu.value = [
  7273. {
  7274. title: "设置",
  7275. click() {
  7276. renderDialog(Settings);
  7277. }
  7278. },
  7279. "separator",
  7280. {
  7281. title: "源代码 (GitHub)",
  7282. href: GithubRepo
  7283. },
  7284. {
  7285. title: "源代码 (Gitee)",
  7286. href: GiteeRepo
  7287. }
  7288. ];
  7289. profileMenu.value = [
  7290. {
  7291. title: "登录(不可用)",
  7292. icon: "login",
  7293. href: BaiduPassport
  7294. }
  7295. ];
  7296. if (userInfo.value) {
  7297. profileMenu.value = [
  7298. {
  7299. title: "我的收藏",
  7300. icon: "star"
  7301. },
  7302. "separator",
  7303. {
  7304. title: "主页",
  7305. icon: "home",
  7306. href: tiebaAPI.URL_userHome(userInfo.value.user_portrait)
  7307. },
  7308. {
  7309. title: "修改",
  7310. icon: "settings"
  7311. },
  7312. "separator",
  7313. {
  7314. title: "退出登录(不可用)",
  7315. icon: "logout"
  7316. }
  7317. ];
  7318. }
  7319. if (userInfo.value) {
  7320. getFollowedInstance();
  7321. }
  7322. requestInstance(tiebaAPI.topicList()).then((response) => {
  7323. if (response) {
  7324. topicList.value.push(...response.data.bang_topic.topic_list);
  7325. }
  7326. });
  7327. if (!feedsContainer.value) return;
  7328. }
  7329. function toggleSuggControls(e) {
  7330. const el = e.target;
  7331. const pt = findParent(el, "search-controls");
  7332. if (pt) {
  7333. suggToggle.value = true;
  7334. } else {
  7335. suggToggle.value = false;
  7336. }
  7337. }
  7338. async function loadSuggestions(query) {
  7339. const response = await tiebaAPI.suggestions(query);
  7340. if (response.ok) {
  7341. response.json().then((value) => {
  7342. if (!query || query === "") {
  7343. const topicList2 = value.hottopic_list.search_data;
  7344. if (topicList2)
  7345. suggestions.value = _2.map(topicList2, (topic) => ({
  7346. image: topic.topic_pic,
  7347. title: topic.topic_name,
  7348. desc: topic.topic_desc,
  7349. href: topic.topic_url
  7350. }));
  7351. } else {
  7352. const matchList = value.query_match.search_data;
  7353. if (matchList)
  7354. suggestions.value = _2.map(matchList, (match) => ({
  7355. image: match.fpic,
  7356. title: match.fname,
  7357. desc: match.forum_desc,
  7358. href: tiebaAPI.URL_forum(match.fname)
  7359. }));
  7360. }
  7361. });
  7362. }
  7363. }
  7364. function searchBoxFocus() {
  7365. if (suggestions.value.length <= 0) {
  7366. loadSuggestions().then(() => {
  7367. suggToggle.value = true;
  7368. });
  7369. } else {
  7370. suggToggle.value = true;
  7371. }
  7372. }
  7373. function searchTextChange() {
  7374. loadSuggestions(searchText.value);
  7375. }
  7376. const searchMatch = _2.debounce(searchTextChange, 500);
  7377. function getFollowedInstance() {
  7378. requestInstance(tiebaAPI.followedForums()).then((response) => {
  7379. if (response) {
  7380. signedForums = 0;
  7381. followed.value = response.data;
  7382. _2.forEach(followed.value.like_forum, (forum) => {
  7383. if (forum.is_sign === 1) signedForums++;
  7384. });
  7385. followed.value.like_forum.sort((a, b) => parseInt(b.user_exp) - parseInt(a.user_exp));
  7386. }
  7387. });
  7388. }
  7389. async function oneKeySignInstance() {
  7390. messageBox({
  7391. title: "一键签到",
  7392. content: "需要注意,Web端签到获取到的经验远少于移动端,建议使用其他设备进行签到。",
  7393. type: "okCancel"
  7394. }).then((tag) => {
  7395. if (tag === "positive") {
  7396. requestInstance(tiebaAPI.oneKeySign()).then((response) => {
  7397. toast({
  7398. message: `本次共签到成功 ${response.data.signedForumAmount} 个吧,未签到 ${response.data.unsignedForumAmount} 个吧,签到失败 ${response.data.signedForumAmountFail} 个吧,共获得 ${response.data.gradeNoVip} 经验。`,
  7399. type: "check",
  7400. blurEffect: true
  7401. });
  7402. getFollowedInstance();
  7403. });
  7404. }
  7405. });
  7406. }
  7407. return (_ctx, _cache) => {
  7408. return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$5, [
  7409. vue.createElementVNode("div", _hoisted_2$5, [
  7410. vue.createElementVNode("div", _hoisted_3$4, [
  7411. vue.createElementVNode("div", _hoisted_4$3, [
  7412. vue.createVNode(UserTextbox, {
  7413. modelValue: searchText.value,
  7414. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => searchText.value = $event),
  7415. class: "search-box",
  7416. placeholder: "搜索 贴吧",
  7417. autocomplete: "none",
  7418. onFocus: searchBoxFocus,
  7419. onInput: vue.unref(searchMatch)
  7420. }, null, 8, ["modelValue", "onInput"]),
  7421. vue.createVNode(_sfc_main$q, {
  7422. class: "search-button",
  7423. "theme-style": true,
  7424. "no-border": ""
  7425. }, {
  7426. default: vue.withCtx(() => _cache[1] || (_cache[1] = [
  7427. vue.createTextVNode("搜索")
  7428. ])),
  7429. _: 1
  7430. }),
  7431. vue.withDirectives(vue.createElementVNode("div", _hoisted_5$2, [
  7432. (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(suggestions.value, (sugg) => {
  7433. return vue.openBlock(), vue.createBlock(_sfc_main$q, {
  7434. "is-anchor": true,
  7435. class: "search-elem",
  7436. href: sugg.href,
  7437. target: "_blank",
  7438. "no-border": ""
  7439. }, {
  7440. default: vue.withCtx(() => [
  7441. vue.createElementVNode("img", {
  7442. class: "sugg-img",
  7443. src: sugg.image,
  7444. alt: ""
  7445. }, null, 8, _hoisted_6$1),
  7446. vue.createElementVNode("div", _hoisted_7, [
  7447. vue.createElementVNode("p", _hoisted_8, vue.toDisplayString(sugg.title), 1),
  7448. vue.createElementVNode("p", _hoisted_9, vue.toDisplayString(sugg.desc), 1)
  7449. ])
  7450. ]),
  7451. _: 2
  7452. }, 1032, ["href"]);
  7453. }), 256))
  7454. ], 512), [
  7455. [vue.vShow, suggToggle.value && suggestions.value.length > 0]
  7456. ])
  7457. ])
  7458. ]),
  7459. followed.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_10, [
  7460. vue.createElementVNode("div", _hoisted_11, [
  7461. _cache[4] || (_cache[4] = vue.createElementVNode("p", { class: "block-title" }, "关注的吧", -1)),
  7462. vue.createVNode(BlockPanel, { class: "signed-count left-align" }, {
  7463. default: vue.withCtx(() => {
  7464. var _a;
  7465. return [
  7466. vue.createTextVNode(vue.toDisplayString(vue.unref(signedForums)) + " / " + vue.toDisplayString((_a = followed.value) == null ? undefined : _a.like_forum.length), 1)
  7467. ];
  7468. }),
  7469. _: 1
  7470. }),
  7471. vue.createVNode(BlockPanel, { class: "followed" }, {
  7472. default: vue.withCtx(() => [
  7473. vue.createVNode(_sfc_main$q, {
  7474. class: "panel-btn icon sign-btn",
  7475. onClick: oneKeySignInstance,
  7476. "unset-background": "",
  7477. "no-border": ""
  7478. }, {
  7479. default: vue.withCtx(() => _cache[2] || (_cache[2] = [
  7480. vue.createTextVNode(" task_alt")
  7481. ])),
  7482. _: 1
  7483. }),
  7484. vue.createVNode(_sfc_main$q, {
  7485. class: "panel-btn icon settings",
  7486. "unset-background": "",
  7487. "no-border": ""
  7488. }, {
  7489. default: vue.withCtx(() => _cache[3] || (_cache[3] = [
  7490. vue.createTextVNode("settings")
  7491. ])),
  7492. _: 1
  7493. })
  7494. ]),
  7495. _: 1
  7496. })
  7497. ]),
  7498. vue.createElementVNode("div", _hoisted_12, [
  7499. (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(followed.value.like_forum, (forum) => {
  7500. return vue.openBlock(), vue.createBlock(_sfc_main$q, {
  7501. "is-anchor": true,
  7502. class: "followed-btn",
  7503. "shadow-border": true,
  7504. href: vue.unref(tiebaAPI).URL_forum(forum.forum_name),
  7505. target: "_blank",
  7506. "no-border": ""
  7507. }, {
  7508. default: vue.withCtx(() => [
  7509. forum.is_sign === 1 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_13, "check")) : vue.createCommentVNode("", true),
  7510. vue.createElementVNode("div", _hoisted_14, vue.toDisplayString(forum.forum_name), 1),
  7511. vue.createElementVNode("div", {
  7512. class: vue.normalizeClass(["forum-level", "level-" + vue.unref(levelToClass)(forum.user_level)])
  7513. }, vue.toDisplayString(forum.user_level), 3)
  7514. ]),
  7515. _: 2
  7516. }, 1032, ["href"]);
  7517. }), 256))
  7518. ])
  7519. ])) : vue.createCommentVNode("", true),
  7520. topicList.value.length > 0 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_15, [
  7521. vue.createElementVNode("div", _hoisted_16, [
  7522. _cache[8] || (_cache[8] = vue.createElementVNode("p", { class: "block-title" }, "贴吧热议", -1)),
  7523. vue.createVNode(BlockPanel, { class: "topics" }, {
  7524. default: vue.withCtx(() => [
  7525. vue.createVNode(_sfc_main$q, {
  7526. class: "panel-btn icon switch",
  7527. "unset-background": true,
  7528. "no-border": ""
  7529. }, {
  7530. default: vue.withCtx(() => _cache[5] || (_cache[5] = [
  7531. vue.createTextVNode("tune")
  7532. ])),
  7533. _: 1
  7534. }),
  7535. vue.createVNode(_sfc_main$q, {
  7536. class: "panel-btn icon more",
  7537. "unset-background": true,
  7538. "no-border": ""
  7539. }, {
  7540. default: vue.withCtx(() => _cache[6] || (_cache[6] = [
  7541. vue.createTextVNode("more_horiz ")
  7542. ])),
  7543. _: 1
  7544. }),
  7545. vue.createVNode(_sfc_main$q, {
  7546. class: "panel-btn icon settings",
  7547. "unset-background": true,
  7548. "no-border": ""
  7549. }, {
  7550. default: vue.withCtx(() => _cache[7] || (_cache[7] = [
  7551. vue.createTextVNode("settings ")
  7552. ])),
  7553. _: 1
  7554. })
  7555. ]),
  7556. _: 1
  7557. })
  7558. ]),
  7559. vue.createElementVNode("div", _hoisted_17, [
  7560. (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(_2).take(topicList.value, 10), (topic) => {
  7561. return vue.openBlock(), vue.createBlock(_sfc_main$q, {
  7562. "is-anchor": true,
  7563. class: "topic-btn",
  7564. "shadow-border": true,
  7565. href: topic.topic_url,
  7566. target: "_blank"
  7567. }, {
  7568. default: vue.withCtx(() => [
  7569. vue.createElementVNode("img", {
  7570. class: "topic-img",
  7571. src: topic.topic_pic
  7572. }, null, 8, _hoisted_18),
  7573. vue.createElementVNode("div", _hoisted_19, [
  7574. vue.createElementVNode("div", _hoisted_20, [
  7575. vue.createElementVNode("div", {
  7576. class: vue.normalizeClass("topic-rank-" + topic.idx_num)
  7577. }, vue.toDisplayString(topic.idx_num), 3),
  7578. vue.createElementVNode("div", _hoisted_21, vue.toDisplayString(topic.topic_name), 1)
  7579. ]),
  7580. vue.createElementVNode("div", _hoisted_22, vue.toDisplayString(topic.topic_desc), 1)
  7581. ])
  7582. ]),
  7583. _: 2
  7584. }, 1032, ["href"]);
  7585. }), 256))
  7586. ])
  7587. ])) : vue.createCommentVNode("", true),
  7588. _cache[9] || (_cache[9] = vue.createElementVNode("div", { id: "carousel_wrap" }, null, -1))
  7589. ]),
  7590. vue.createElementVNode("div", {
  7591. ref_key: "masonryContainer",
  7592. ref: masonryContainer,
  7593. class: "masonry-container"
  7594. }, [
  7595. vue.createElementVNode("div", _hoisted_23, [
  7596. _cache[12] || (_cache[12] = vue.createElementVNode("p", { class: "block-title" }, "推送", -1)),
  7597. feedsMasonry.value && feedsMasonry.value.feeds && (feedsMasonry.value.feeds.length > 0 || feedsMasonry.value.isFetchingFeeds) ? (vue.openBlock(), vue.createBlock(BlockPanel, { key: 0 }, {
  7598. default: vue.withCtx(() => [
  7599. vue.createVNode(_sfc_main$q, {
  7600. class: "panel-button icon refresh",
  7601. "unset-background": "",
  7602. onClick: feedsMasonry.value.refreshAndMove,
  7603. "no-border": ""
  7604. }, {
  7605. default: vue.withCtx(() => _cache[10] || (_cache[10] = [
  7606. vue.createTextVNode("refresh ")
  7607. ])),
  7608. _: 1
  7609. }, 8, ["onClick"]),
  7610. vue.createVNode(_sfc_main$q, {
  7611. class: "panel-button icon settings",
  7612. "unset-background": "",
  7613. "no-border": ""
  7614. }, {
  7615. default: vue.withCtx(() => _cache[11] || (_cache[11] = [
  7616. vue.createTextVNode("settings")
  7617. ])),
  7618. _: 1
  7619. })
  7620. ]),
  7621. _: 1
  7622. })) : vue.createCommentVNode("", true)
  7623. ]),
  7624. vue.createVNode(FeedsMasonry, {
  7625. ref_key: "feedsMasonry",
  7626. ref: feedsMasonry,
  7627. "init-feeds": initFeeds.value,
  7628. "show-progress": ""
  7629. }, null, 8, ["init-feeds"]),
  7630. initFeeds.value.length === 0 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_24, _cache[13] || (_cache[13] = [
  7631. vue.createElementVNode("p", { class: "no-feed-content" }, "没有更多了", -1)
  7632. ]))) : vue.createCommentVNode("", true)
  7633. ], 512)
  7634. ]);
  7635. };
  7636. }
  7637. });
  7638. const indexVue = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-763b23df"]]);
  7639. async function index$e() {
  7640. if (currentPageType() !== "index") return;
  7641. if (!pageExtension.get().index) return;
  7642. const bodyMask = _GM_addStyle(parseMultiCSS({
  7643. "body": {
  7644. display: "none"
  7645. }
  7646. }));
  7647. const wrap = await asyncdom(".wrap1");
  7648. renderPage(indexVue);
  7649. wrap.remove();
  7650. bodyMask.remove();
  7651. }
  7652. function getFloatCoord(...args) {
  7653. if (args[0] instanceof HTMLElement)
  7654. return getFloatCoord1(args[0], args[1], args[2]);
  7655. if (typeof args[0] === "number" && typeof args[1] === "number")
  7656. return getFloatCoord2(args[0], args[1], args[2], args[3]);
  7657. return { x: 0, y: 0 };
  7658. }
  7659. function getFloatCoord1(el, coord, mode) {
  7660. const clientRect = el.getBoundingClientRect();
  7661. return getFloatCoord2(clientRect.width, clientRect.height, coord, mode);
  7662. }
  7663. function getFloatCoord2(width, height, coord, mode) {
  7664. const offsetX = (() => {
  7665. switch (mode) {
  7666. case "baseline":
  7667. return 0;
  7668. case "middle":
  7669. return width / 2;
  7670. }
  7671. })();
  7672. const x = Math.min(
  7673. coord.x - offsetX,
  7674. window.innerWidth - scrollbarWidth() - Math.ceil(width)
  7675. // 修正误差
  7676. );
  7677. const y = Math.ceil(coord.y + height) > window.innerHeight ? coord.y - height : coord.y;
  7678. return { x, y };
  7679. }
  7680. const CURSOR_MARGIN = 4;
  7681. const DEFAULT_IN_DELAY = 500;
  7682. const DEFAULT_OUT_DELAY = 100;
  7683. const messageShow = vue.ref(false);
  7684. const messageContent = vue.ref("");
  7685. let timeout = -1;
  7686. let floatHover = false;
  7687. let flaotMessageVNode = undefined;
  7688. let handleTargetMouseEnter = undefined;
  7689. let handleTargetMouseLeave = undefined;
  7690. let handleTargetMouseMove = undefined;
  7691. function floatMessage(opts) {
  7692. if (_2.isNil(opts.delay)) opts.delay = DEFAULT_IN_DELAY;
  7693. let root = dom(".float-message");
  7694. if (!root || !flaotMessageVNode) {
  7695. flaotMessageVNode = vue.createVNode(vue.Transition, {
  7696. "name": "float-message"
  7697. }, {
  7698. default: () => [vue.withDirectives(vue.createVNode("div", {
  7699. "class": "float-message"
  7700. }, [typeof messageContent.value === "string" ? vue.createVNode("span", null, [messageContent.value]) : messageContent.value]), [[vue.vShow, messageShow.value]])]
  7701. });
  7702. const rendered = appendJSX(flaotMessageVNode, document.body);
  7703. root = rendered.root;
  7704. const floatEvproxy = new EventProxy();
  7705. floatEvproxy.on(root, "mouseenter", function() {
  7706. floatHover = true;
  7707. messageShow.value = true;
  7708. });
  7709. floatEvproxy.on(root, "mouseleave", function() {
  7710. floatHover = false;
  7711. setTimeout(() => {
  7712. messageShow.value = false;
  7713. }, DEFAULT_OUT_DELAY);
  7714. });
  7715. }
  7716. handleTargetMouseEnter = () => {
  7717. if (timeout >= 0) clearTimeout(timeout);
  7718. };
  7719. handleTargetMouseLeave = async () => {
  7720. if (timeout >= 0) clearTimeout(timeout);
  7721. setTimeout(() => {
  7722. if (!floatHover) messageShow.value = false;
  7723. }, DEFAULT_OUT_DELAY);
  7724. };
  7725. handleTargetMouseMove = (e) => {
  7726. if (timeout >= 0) clearTimeout(timeout);
  7727. timeout = setTimeout(async () => {
  7728. if (!messageShow.value) {
  7729. messageContent.value = opts.content;
  7730. messageShow.value = true;
  7731. root.style.top = "0";
  7732. root.style.left = "0";
  7733. await vue.nextTick();
  7734. const coord = getFloatCoord(root, {
  7735. x: e.clientX + CURSOR_MARGIN,
  7736. y: e.clientY + CURSOR_MARGIN
  7737. }, "baseline");
  7738. root.style.left = `${window.scrollX + coord.x - 1}px`;
  7739. root.style.top = `${window.scrollY + (coord.y < e.clientY ? coord.y - CURSOR_MARGIN * 2 : coord.y)}px`;
  7740. }
  7741. }, opts.delay);
  7742. };
  7743. opts.target.addEventListener("mouseenter", handleTargetMouseEnter);
  7744. opts.target.addEventListener("mouseleave", handleTargetMouseLeave);
  7745. opts.target.addEventListener("mousemove", handleTargetMouseMove);
  7746. }
  7747. const _hoisted_1$4 = { class: "pager-wrapper" };
  7748. const _hoisted_2$4 = {
  7749. key: 0,
  7750. class: "pager-button-container"
  7751. };
  7752. const _hoisted_3$3 = {
  7753. key: 1,
  7754. class: "pager-separactor"
  7755. };
  7756. const _hoisted_4$2 = {
  7757. key: 2,
  7758. class: "jumper-container"
  7759. };
  7760. const _hoisted_5$1 = { class: "tail-slot" };
  7761. const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
  7762. __name: "pager",
  7763. props: {
  7764. total: {},
  7765. current: {},
  7766. jumperValue: {},
  7767. maxDisplay: { default: 9 },
  7768. fill: { type: Boolean, default: false },
  7769. showPagers: { type: Boolean, default: true },
  7770. head: { type: Boolean, default: true },
  7771. tail: { type: Boolean, default: true },
  7772. jumper: { type: Boolean, default: true },
  7773. pagerClick: {},
  7774. headClick: {},
  7775. tailClick: {},
  7776. prevClick: {},
  7777. nextClick: {},
  7778. pagerChange: {},
  7779. jumperEnter: {}
  7780. },
  7781. emits: [
  7782. "update:current",
  7783. "update:jumperValue"
  7784. ],
  7785. setup(__props, { expose: __expose, emit: __emit }) {
  7786. const props = __props;
  7787. const current = vue.ref(props.current);
  7788. const jumperValue = vue.ref(props.jumperValue ?? "");
  7789. const emit = __emit;
  7790. const pagerCount = Math.min(props.maxDisplay, props.total);
  7791. const pagerStart = vue.computed(
  7792. () => current.value + pagerCount / 2 > props.total ? props.total - pagerCount + 1 : Math.max(1, current.value - Math.floor(props.maxDisplay / 2))
  7793. );
  7794. const pagerEnd = vue.computed(() => Math.min(props.total, pagerStart.value + props.maxDisplay - 1) + 1);
  7795. __expose({
  7796. current,
  7797. jumperValue
  7798. });
  7799. function pagerChange(type, page) {
  7800. if (props.pagerChange && page !== current.value)
  7801. props.pagerChange(page);
  7802. current.value = page;
  7803. emit("update:current", page);
  7804. switch (type) {
  7805. case "page":
  7806. if (props.pagerClick) props.pagerClick(page);
  7807. break;
  7808. case "head":
  7809. if (props.headClick) props.headClick();
  7810. break;
  7811. case "tail":
  7812. if (props.tailClick) props.tailClick();
  7813. break;
  7814. case "prev":
  7815. if (props.prevClick) props.prevClick(page);
  7816. break;
  7817. case "next":
  7818. if (props.nextClick) props.nextClick(page);
  7819. break;
  7820. }
  7821. }
  7822. function handleJumperEnter() {
  7823. if (!jumperValue.value) return;
  7824. const page = +jumperValue.value;
  7825. if (page < 1 || page > props.total) return;
  7826. pagerChange(null, page);
  7827. if (props.jumperEnter) props.jumperEnter(page);
  7828. jumperValue.value = "";
  7829. }
  7830. return (_ctx, _cache) => {
  7831. return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$4, [
  7832. _ctx.showPagers ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$4, [
  7833. vue.withDirectives(vue.createVNode(_sfc_main$q, {
  7834. class: "pager-button pager-head-button",
  7835. "no-border": "",
  7836. onClick: _cache[0] || (_cache[0] = ($event) => pagerChange("head", 1))
  7837. }, {
  7838. default: vue.withCtx(() => _cache[6] || (_cache[6] = [
  7839. vue.createTextVNode("1")
  7840. ])),
  7841. _: 1
  7842. }, 512), [
  7843. [vue.vShow, current.value > Math.ceil(vue.unref(pagerCount) / 2) && current.value > 1 && _ctx.total > vue.unref(pagerCount)]
  7844. ]),
  7845. vue.withDirectives(vue.createVNode(_sfc_main$q, {
  7846. class: "pager-button pager-back-button icon",
  7847. "no-border": "",
  7848. onClick: _cache[1] || (_cache[1] = ($event) => pagerChange("prev", Math.max(1, current.value - vue.unref(pagerCount))))
  7849. }, {
  7850. default: vue.withCtx(() => _cache[7] || (_cache[7] = [
  7851. vue.createTextVNode(" keyboard_double_arrow_left ")
  7852. ])),
  7853. _: 1
  7854. }, 512), [
  7855. [vue.vShow, current.value > Math.ceil(vue.unref(pagerCount) / 2) && current.value > 1 && _ctx.total > vue.unref(pagerCount)]
  7856. ]),
  7857. (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(_2).range(pagerStart.value, pagerEnd.value), (displayNumber, i) => {
  7858. return vue.openBlock(), vue.createBlock(_sfc_main$q, {
  7859. key: i,
  7860. class: vue.normalizeClass(["pager-button", { "fill": _ctx.fill, "curr-pager-button": displayNumber === current.value }]),
  7861. onClick: ($event) => pagerChange("page", displayNumber),
  7862. "no-border": "all",
  7863. disabled: displayNumber === current.value
  7864. }, {
  7865. default: vue.withCtx(() => [
  7866. vue.createTextVNode(vue.toDisplayString(displayNumber), 1)
  7867. ]),
  7868. _: 2
  7869. }, 1032, ["class", "onClick", "disabled"]);
  7870. }), 128)),
  7871. vue.withDirectives(vue.createVNode(_sfc_main$q, {
  7872. class: "pager-button pager-forward-button icon",
  7873. "no-border": "",
  7874. onClick: _cache[2] || (_cache[2] = ($event) => pagerChange("next", Math.min(_ctx.total, current.value + vue.unref(pagerCount))))
  7875. }, {
  7876. default: vue.withCtx(() => _cache[8] || (_cache[8] = [
  7877. vue.createTextVNode(" keyboard_double_arrow_right ")
  7878. ])),
  7879. _: 1
  7880. }, 512), [
  7881. [vue.vShow, _ctx.total - vue.unref(pagerCount) > 1 && _ctx.total - current.value > vue.unref(pagerCount) / 2]
  7882. ]),
  7883. vue.withDirectives(vue.createVNode(_sfc_main$q, {
  7884. class: "pager-button pager-tail-button",
  7885. "no-border": "",
  7886. onClick: _cache[3] || (_cache[3] = ($event) => pagerChange("tail", _ctx.total))
  7887. }, {
  7888. default: vue.withCtx(() => [
  7889. vue.createTextVNode(vue.toDisplayString(_ctx.total), 1)
  7890. ]),
  7891. _: 1
  7892. }, 512), [
  7893. [vue.vShow, _ctx.tail && _ctx.total - vue.unref(pagerCount) > 1 && _ctx.total - current.value > vue.unref(pagerCount) / 2]
  7894. ])
  7895. ])) : vue.createCommentVNode("", true),
  7896. _ctx.showPagers && _ctx.jumper ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$3, "|")) : vue.createCommentVNode("", true),
  7897. _ctx.showPagers && _ctx.jumper ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$2, [
  7898. _cache[9] || (_cache[9] = vue.createTextVNode(" 转到 ")),
  7899. vue.createVNode(UserTextbox, {
  7900. modelValue: jumperValue.value,
  7901. "onUpdate:modelValue": [
  7902. _cache[4] || (_cache[4] = ($event) => jumperValue.value = $event),
  7903. _cache[5] || (_cache[5] = ($event) => emit("update:jumperValue", jumperValue.value))
  7904. ],
  7905. class: "jumper",
  7906. onKeydown: vue.withKeys(handleJumperEnter, ["enter"])
  7907. }, null, 8, ["modelValue"]),
  7908. _cache[10] || (_cache[10] = vue.createTextVNode(" 页 "))
  7909. ])) : vue.createCommentVNode("", true),
  7910. vue.createElementVNode("div", _hoisted_5$1, [
  7911. vue.renderSlot(_ctx.$slots, "tailSlot", {}, undefined, true)
  7912. ])
  7913. ]);
  7914. };
  7915. }
  7916. });
  7917. const Pager$1 = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-2946e41a"]]);
  7918. const _hoisted_1$3 = {
  7919. id: "thread-editor"
  7920. };
  7921. const _hoisted_2$3 = {
  7922. id: "thread-editor-toolbar"
  7923. };
  7924. const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
  7925. __name: "thread-editor",
  7926. props: {
  7927. ueditor: {},
  7928. type: {
  7929. default: "thread"
  7930. }
  7931. },
  7932. setup(__props) {
  7933. const props = __props;
  7934. const dialogOpts = {
  7935. modal: true,
  7936. force: true,
  7937. blurEffect: false,
  7938. animation: true,
  7939. lockScroll: true,
  7940. contentStyle: {
  7941. position: "fixed",
  7942. width: "100%",
  7943. maxWidth: "var(--content-max)",
  7944. bottom: "0",
  7945. marginBottom: "0",
  7946. borderBottomLeftRadius: "0",
  7947. borderBottomRightRadius: "0"
  7948. },
  7949. renderAnimation: "kf-slide-in var(--default-duration)",
  7950. unloadAnimation: "kf-slide-out var(--default-duration)"
  7951. };
  7952. const dialog = vue.ref();
  7953. const editorSlot = vue.ref();
  7954. const originParent = vue.ref();
  7955. vue.onMounted(async function() {
  7956. var _a;
  7957. await vue.nextTick();
  7958. if (!editorSlot.value) return;
  7959. originParent.value = props.ueditor.parentElement;
  7960. editorSlot.value.appendChild(props.ueditor);
  7961. const toolbar = await asyncdom(".edui-toolbar");
  7962. const editorBody = await asyncdom(".edui-editor-body");
  7963. if (toolbar.compareDocumentPosition(editorBody) & Node.DOCUMENT_POSITION_FOLLOWING) {
  7964. (_a = toolbar.parentNode) == null ? undefined : _a.insertBefore(editorBody, toolbar);
  7965. }
  7966. (await asyncdom("#ueditor_replace")).focus();
  7967. });
  7968. async function submit() {
  7969. (await asyncdom(".j_submit")).click();
  7970. unload();
  7971. }
  7972. async function unload() {
  7973. var _a;
  7974. if (!originParent.value) return;
  7975. if (!editorSlot.value) return;
  7976. originParent.value.appendChild(await asyncdom(".edui-container"));
  7977. (_a = dialog.value) == null ? undefined : _a.unload();
  7978. }
  7979. return (_ctx, _cache) => {
  7980. return vue.openBlock(), vue.createBlock(vue.unref(UserDialog), vue.mergeProps({
  7981. ref_key: "dialog",
  7982. ref: dialog
  7983. }, dialogOpts), {
  7984. default: vue.withCtx(() => [vue.createElementVNode("div", _hoisted_1$3, [vue.createVNode(_sfc_main$q, {
  7985. "aria-label": "关闭",
  7986. id: "thread-editor-exit",
  7987. class: "icon",
  7988. "shadow-border": "",
  7989. onClick: unload
  7990. }, {
  7991. default: vue.withCtx(() => _cache[0] || (_cache[0] = [vue.createTextVNode("close ")])),
  7992. _: 1
  7993. }), _ctx.type === "thread" ? (vue.openBlock(), vue.createBlock(UserTextbox, {
  7994. key: 0,
  7995. class: "title-editor",
  7996. placeholder: "输入标题",
  7997. "lodash-style": ""
  7998. })) : vue.createCommentVNode("", true), vue.createElementVNode("div", {
  7999. ref_key: "editorSlot",
  8000. ref: editorSlot,
  8001. id: "thread-editor-slot"
  8002. }, null, 512), vue.createElementVNode("div", _hoisted_2$3, [vue.createVNode(_sfc_main$q, {
  8003. id: "thread-editor-submit",
  8004. "shadow-border": "",
  8005. "theme-style": "",
  8006. onClick: submit
  8007. }, {
  8008. default: vue.withCtx(() => _cache[1] || (_cache[1] = [vue.createTextVNode("发表")])),
  8009. _: 1
  8010. })])])]),
  8011. _: 1
  8012. }, 16);
  8013. };
  8014. }
  8015. });
  8016. const ThreadEditor = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-b7d4fc0f"]]);
  8017. const _hoisted_1$2 = { class: "toggle-panel" };
  8018. const _hoisted_2$2 = { class: "toggle-container" };
  8019. const _hoisted_3$2 = { class: "toggle-name" };
  8020. const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
  8021. __name: "toggle-panel",
  8022. props: {
  8023. toggles: {}
  8024. },
  8025. setup(__props) {
  8026. const props = __props;
  8027. const dialogOpts = {
  8028. contentStyle: {
  8029. maxWidth: "60vh",
  8030. maxHeight: "60vh"
  8031. }
  8032. };
  8033. return (_ctx, _cache) => {
  8034. return vue.openBlock(), vue.createBlock(vue.unref(UserDialog), vue.normalizeProps(vue.guardReactiveProps(dialogOpts)), {
  8035. default: vue.withCtx(() => [
  8036. vue.createElementVNode("div", _hoisted_1$2, [
  8037. (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(props.toggles, (toggle) => {
  8038. return vue.openBlock(), vue.createElementBlock("div", _hoisted_2$2, [
  8039. vue.createVNode(ToggleButton, {
  8040. class: "panel-button",
  8041. "model-value": toggle.defaultValue ?? false,
  8042. "icon-type": "",
  8043. "shadow-border": "",
  8044. onClick: toggle.event
  8045. }, {
  8046. default: vue.withCtx(() => [
  8047. vue.createTextVNode(vue.toDisplayString(toggle.icon), 1)
  8048. ]),
  8049. _: 2
  8050. }, 1032, ["model-value", "onClick"]),
  8051. vue.createElementVNode("div", _hoisted_3$2, vue.toDisplayString(toggle.name), 1)
  8052. ]);
  8053. }), 256))
  8054. ])
  8055. ]),
  8056. _: 1
  8057. }, 16);
  8058. };
  8059. }
  8060. });
  8061. const TogglePanel = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-02e7f412"]]);
  8062. class TiebaComponent {
  8063. constructor(selector, parent) {
  8064. __publicField(this, "selector");
  8065. __publicField(this, "parent");
  8066. this.selector = selector;
  8067. this.parent = parent;
  8068. }
  8069. get() {
  8070. if (!this.parent) {
  8071. return dom(this.selector, [])[0];
  8072. }
  8073. return dom(this.selector, this.parent, [])[0];
  8074. }
  8075. }
  8076. const floatButtonMap = {
  8077. "auxiliary": "tbui_fbar_auxiliaryCare",
  8078. "down": "tbui_fbar_down",
  8079. "post": "tbui_fbar_post",
  8080. "props": "tbui_fbar_props",
  8081. "tsukkomi": "tbui_fbar_tsukkomi",
  8082. "share": "tbui_fbar_share",
  8083. "favor": "tbui_fbar_favor",
  8084. "feedback": "tbui_fbar_feedback",
  8085. "top": "tbui_fbar_top",
  8086. "other": "*"
  8087. };
  8088. class FloatBar extends TiebaComponent {
  8089. /**
  8090. * 获取当前页面的 float buttons
  8091. * @returns FloatBarButton[]
  8092. */
  8093. buttons() {
  8094. if (!this.get()) return [];
  8095. return Array.from(dom(".tbui_aside_fbar_button", floatBar.get(), [])).map((el) => ({
  8096. el,
  8097. type: function() {
  8098. for (let i = 0; i < el.classList.length; i++) {
  8099. const cls = el.classList[i];
  8100. if (!cls.includes("tbui_fbar_")) continue;
  8101. const key = _2.findKey(floatButtonMap, (value) => value === cls);
  8102. if (key) {
  8103. return key;
  8104. }
  8105. }
  8106. return "other";
  8107. }()
  8108. }));
  8109. }
  8110. add(type, event, className, icon, index2 = 0) {
  8111. const anchor = domrd("a", {
  8112. href: "javascript:;"
  8113. });
  8114. const el = domrd("li", {
  8115. class: "tbui_aside_fbar_button"
  8116. }, [anchor]);
  8117. el.addEventListener("click", event);
  8118. if (type !== "other") {
  8119. el.classList.add(floatButtonMap[type]);
  8120. }
  8121. if (className) el.classList.add(className);
  8122. floatBar.get().insertBefore(el, floatBar.get().children[index2]);
  8123. setFloatButtonIcon(anchor, icon);
  8124. return {
  8125. el,
  8126. type
  8127. };
  8128. function setFloatButtonIcon(el2, icon2) {
  8129. el2.classList.add("icon");
  8130. el2.classList.add("tbui_aside_fbar_button");
  8131. el2.innerHTML = icon2 ? icon2 : "";
  8132. }
  8133. }
  8134. remove(param) {
  8135. switch (typeof param) {
  8136. case "string": {
  8137. const el = dom(param, floatBar.get());
  8138. el == null ? undefined : el.remove();
  8139. break;
  8140. }
  8141. case "number": {
  8142. const el = floatBar.get().children[param];
  8143. el.remove();
  8144. break;
  8145. }
  8146. }
  8147. }
  8148. }
  8149. const floatBar = new FloatBar(".tbui_aside_float_bar");
  8150. class Pager extends TiebaComponent {
  8151. allPagerButtons() {
  8152. return dom("a, .tP", this.get(), []);
  8153. }
  8154. getPagerButton(pagerType, index2 = 0) {
  8155. const allButtons = this.allPagerButtons();
  8156. switch (pagerType) {
  8157. case "prev": {
  8158. return this.findMatchingButton(allButtons, "上一页");
  8159. }
  8160. case "next": {
  8161. return this.findMatchingButton(allButtons, "下一页", true);
  8162. }
  8163. case "head": {
  8164. return this.findMatchingButton(allButtons, "首页");
  8165. }
  8166. case "tail": {
  8167. return this.findMatchingButton(allButtons, "尾页", true);
  8168. }
  8169. case "page": {
  8170. let count = 0;
  8171. for (const el of allButtons) {
  8172. if (/^\d+$/.test(el.innerText)) {
  8173. if (count === index2 && el instanceof HTMLAnchorElement) {
  8174. return el;
  8175. }
  8176. count++;
  8177. }
  8178. }
  8179. return null;
  8180. }
  8181. default:
  8182. return null;
  8183. }
  8184. }
  8185. getByPage(page) {
  8186. return this.findMatchingButton(this.allPagerButtons(), page.toString());
  8187. }
  8188. jumpTo(page) {
  8189. const permKeys = ["pn", "see_lz"];
  8190. const params = new URLSearchParams(location.search);
  8191. const newParams = new URLSearchParams();
  8192. for (const [key, value] of params) {
  8193. if (_2.includes(permKeys, key)) {
  8194. newParams.set(key, value);
  8195. }
  8196. }
  8197. const url = new URL(location.href);
  8198. url.search = newParams.toString();
  8199. history.pushState({}, "", url);
  8200. const jumperBox = dom("#jumpPage4, #jumpPage6");
  8201. const jumperButton = dom("#pager_go4, #pager_go6");
  8202. if (jumperBox) jumperBox.value = page.toString();
  8203. jumperButton == null ? undefined : jumperButton.click();
  8204. }
  8205. findMatchingButton(buttons, text, reverse = false) {
  8206. const iterator = reverse ? Array.from(buttons).reverse() : buttons;
  8207. for (const el of iterator) {
  8208. if (el.innerText === text) {
  8209. return el;
  8210. }
  8211. }
  8212. return null;
  8213. }
  8214. }
  8215. const pager = new Pager(".l_pager");
  8216. const commentsStyle = ".core_reply .core_reply_wrapper .core_reply_content .lzl_single_post .lzl_cnt .at, .core_reply .core_reply_wrapper .core_reply_content .lzl_single_post .lzl_cnt .lzl_content_main a, .core_reply .core_reply_wrapper .core_reply_content .lzl_li_pager .lzl_more a, .core_reply .core_reply_wrapper .core_reply_content .lzl_li_pager .j_pager a, .core_reply .core_reply_wrapper .core_reply_content .btn-sub {\n color: var(--tieba-theme-fore);\n cursor: pointer;\n -webkit-text-decoration: none;\n text-decoration: none;\n transition: var(--default-duration);\n}\n\n.core_reply .core_reply_wrapper .core_reply_content .lzl_single_post .lzl_cnt .lzl_content_reply .lzl_op_list a, .core_reply .core_reply_wrapper .core_reply_content .lzl_single_post .lzl_cnt .lzl_content_reply .lzl_jb .lzl_jb_in, .core_reply .core_reply_wrapper .core_reply_content .lzl_single_post .lzl_cnt .lzl_content_reply .lzl_s_r {\n cursor: pointer;\n -webkit-text-decoration: none;\n text-decoration: none;\n transition: var(--default-duration);\n}\n\n.core_reply .core_reply_wrapper .core_reply_content .lzl_single_post .lzl_cnt .at:hover, .core_reply .core_reply_wrapper .core_reply_content .lzl_single_post .lzl_cnt .lzl_content_main a:hover, .core_reply .core_reply_wrapper .core_reply_content .lzl_li_pager .lzl_more a:hover, .core_reply .core_reply_wrapper .core_reply_content .lzl_li_pager .j_pager a:hover, .core_reply .core_reply_wrapper .core_reply_content .btn-sub:hover {\n background-color: var(--default-hover);\n}\n\n.core_reply .core_reply_wrapper .core_reply_content .lzl_single_post .lzl_cnt .lzl_content_reply .lzl_op_list a:hover, .core_reply .core_reply_wrapper .core_reply_content .lzl_single_post .lzl_cnt .lzl_content_reply .lzl_jb .lzl_jb_in:hover, .core_reply .core_reply_wrapper .core_reply_content .lzl_single_post .lzl_cnt .lzl_content_reply .lzl_s_r:hover {\n color: var(--tieba-theme-fore);\n}\n\n.core_reply .core_reply_wrapper .core_reply_content .lzl_single_post .lzl_cnt .at:active, .core_reply .core_reply_wrapper .core_reply_content .lzl_single_post .lzl_cnt .lzl_content_main a:active, .core_reply .core_reply_wrapper .core_reply_content .lzl_li_pager .lzl_more a:active, .core_reply .core_reply_wrapper .core_reply_content .lzl_li_pager .j_pager a:active, .core_reply .core_reply_wrapper .core_reply_content .btn-sub:active {\n background-color: var(--default-active);\n}\n\n.core_reply .core_reply_wrapper .core_reply_content .lzl_single_post .lzl_cnt .lzl_content_reply .lzl_op_list a:active, .core_reply .core_reply_wrapper .core_reply_content .lzl_single_post .lzl_cnt .lzl_content_reply .lzl_jb .lzl_jb_in:active, .core_reply .core_reply_wrapper .core_reply_content .lzl_single_post .lzl_cnt .lzl_content_reply .lzl_s_r:active {\n color: var(--tieba-theme-active);\n}\n\n.core_reply {\n margin-right: 0;\n margin-right: initial;\n}\n.core_reply .core_reply_wrapper {\n border: none !important;\n background-color: transparent !important;\n background-color: initial !important;\n}\n.core_reply .core_reply_wrapper {\n width: auto;\n max-width: 840px;\n}\n.core_reply .core_reply_wrapper .core_reply_content .lzl_single_post {\n margin-bottom: 12px;\n animation: kf-slide-in var(--default-duration);\n transform-origin: bottom;\n}\n.core_reply .core_reply_wrapper .core_reply_content .lzl_single_post:not(.first_no_border) {\n padding-top: 0;\n margin-top: 0;\n}\n.core_reply .core_reply_wrapper .core_reply_content .lzl_single_post .lzl_cnt .at {\n padding: 2px 0;\n color: var(--default-fore);\n font-size: 14px;\n font-weight: var(--font-weight-bold);\n}\n.core_reply .core_reply_wrapper .core_reply_content .lzl_single_post .lzl_cnt .lzl_content_main {\n font-size: 15px;\n}\n.core_reply .core_reply_wrapper .core_reply_content .lzl_single_post .lzl_cnt .lzl_content_main img {\n vertical-align: text-bottom;\n}\n.core_reply .core_reply_wrapper .core_reply_content .lzl_single_post .lzl_cnt .lzl_content_reply {\n display: flex;\n align-items: center;\n font-size: 13px;\n line-height: 28px;\n text-align: justify;\n}\n.core_reply .core_reply_wrapper .core_reply_content .lzl_single_post .lzl_cnt .lzl_content_reply .lzl_op_list {\n color: var(--light-fore);\n}\n.core_reply .core_reply_wrapper .core_reply_content .lzl_single_post .lzl_cnt .lzl_content_reply .lzl_op_list a {\n color: var(--light-fore);\n}\n.core_reply .core_reply_wrapper .core_reply_content .lzl_single_post .lzl_cnt .lzl_content_reply .lzl_jb {\n order: 1;\n margin-left: auto;\n color: var(--light-fore);\n}\n.core_reply .core_reply_wrapper .core_reply_content .lzl_single_post .lzl_cnt .lzl_content_reply .lzl_jb .lzl_jb_in {\n padding: 0;\n}\n.core_reply .core_reply_wrapper .core_reply_content .lzl_single_post .lzl_cnt .lzl_content_reply .lzl_s_r {\n padding: 0;\n margin-left: 8px;\n color: var(--light-fore);\n}\n.core_reply .core_reply_wrapper .core_reply_content .lzl_li_pager {\n padding: 0;\n margin-top: -12px;\n}\n.core_reply .core_reply_wrapper .core_reply_content .lzl_li_pager .lzl_more {\n font-size: 13px;\n}\n.core_reply .core_reply_wrapper .core_reply_content .lzl_li_pager .j_pager {\n display: flex;\n align-items: center;\n font-family: var(--code-zh);\n font-size: 13px;\n}\n.core_reply .core_reply_wrapper .core_reply_content .lzl_li_pager .j_pager .tP {\n width: auto;\n color: var(--tieba-theme-fore);\n}\n.core_reply .core_reply_wrapper .core_reply_content .lzl_li_pager .j_pager a {\n color: var(--light-fore);\n}\n.core_reply .core_reply_wrapper .core_reply_content .lzl_li_pager .j_pager a:hover {\n color: var(--tieba-theme-fore);\n}\n.core_reply .core_reply_wrapper .core_reply_content .btn-sub {\n padding: 4px 0;\n border-radius: 0;\n background: none;\n font-size: 13px;\n}\n.core_reply .core_reply_wrapper .core_reply_content .edui-container {\n width: auto !important;\n}\n.core_reply .core_reply_wrapper .core_reply_content .edui-container {\n max-height: 64px;\n}\n.core_reply .core_reply_wrapper .core_reply_content .edui-container .edui-editor-body {\n height: -moz-max-content !important;\n height: max-content !important;\n}\n.core_reply .core_reply_wrapper .core_reply_content .edui-container .edui-editor-body {\n overflow: hidden;\n max-height: 72px;\n padding: 6px;\n border-radius: 6px;\n}\n.core_reply .core_reply_wrapper .core_reply_content .edui-container .edui-editor-body .edui-body-container {\n min-height: 16px !important;\n}\n.core_reply .core_reply_wrapper .core_reply_content .edui-container .edui-editor-body .edui-body-container {\n max-height: 64px;\n padding-left: 0;\n border-radius: 6px;\n font-size: 14px;\n overflow-y: auto;\n}\n.core_reply .core_reply_wrapper .core_reply_content .lzl_panel_wrapper {\n width: 100%;\n}\n.core_reply .core_reply_wrapper .core_reply_content .lzl_panel_wrapper .lzl_panel_submit {\n background: none;\n}";
  8217. const compactStyle = "body[compact-layout] #j_p_postlist {\n gap: 0;\n}\nbody[compact-layout] .core_reply_content li.first_no_border {\n margin-top: -4px;\n}\nbody[compact-layout] .core_reply .core_reply_wrapper .core_reply_content .lzl_single_post {\n margin-bottom: 0;\n}";
  8218. function threadParser() {
  8219. var _a;
  8220. const postWrappers = dom(".l_post", []);
  8221. const contents = dom(".d_post_content", []);
  8222. const dAuthors = dom(".d_author", []);
  8223. const avatars = dom(".p_author_face", []);
  8224. const nameAnchors = dom(".p_author_name", []);
  8225. const levels = dom(".d_badge_lv", []);
  8226. const badgeTitles = dom(".d_badge_title", []);
  8227. const replyButtons = dom(".lzl_link_unfold", []);
  8228. const locations = _2.map(dom(".post-tail-wrap span:first-child, .ip-location", []), (el) => el.innerText);
  8229. const platforms = _2.map(dom(".tail-info a, .p_tail_wap", []), (el) => el.innerText);
  8230. const floors = _2.map(dom(".j_jb_ele + .tail-info + .tail-info, .p_tail li:first-child span", []), (el) => el.innerText);
  8231. const times = _2.map(dom(".post-tail-wrap span:nth-last-child(2), .p_tail li:last-child span", []), (el) => el.innerText);
  8232. const threadContents = [];
  8233. for (let i = 0; i < contents.length; i++) {
  8234. contents[i].classList.add("floor-content");
  8235. avatars[i].classList.add("floor-avatar");
  8236. nameAnchors[i].classList.add("floor-name");
  8237. threadContents.push({
  8238. post: contents[i],
  8239. replyButton: replyButtons[i],
  8240. dataField: _2.defaults(postWrappers[i].getAttribute("data-field"), ""),
  8241. isLouzhu: !!dom(".louzhubiaoshi_wrap", dAuthors[i]),
  8242. profile: {
  8243. avatar: avatars[i],
  8244. nameAnchor: nameAnchors[i],
  8245. level: parseInt(levels[i].innerText),
  8246. badgeTitle: badgeTitles[i].innerText
  8247. },
  8248. tail: {
  8249. location: locations[i],
  8250. platform: platforms[i],
  8251. floor: floors[i],
  8252. time: times[i]
  8253. }
  8254. });
  8255. }
  8256. const thread2 = {
  8257. displayWrapper: dom(".wrap2", [])[0],
  8258. title: PageData.thread.title,
  8259. reply: +(((_a = dom(".l_reply_num span:nth-child(1)")) == null ? undefined : _a.innerText) ?? 0),
  8260. pages: PageData.pager.total_page,
  8261. lzOnlyButton: dom("#lzonly_cntn", [])[0],
  8262. favorButton: dom(".j_favor", [])[0],
  8263. cotents: threadContents,
  8264. forum: {
  8265. info: {
  8266. name: PageData.forum.forum_name
  8267. // followersDisplay: DOMS(true, ".card_menNum", "span").innerText,
  8268. // postsDisplay: DOMS(true, ".card_infoNum", "span").innerText,
  8269. },
  8270. components: {
  8271. nameAnchor: dom(".card_title_fname", [])[0],
  8272. iconContainer: dom(".card_head a, .plat_picbox", [])[0],
  8273. followButton: dom(".card_head .focus_btn", [])[0],
  8274. signButton: dom(".j_sign_box", [])[0]
  8275. }
  8276. },
  8277. pager: {
  8278. listPager: dom(".pb_list_pager", [])[0],
  8279. jumper: {
  8280. textbox: dom(".jump_input_bright", [])[0],
  8281. submitButton: dom(".jump_btn_bright", [])[0]
  8282. }
  8283. }
  8284. };
  8285. return thread2;
  8286. }
  8287. const threadStyle = '.post-tail-wrap .p_reply,\n.core_reply_tail:not(.clearfix) .p_reply, .post-tail-wrap .p_reply .lzl_link_fold,\n.core_reply_tail:not(.clearfix) .p_reply .lzl_link_fold, .content-wrapper .author-container .floor-name, .d_post_content a,\n.lzl_cnt .lzl_content_main a:not(.at) {\n color: var(--tieba-theme-fore);\n cursor: pointer;\n -webkit-text-decoration: none;\n text-decoration: none;\n transition: var(--default-duration);\n}\n\n.d_post_content a,\n.lzl_cnt .lzl_content_main a:not(.at) {\n text-decoration: underline;\n -webkit-text-decoration: underline solid currentColor;\n text-decoration: underline solid currentColor;\n text-decoration-thickness: 1.2px;\n -webkit-text-decoration: underline 1.2px;\n text-decoration: underline 1.2px;\n}\n\n.post-tail-wrap a, .core_reply_tail:not(.clearfix) .p_mtail a,\n.core_reply_tail:not(.clearfix) .p_mtail .j_jb_ele::after {\n cursor: pointer;\n -webkit-text-decoration: none;\n text-decoration: none;\n transition: var(--default-duration);\n}\n\n.post-tail-wrap .p_reply:hover,\n.core_reply_tail:not(.clearfix) .p_reply:hover, .post-tail-wrap .p_reply .lzl_link_fold:hover,\n.core_reply_tail:not(.clearfix) .p_reply .lzl_link_fold:hover, .content-wrapper .author-container .floor-name:hover, .d_post_content a:hover,\n.lzl_cnt .lzl_content_main a:hover:not(.at) {\n background-color: var(--default-hover);\n}\n\n.d_post_content a:hover,\n.lzl_cnt .lzl_content_main a:hover:not(.at) {\n text-decoration: underline;\n -webkit-text-decoration: underline solid rgba(0, 0, 0, 0);\n text-decoration: underline solid rgba(0, 0, 0, 0);\n text-decoration-thickness: 1.2px;\n -webkit-text-decoration: underline 1.2px rgba(0, 0, 0, 0);\n text-decoration: underline 1.2px rgba(0, 0, 0, 0);\n}\n\n.post-tail-wrap a:hover, .core_reply_tail:not(.clearfix) .p_mtail a:hover,\n.core_reply_tail:not(.clearfix) .p_mtail .j_jb_ele:hover::after {\n color: var(--tieba-theme-fore);\n}\n\n.post-tail-wrap .p_reply:active,\n.core_reply_tail:not(.clearfix) .p_reply:active, .post-tail-wrap .p_reply .lzl_link_fold:active,\n.core_reply_tail:not(.clearfix) .p_reply .lzl_link_fold:active, .content-wrapper .author-container .floor-name:active, .d_post_content a:active,\n.lzl_cnt .lzl_content_main a:active:not(.at) {\n background-color: var(--default-active);\n}\n\n.post-tail-wrap a:active, .core_reply_tail:not(.clearfix) .p_mtail a:active,\n.core_reply_tail:not(.clearfix) .p_mtail .j_jb_ele:active::after {\n color: var(--tieba-theme-active);\n}\n\n.lzl_p_p img, .content-wrapper .author-container .floor-avatar img {\n -o-object-fit: contain;\n object-fit: contain;\n}\n\nbody {\n background-color: var(--page-background);\n overflow-x: hidden;\n}\n\nbody.special_conf_skin {\n background: var(--page-background);\n}\n\n.wrap1 {\n background: none !important;\n background-color: transparent !important;\n}\n.wrap1 .wrap2 {\n background: none !important;\n background-color: transparent !important;\n}\n\n.head_inner {\n display: none;\n}\n\n#container {\n width: 100%;\n max-width: 100%;\n max-width: var(--content-max);\n box-sizing: border-box;\n margin-top: 86px;\n}\n#container .content {\n width: 100%;\n}\n#container .content .pb_content {\n position: relative;\n width: 100%;\n box-sizing: border-box;\n padding: 24px 48px;\n border-radius: 6px 6px 0 0;\n border-top: 6px solid var(--tieba-theme-color);\n background-color: var(--default-background);\n box-shadow: 0 12px 80px -32px rgba(0, 0, 0, 0.4);\n}\n#container .tittle_fill_dom {\n display: none;\n}\n\n.card_top_wrap,\n.nav_wrap,\n.p_thread {\n display: none;\n}\n\n.core_title_wrap_bright {\n display: none !important;\n}\n\n#j_p_postlist {\n display: flex;\n box-sizing: border-box;\n flex-direction: column;\n gap: 16px;\n}\n#j_p_postlist .save_face_bg {\n display: none;\n}\n#j_p_postlist .l_post_bright {\n border: none;\n}\n#j_p_postlist .l_post_bright .d_post_content_main {\n background-color: transparent !important;\n background-color: initial !important;\n}\n#j_p_postlist .l_post_bright .d_post_content_main {\n width: 100%;\n padding: 0;\n}\n#j_p_postlist .l_post_bright .d_post_content_main .p_content {\n min-height: 0;\n min-height: initial;\n padding: 0;\n margin-bottom: -42px;\n background-color: transparent;\n background-color: initial;\n}\n#j_p_postlist .l_post_bright .d_post_content_main .p_content .shield-tip {\n background: none;\n}\n#j_p_postlist .l_post_bright .d_post_content_main .p_content .d_post_content {\n background-color: transparent !important;\n background-color: initial !important;\n}\n#j_p_postlist .l_post_bright .d_post_content_main .p_content .d_post_content {\n padding: 0;\n font-size: 16px;\n grid-area: content;\n}\n#j_p_postlist .l_post_bright .d_post_content_main .p_content .replace_div {\n width: auto !important;\n}\n#j_p_postlist .l_post_bright .d_post_content_main .p_content .BDE_Smiley {\n width: 24px;\n height: 24px;\n vertical-align: text-bottom;\n}\n#j_p_postlist .l_post_bright .d_post_content_main .p_content .BDE_Image {\n display: flex;\n width: -moz-max-content;\n width: max-content;\n max-width: 100%;\n height: auto;\n border-radius: 12px;\n margin: 6px auto;\n}\n#j_p_postlist div[data-po] {\n display: none;\n}\n\n.main-wrapper {\n display: flex;\n max-width: 80%;\n flex-direction: column;\n padding: 8px;\n margin: auto;\n margin-top: 48px;\n}\n@media (min-width: 1200px) {\n .main-wrapper {\n max-width: 60%;\n }\n}\n\n.left_section {\n width: 100%;\n}\n\n.core_reply_wrapper {\n padding-left: 42px;\n}\n\n.post-tail-wrap,\n.core_reply_tail:not(.clearfix) {\n display: flex;\n align-items: center;\n margin-top: 0;\n color: var(--light-fore);\n float: none;\n font-size: 13px;\n gap: 12px;\n}\n.post-tail-wrap .question-image,\n.core_reply_tail:not(.clearfix) .question-image {\n display: none;\n}\n.post-tail-wrap .p_reply,\n.core_reply_tail:not(.clearfix) .p_reply {\n margin: 0;\n}\n.post-tail-wrap .p_reply .lzl_link_fold,\n.core_reply_tail:not(.clearfix) .p_reply .lzl_link_fold {\n border: none;\n background: none;\n}\n\n.post-tail-wrap .tail-info {\n margin: 0;\n}\n.post-tail-wrap .tail-info:hover {\n color: var(--light-fore);\n}\n.post-tail-wrap .tail-info a:hover,\n.post-tail-wrap a.tail-info:hover,\n.post-tail-wrap .j_jb_ele a:hover {\n color: var(--tieba-theme-fore);\n}\n.post-tail-wrap .tail-info a:active,\n.post-tail-wrap a.tail-info:active,\n.post-tail-wrap .j_jb_ele a:active {\n color: var(--tieba-theme-active);\n}\n\n.core_reply_tail:not(.clearfix) {\n flex-direction: row-reverse;\n justify-content: flex-end;\n}\n.core_reply_tail:not(.clearfix) .p_tail li,\n.core_reply_tail:not(.clearfix) .p_tail_txt,\n.core_reply_tail:not(.clearfix) .p_mtail a,\n.core_reply_tail:not(.clearfix) .ip-location {\n color: var(--light-fore);\n}\n.core_reply_tail:not(.clearfix) .p_tail {\n display: flex;\n align-items: center;\n gap: 12px;\n}\n.core_reply_tail:not(.clearfix) .p_tail li {\n margin: 0;\n}\n.core_reply_tail:not(.clearfix) .p_mtail {\n display: flex;\n align-items: center;\n gap: 12px;\n}\n.core_reply_tail:not(.clearfix) .p_mtail li {\n margin: 0;\n}\n.core_reply_tail:not(.clearfix) .p_mtail a,\n.core_reply_tail:not(.clearfix) .p_mtail .j_jb_ele::after {\n color: var(--light-fore);\n}\n.core_reply_tail:not(.clearfix) .p_mtail .j_jb_ele {\n padding: 0;\n}\n.core_reply_tail:not(.clearfix) .p_props_tail.props_appraise_wrap {\n display: none;\n}\n\n.right_section {\n display: none;\n}\n\n#title-wrapper {\n display: flex;\n box-sizing: border-box;\n align-items: flex-end;\n justify-content: space-between;\n margin: 16px 0;\n gap: 8px;\n}\n.shrink-view #title-wrapper {\n padding: 0 48px;\n}\n#title-wrapper .thread-title {\n max-width: 60%;\n font-size: 32px;\n line-height: 36px;\n text-align: left;\n}\n#title-wrapper .forum-wrapper-button {\n background-color: var(--trans-light-background) !important;\n}\n#title-wrapper .forum-wrapper-button {\n display: flex;\n overflow: hidden;\n width: -moz-max-content;\n width: max-content;\n height: -moz-max-content;\n height: max-content;\n align-items: center;\n padding: 0;\n border-radius: 8px;\n gap: 8px;\n}\nhtml:not([perf-saver]) body.custom-background #title-wrapper .forum-wrapper-button {\n -webkit-backdrop-filter: blur(24px);\n backdrop-filter: blur(24px);\n}\nhtml.dark-theme body.custom-background #title-wrapper .forum-wrapper-button {\n -webkit-backdrop-filter: blur(24px) brightness(0.8);\n backdrop-filter: blur(24px) brightness(0.8);\n}\n#title-wrapper .forum-wrapper-button:last-child {\n padding-right: 8px;\n}\n#title-wrapper .forum-wrapper-button .forum-icon {\n width: 36px;\n height: 36px;\n}\n#title-wrapper .forum-wrapper-button .forum-name {\n font-size: 14px;\n font-weight: var(--font-weight-bold);\n}\n#title-wrapper .forum-wrapper-button .forum-info {\n display: flex;\n flex-direction: column;\n justify-content: center;\n}\n#title-wrapper .forum-wrapper-button .forum-info .forum-members {\n display: flex;\n gap: 8px;\n}\n#title-wrapper .forum-wrapper-button .button-container {\n display: flex;\n align-items: center;\n}\n#title-wrapper .forum-wrapper-button .button-container .forum-button {\n padding: 0 4px;\n color: var(--tieba-theme-color);\n font-size: 16px;\n font-weight: var(--font-weight-bold);\n}\n#title-wrapper .forum-wrapper-button .button-container .forum-button:not(:hover):not(:active):not(:focus) {\n background-color: transparent;\n}\n\n.forum-mask-wrapper {\n position: relative;\n z-index: -1;\n display: flex;\n justify-content: center;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n}\n@keyframes mask-fade-in {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 0.1;\n }\n}\n.forum-mask-wrapper .forum-mask {\n position: absolute;\n top: -320px;\n width: 480px;\n height: 480px;\n border-radius: 480px;\n animation: mask-fade-in 1s ease-in-out;\n filter: blur(60px);\n opacity: 0.1;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n}\n\n.core_reply_content {\n padding: 0;\n}\n\n.content-wrapper {\n display: flex;\n width: 100%;\n flex-direction: column;\n gap: 16px;\n}\n.content-wrapper .author-container {\n display: grid;\n margin-bottom: 8px;\n grid-gap: 6px;\n gap: 6px;\n grid-template: "avatar name" auto "avatar tags" auto/36px 1fr;\n}\n.content-wrapper .author-container .floor-avatar {\n width: -moz-max-content !important;\n width: max-content !important;\n height: -moz-max-content !important;\n height: max-content !important;\n padding: 0 !important;\n}\n.content-wrapper .author-container .floor-avatar {\n overflow: hidden;\n grid-area: avatar;\n}\n.content-wrapper .author-container .floor-avatar img {\n width: 36px;\n height: 36px;\n border-radius: 8px;\n}\n.content-wrapper .author-container .floor-name {\n width: -moz-fit-content;\n width: fit-content;\n color: var(--highlight-fore);\n font-size: 14px;\n font-weight: var(--font-weight-bold);\n grid-area: name;\n}\n.content-wrapper .author-container .badge-container {\n display: flex;\n margin-top: -4px;\n gap: 4px;\n grid-area: tags;\n}\n.content-wrapper .author-container .badge-container .floor-badge {\n display: flex;\n width: -moz-fit-content;\n width: fit-content;\n padding: 0 6px;\n border-radius: 6px;\n background-color: var(--trans-light-background);\n color: var(--light-fore);\n gap: 6px;\n}\n.content-wrapper .author-container .badge-container .floor-badge .badge-level {\n font-weight: var(--font-weight-bold);\n}\n.content-wrapper .floor-wrapper {\n display: grid;\n grid-template: "avatar name" auto "avatar tags" auto "content content" 1fr "footer footer" auto "comments comments" auto/36px 1fr;\n}\n.content-wrapper .floor-wrapper .floor-avatar {\n width: -moz-max-content !important;\n width: max-content !important;\n height: -moz-max-content !important;\n height: max-content !important;\n padding: 0 !important;\n}\n.content-wrapper .floor-wrapper .floor-avatar {\n overflow: hidden;\n grid-area: avatar;\n}\n.content-wrapper .floor-wrapper .floor-avatar img {\n width: 36px;\n border-radius: 8px;\n}\n.content-wrapper .floor-wrapper .floor-name {\n width: -moz-fit-content;\n width: fit-content;\n margin: 0 8px 4px;\n font-size: 14px;\n grid-area: name;\n}\n.content-wrapper .floor-wrapper .floor-badge {\n display: flex;\n width: -moz-fit-content;\n width: fit-content;\n padding: 0 6px;\n border-radius: 6px;\n margin: 0 8px 8px;\n background-color: var(--trans-light-background);\n color: var(--light-fore);\n gap: 6px;\n grid-area: tags;\n}\n.content-wrapper .floor-wrapper .floor-badge .badge-level {\n font-weight: var(--font-weight-bold);\n}\n.content-wrapper .floor-wrapper .floor-content {\n padding: 8px 0;\n font-size: 16px;\n grid-area: content;\n}\n.content-wrapper .floor-wrapper .floor-content .BDE_Smiley {\n width: 24px;\n height: 24px;\n vertical-align: sub;\n}\n.content-wrapper .floor-wrapper .floor-info {\n display: flex;\n justify-content: flex-end;\n color: var(--light-fore);\n gap: 12px;\n grid-area: footer;\n}\n.content-wrapper .floor-wrapper .floor-comments {\n width: 100%;\n grid-area: comments;\n}\n.content-wrapper .floor-wrapper .floor-comments .core_reply_wrapper {\n width: 100%;\n}\n\n#ueditor_replace {\n overflow: hidden;\n}\n\n#thread-jsx-components {\n display: flex;\n box-sizing: border-box;\n flex-direction: column;\n gap: 12px;\n}\n#thread-jsx-components .dummy-button {\n width: 100%;\n padding: 8px 0 0;\n border: none;\n border-radius: 0;\n border-bottom: 3px solid var(--border-color);\n margin-top: 8px;\n background-color: transparent;\n box-shadow: none;\n color: var(--minimal-fore);\n cursor: text;\n font-size: 16px;\n text-align: justify;\n}\n#thread-jsx-components .dummy-button:hover {\n border-color: var(--light-background);\n}\n#thread-jsx-components .dummy-button:focus {\n border-color: var(--tieba-theme-color);\n}\n\n.pb_footer {\n display: none;\n}\n\n.svelte-zmnt4x {\n display: none;\n}\n\n.wrap2 {\n padding-bottom: 0 !important;\n}\n\n.head_ad_pop {\n display: none !important;\n}\n\n.plat_head,\n.star_nav_wrap {\n display: none;\n}';
  8288. async function thread() {
  8289. if (!pageExtension.get().thread) return;
  8290. if (currentPageType() !== "thread") return;
  8291. overwriteCSS(threadStyle, compactStyle, commentsStyle);
  8292. await waitUntil(() => !_2.isNil(document.body)).then(function() {
  8293. if (compactLayout.get()) {
  8294. document.body.toggleAttribute("compact-layout");
  8295. }
  8296. });
  8297. waitUntil(() => !_2.isNil(floatBar.get())).then(function() {
  8298. floatBar.add("other", function() {
  8299. renderDialog(TogglePanel, {
  8300. toggles: [{
  8301. icon: "favorite",
  8302. name: "收藏",
  8303. defaultValue: function() {
  8304. var _a;
  8305. return ((_a = dom(".j_favor, #j_favthread .p_favthr_main")) == null ? undefined : _a.innerText) === "收藏" ? false : true;
  8306. }(),
  8307. event() {
  8308. var _a;
  8309. (_a = dom(".j_favor, #j_favthread .p_favthr_main")) == null ? undefined : _a.click();
  8310. }
  8311. }, {
  8312. icon: "face_6",
  8313. name: "只看楼主",
  8314. defaultValue: function() {
  8315. var _a;
  8316. return ((_a = dom("#lzonly_cntn")) == null ? undefined : _a.innerText) === "只看楼主" ? false : true;
  8317. }(),
  8318. event() {
  8319. var _a;
  8320. (_a = dom("#lzonly_cntn")) == null ? undefined : _a.click();
  8321. }
  8322. }, {
  8323. icon: "compare_arrows",
  8324. name: "紧凑布局",
  8325. defaultValue: (() => compactLayout.get())(),
  8326. event() {
  8327. document.body.toggleAttribute("compact-layout");
  8328. compactLayout.set(!compactLayout.get());
  8329. }
  8330. }]
  8331. });
  8332. }, "module-settings", "menu");
  8333. document.body.insertBefore(domrd("div", {
  8334. class: "vue-module-control",
  8335. style: "display: none;"
  8336. }), document.body.firstChild);
  8337. });
  8338. const content = await asyncdom(".content");
  8339. const pbContent = await asyncdom("#pb_content");
  8340. if (perfProfile.get() === "performance" && experimental.get().moreBlurEffect) {
  8341. pbContent.classList.add("blur-effect");
  8342. pbContent.style.backgroundColor = "var(--trans-default-background)";
  8343. }
  8344. createContents();
  8345. async function createContents() {
  8346. var _a;
  8347. const threadList = await asyncdom("#j_p_postlist");
  8348. threadList.classList.add("content-wrapper");
  8349. let thread2 = threadParser();
  8350. const forumIconLink = thread2.forum.components.iconContainer.children[0].src;
  8351. insertJSX(vue.createVNode("div", {
  8352. "id": "title-wrapper"
  8353. }, [vue.createVNode("h3", {
  8354. "class": "thread-title"
  8355. }, [_2.unescape(PageData.thread.title)]), vue.createVNode("div", {
  8356. "class": "forum-wrapper-button"
  8357. }, [vue.createVNode("img", {
  8358. "class": "forum-icon",
  8359. "src": forumIconLink,
  8360. "alt": "吧头像"
  8361. }, null), vue.createVNode("a", {
  8362. "class": "forum-name anchor-noback",
  8363. "href": `/f?kw=${PageData.forum.name_url}`,
  8364. "target": "_blank"
  8365. }, [PageData.forum.forum_name, vue.createTextVNode(" 吧")]), vue.createVNode("div", {
  8366. "class": "button-container"
  8367. }, [vue.createVNode(_sfc_main$q, {
  8368. "class": "icon forum-button add-forum-button",
  8369. "noBorder": true,
  8370. "onClick": () => {
  8371. var _a2;
  8372. return (_a2 = dom("#j_head_focus_btn")) == null ? undefined : _a2.click();
  8373. }
  8374. }, {
  8375. default: () => [PageData.user.is_like ? "check" : "add"]
  8376. })])])]), content, pbContent);
  8377. floatMessage({
  8378. target: await asyncdom(".forum-wrapper-button"),
  8379. content: `关注 ${PageData.forum.member_count}, 帖子 ${PageData.forum.post_num}`
  8380. });
  8381. (_a = dom(".sign-in-button")) == null ? undefined : _a.addEventListener("click", function() {
  8382. var _a2;
  8383. (_a2 = dom(".j_signbtn")) == null ? undefined : _a2.click();
  8384. });
  8385. document.addEventListener("DOMContentLoaded", function() {
  8386. threadFloorsObserver.addEvent(function() {
  8387. _2.forEach(dom(".j_jb_ele a", []), (el) => {
  8388. var _a2;
  8389. if (((_a2 = el.lastChild) == null ? undefined : _a2.nodeType) !== Node.TEXT_NODE) {
  8390. el.appendChild(new Text("举报"));
  8391. }
  8392. });
  8393. });
  8394. if (PageData.pager.cur_page === 1 && PageData.thread.reply_num > 1) {
  8395. const firstFloor = dom(".l_post", threadList);
  8396. if (firstFloor) firstFloor.style.borderBottom = "2px solid var(--tieba-theme-fore) !important";
  8397. }
  8398. }, {
  8399. once: true
  8400. });
  8401. threadFloorsObserver.addEvent(function() {
  8402. if (dom(".d_author", []).length === 0) return;
  8403. thread2 = threadParser();
  8404. _2.forEach(dom(".d_post_content_main", threadList, []), (floor, i) => {
  8405. const authorContainer = createAuthorContainer(i);
  8406. floor.insertBefore(authorContainer, floor.firstChild);
  8407. });
  8408. _2.forEach(dom(".d_author", []), (el) => el.remove());
  8409. });
  8410. function createAuthorContainer(index2) {
  8411. const authorContainer = domrd("div", {
  8412. class: "author-container"
  8413. });
  8414. thread2.cotents[index2].profile.nameAnchor.classList.add("anchor");
  8415. authorContainer.appendChild(thread2.cotents[index2].profile.avatar);
  8416. authorContainer.appendChild(thread2.cotents[index2].profile.nameAnchor);
  8417. const badgeContainer = appendJSX(vue.createVNode("div", {
  8418. "class": "badge-container"
  8419. }, null), authorContainer);
  8420. appendJSX(vue.createVNode("div", {
  8421. "class": `floor-badge level-${levelToClass(thread2.cotents[index2].profile.level)}`
  8422. }, [vue.createVNode("div", {
  8423. "class": "badge-level"
  8424. }, [thread2.cotents[index2].profile.level]), vue.createVNode("div", {
  8425. "class": "badge-title"
  8426. }, [thread2.cotents[index2].profile.badgeTitle])]), badgeContainer.root);
  8427. if (thread2.cotents[index2].isLouzhu) appendJSX(vue.createVNode("div", {
  8428. "class": "floor-badge"
  8429. }, [vue.createTextVNode("楼主")]), badgeContainer.root);
  8430. return authorContainer;
  8431. }
  8432. const avatarObserver = new IntersectionObserver(function(entries, observer) {
  8433. _2.forEach(entries, function(entry) {
  8434. if (entry.isIntersecting) {
  8435. const avatar = entry.target.children[0];
  8436. const lazyLink = avatar.getAttribute("data-tb-lazyload");
  8437. if (avatar.src !== lazyLink) {
  8438. if (lazyLink) avatar.src = lazyLink;
  8439. else observer.unobserve(entry.target);
  8440. } else {
  8441. observer.unobserve(entry.target);
  8442. }
  8443. }
  8444. });
  8445. }, {
  8446. root: null,
  8447. rootMargin: "0px",
  8448. threshold: 0.5
  8449. });
  8450. _2.forEach(thread2.cotents, (content2) => {
  8451. avatarObserver.observe(content2.profile.avatar);
  8452. });
  8453. threadCommentsObserver.addEvent(() => {
  8454. _2.forEach(dom(".lzl_cnt", []), (el) => {
  8455. _2.forEach(el.childNodes, (node) => {
  8456. if (node) node.nodeType === 3 ? node.remove() : undefined;
  8457. });
  8458. });
  8459. });
  8460. }
  8461. const pagerVNodes = [];
  8462. const insertPager = (parent, position, additionalStyles) => {
  8463. const {
  8464. vnode: pagerVNode
  8465. } = insertJSX(createPager(additionalStyles), parent, position ?? undefined);
  8466. pagerVNodes.push(pagerVNode);
  8467. function createPager(additionalStyles2) {
  8468. const pagerComponent = vue.createVNode(Pager$1, {
  8469. "total": PageData.pager.total_page,
  8470. "current": PageData.pager.cur_page,
  8471. "showPagers": PageData.pager.total_page > 1,
  8472. "pagerChange": function(page) {
  8473. pager.jumpTo(page);
  8474. _2.forEach(pagerVNodes, (pagerVNode2) => {
  8475. pagerVNode2.component.exposeProxy.current = page;
  8476. });
  8477. },
  8478. "style": parseCSSRule({
  8479. width: "100%",
  8480. padding: "0",
  8481. ...additionalStyles2
  8482. })
  8483. }, {
  8484. tailSlot: () => `回帖 ${PageData.thread.reply_num}`
  8485. });
  8486. return pagerComponent;
  8487. }
  8488. };
  8489. insertPager(pbContent, pbContent.firstChild, {
  8490. marginBottom: "24px",
  8491. position: PageData.pager.total_page <= 1 ? "absolute" : "",
  8492. right: PageData.pager.total_page <= 1 ? "48px" : ""
  8493. });
  8494. createTextbox();
  8495. async function createTextbox() {
  8496. await waitUntil(() => !_2.isNil(floatBar.get()));
  8497. await waitUntil(() => !_2.isNil(dom("#ueditor_replace")));
  8498. if (!_2.some(floatBar.buttons(), {
  8499. type: "post"
  8500. })) {
  8501. floatBar.add("post", showEditor, undefined, undefined, 2);
  8502. }
  8503. const postButton = _2.find(floatBar.buttons(), (button) => {
  8504. return button.type === "post";
  8505. });
  8506. postButton == null ? undefined : postButton.el.addEventListener("click", showEditor);
  8507. insertPager(pbContent, pbContent.lastChild, {
  8508. paddingTop: "24px"
  8509. });
  8510. appendJSX(vue.createVNode("div", {
  8511. "id": "thread-jsx-components"
  8512. }, [vue.createVNode(_sfc_main$q, {
  8513. "class": "dummy-button",
  8514. "noBorder": true,
  8515. "onClick": showEditor
  8516. }, {
  8517. default: () => [vue.createTextVNode("回复帖子")]
  8518. })]), pbContent);
  8519. function showEditor() {
  8520. const ueditor = function() {
  8521. if (dom(".edui-container", []).length > 0) return dom(".edui-container");
  8522. return dom("#ueditor_replace");
  8523. }();
  8524. if (ueditor) {
  8525. renderDialog(vue.createVNode(ThreadEditor, {
  8526. "ueditor": ueditor,
  8527. "type": "reply"
  8528. }, null));
  8529. }
  8530. }
  8531. }
  8532. }
  8533. setTheme(themeType.get());
  8534. darkPrefers.addEventListener("change", () => setTheme(themeType.get()));
  8535. Promise.all([
  8536. loadDynamicCSS(),
  8537. loadMainCSS(),
  8538. index$e(),
  8539. thread(),
  8540. parseUserModules(
  8541. /* @__PURE__ */ Object.assign({ "./modules/easy-jump/index.ts": () => Promise.resolve().then(() => index$d), "./modules/no-login/index.ts": () => Promise.resolve().then(() => index$b), "./modules/notrans-emojis/index.ts": () => Promise.resolve().then(() => index$9), "./modules/portal/index.ts": () => Promise.resolve().then(() => index$7), "./modules/remixed-theme/index.ts": () => Promise.resolve().then(() => index$5), "./modules/shield/index.ts": () => Promise.resolve().then(() => index$g), "./modules/tieba-tags/index.ts": () => Promise.resolve().then(() => index$3), "./modules/toolkit/index.ts": () => Promise.resolve().then(() => index$1) }),
  8542. (module) => {
  8543. AllModules().push(module);
  8544. }
  8545. ),
  8546. document.addEventListener("DOMContentLoaded", function() {
  8547. if (currentPageType() === "thread") {
  8548. threadFloorsObserver.observe();
  8549. threadCommentsObserver.observe();
  8550. }
  8551. if (currentPageType() === "index") {
  8552. if (!pageExtension.get().index)
  8553. legacyIndexFeedsObserver.observe();
  8554. }
  8555. if (currentPageType() === "forum") {
  8556. forumThreadsObserver.observe();
  8557. }
  8558. })
  8559. ]);
  8560. window.addEventListener("load", function() {
  8561. checkUpdateAndNotify();
  8562. });
  8563. waitUntil(() => !_2.isNil(document.body)).then(function() {
  8564. if (wideScreen.get().noLimit) {
  8565. document.body.classList.add("shrink-view");
  8566. } else {
  8567. const shrinkListener = _2.throttle(function() {
  8568. if (window.innerWidth <= wideScreen.get().maxWidth) {
  8569. document.body.classList.add("shrink-view");
  8570. } else {
  8571. document.body.classList.remove("shrink-view");
  8572. }
  8573. }, 200);
  8574. shrinkListener();
  8575. window.addEventListener("resize", shrinkListener);
  8576. }
  8577. });
  8578. loadPerf();
  8579. _GM_registerMenuCommand("设置", () => renderDialog(Settings));
  8580. console.info(REMIXED);
  8581. const index$c = {
  8582. id: "easy-jump",
  8583. name: "直链跳转",
  8584. author: "锯条",
  8585. version: "1.0.2",
  8586. brief: "链接跳转避免二次确认",
  8587. description: `自动跳转至分享链接的原始地址,不再进行中转(不处理被严重警告的链接)`,
  8588. scope: /jump2?.bdimg.com\/safecheck\//,
  8589. runAt: "immediately",
  8590. entry: main$5
  8591. };
  8592. async function main$5() {
  8593. afterHead(function() {
  8594. injectCSSRule("html", {
  8595. backgroundColor: "var(--page-background)"
  8596. });
  8597. injectCSSRule("body", {
  8598. display: "none"
  8599. });
  8600. });
  8601. location.href = (await asyncdom(".link")).innerText;
  8602. }
  8603. const index$d = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  8604. __proto__: null,
  8605. default: index$c
  8606. }, Symbol.toStringTag, { value: "Module" }));
  8607. const index$a = {
  8608. id: "nologin-tieba",
  8609. name: "免登录(不可用)浏览",
  8610. author: "锯条",
  8611. version: "1.0",
  8612. brief: "免登录(不可用)浏览贴吧",
  8613. description: `始终伪装为已登录(不可用)状态,让免登录(不可用)浏览和已登录(不可用)基本一致`,
  8614. scope: ["thread"],
  8615. runAt: "DOMLoaded",
  8616. entry: main$4
  8617. };
  8618. function main$4() {
  8619. if (PageData.user.is_login) return;
  8620. PageData.user.is_login = 1;
  8621. }
  8622. const index$b = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  8623. __proto__: null,
  8624. default: index$a
  8625. }, Symbol.toStringTag, { value: "Module" }));
  8626. const index$8 = {
  8627. id: "notrans-emojis",
  8628. name: "别动我的 emoji😠",
  8629. author: "锯条",
  8630. version: "1.0",
  8631. brief: "拒绝替换我的 emoji",
  8632. description: "原版贴吧会将部分emoji表情替换为旧版,该模块会让这些emoji重新跟随系统样式",
  8633. scope: true,
  8634. runAt: "afterHead",
  8635. entry: main$3
  8636. };
  8637. function main$3() {
  8638. const indexRegExp = new RegExp("(?<=nickemoji\\/).*?(?=.png)", "gi");
  8639. const emojis = [
  8640. "º",
  8641. "◎",
  8642. "▫",
  8643. "◆",
  8644. "♤",
  8645. "♀",
  8646. "♂",
  8647. "ლ",
  8648. "♬",
  8649. "☞",
  8650. "☜",
  8651. "✆",
  8652. "☎",
  8653. "♋",
  8654. "Ω",
  8655. "℃",
  8656. "℉",
  8657. "😄",
  8658. "😍",
  8659. "😘",
  8660. "😚",
  8661. "😜",
  8662. "😳",
  8663. "😁",
  8664. "😞",
  8665. "😢",
  8666. "😂",
  8667. "😫",
  8668. "😨",
  8669. "😱",
  8670. "😡",
  8671. "😷",
  8672. "😲",
  8673. "😈",
  8674. "🐷",
  8675. "🐶",
  8676. "🐑",
  8677. "🐵",
  8678. "🐨",
  8679. "🐴",
  8680. "🐼",
  8681. "🐯",
  8682. "🍪",
  8683. "🍺",
  8684. "🍦",
  8685. "🍭",
  8686. "🍗",
  8687. "🍼",
  8688. "🔯",
  8689. "🍒",
  8690. "👀",
  8691. "🐭",
  8692. "😇",
  8693. "😺",
  8694. "😻",
  8695. "🙀",
  8696. "😿",
  8697. "😹",
  8698. "😾",
  8699. "👹",
  8700. "👺",
  8701. "🌞",
  8702. "🌝",
  8703. "🌚",
  8704. "🌜",
  8705. "🌛",
  8706. "👦",
  8707. "👧",
  8708. "🎎",
  8709. "🌸",
  8710. "🍀",
  8711. "🌹",
  8712. "🌻",
  8713. "🌺",
  8714. "🍁",
  8715. "🌿",
  8716. "🍄",
  8717. "🌵",
  8718. "🌴",
  8719. "🌳",
  8720. "🌰",
  8721. "🌱",
  8722. "🌼",
  8723. "🌐",
  8724. "🌙",
  8725. "🌋",
  8726. "🌌",
  8727. "⛅",
  8728. "⚡",
  8729. "☔",
  8730. "⛄",
  8731. "🌀",
  8732. "🌈",
  8733. "🌊",
  8734. "🔥",
  8735. "✨",
  8736. "🌟",
  8737. "💥",
  8738. "💫",
  8739. "💢",
  8740. "💦",
  8741. "💧",
  8742. "💤",
  8743. "💨",
  8744. "🎀",
  8745. "🌂",
  8746. "💄",
  8747. "💕",
  8748. "💖",
  8749. "💞",
  8750. "💘",
  8751. "💌",
  8752. "💋",
  8753. "💝",
  8754. "🎒",
  8755. "🎓",
  8756. "🎏",
  8757. "🎃",
  8758. "👻",
  8759. "🎅",
  8760. "🎄",
  8761. "🎁",
  8762. "🙈",
  8763. "🐒",
  8764. "💯",
  8765. "👯",
  8766. "💍"
  8767. ];
  8768. const transformed = [
  8769. "1-1.png",
  8770. "1-2.png",
  8771. "1-4.png",
  8772. "1-5.png",
  8773. "1-6.png",
  8774. "1-7.png",
  8775. "1-8.png",
  8776. "1-9.png",
  8777. "1-10.png",
  8778. "1-11.png",
  8779. "1-12.png",
  8780. "1-13.png",
  8781. "1-14.png",
  8782. "1-15.png",
  8783. "1-16.png",
  8784. "1-17.png",
  8785. "1-18.png",
  8786. "1-19.png",
  8787. "1-20.png",
  8788. "1-21.png",
  8789. "1-22.png",
  8790. "1-23.png",
  8791. "1-24.png",
  8792. "1-25.png",
  8793. "1-26.png",
  8794. "1-27.png",
  8795. "1-28.png",
  8796. "1-29.png",
  8797. "1-30.png",
  8798. "1-31.png",
  8799. "1-32.png",
  8800. "1-33.png",
  8801. "1-34.png",
  8802. "1-35.png",
  8803. "2-1.png",
  8804. "2-2.png",
  8805. "2-3.png",
  8806. "2-4.png",
  8807. "2-5.png",
  8808. "2-6.png",
  8809. "2-7.png",
  8810. "2-8.png",
  8811. "2-9.png",
  8812. "2-10.png",
  8813. "2-11.png",
  8814. "2-12.png",
  8815. "2-13.png",
  8816. "2-14.png",
  8817. "2-15.png",
  8818. "2-16.png",
  8819. "2-17.png",
  8820. "2-18.png",
  8821. "2-19.png",
  8822. "2-20.png",
  8823. "2-21.png",
  8824. "2-22.png",
  8825. "2-23.png",
  8826. "2-24.png",
  8827. "2-25.png",
  8828. "2-26.png",
  8829. "2-27.png",
  8830. "2-28.png",
  8831. "2-29.png",
  8832. "2-30.png",
  8833. "2-31.png",
  8834. "2-32.png",
  8835. "2-33.png",
  8836. "2-34.png",
  8837. "2-35.png",
  8838. "3-1.png",
  8839. "3-2.png",
  8840. "3-3.png",
  8841. "3-4.png",
  8842. "3-5.png",
  8843. "3-6.png",
  8844. "3-7.png",
  8845. "3-8.png",
  8846. "3-9.png",
  8847. "3-10.png",
  8848. "3-11.png",
  8849. "3-12.png",
  8850. "3-13.png",
  8851. "3-14.png",
  8852. "3-15.png",
  8853. "3-16.png",
  8854. "3-17.png",
  8855. "3-18.png",
  8856. "3-19.png",
  8857. "3-20.png",
  8858. "3-21.png",
  8859. "3-22.png",
  8860. "3-23.png",
  8861. "3-24.png",
  8862. "3-25.png",
  8863. "3-26.png",
  8864. "3-27.png",
  8865. "3-28.png",
  8866. "3-29.png",
  8867. "3-30.png",
  8868. "3-31.png",
  8869. "3-32.png",
  8870. "3-33.png",
  8871. "3-34.png",
  8872. "3-35.png",
  8873. "4-1.png",
  8874. "4-2.png",
  8875. "4-3.png",
  8876. "4-4.png",
  8877. "4-5.png",
  8878. "4-6.png",
  8879. "4-7.png",
  8880. "4-8.png",
  8881. "4-9.png",
  8882. "4-10.png",
  8883. "4-11.png",
  8884. "4-12.png",
  8885. "4-13.png",
  8886. "4-14.png",
  8887. "4-15.png",
  8888. "4-16.png",
  8889. "4-17.png",
  8890. "4-18.png",
  8891. "4-19.png",
  8892. "4-20.png",
  8893. "4-21.png",
  8894. "4-22.png",
  8895. "4-23.png"
  8896. ];
  8897. threadCommentsObserver.addEvent(() => {
  8898. try {
  8899. _2.forEach(dom(`
  8900. .p_author_name:has(.nicknameEmoji),
  8901. .at:has(.nicknameEmoji),
  8902. .lzl_content_main:has(.nicknameEmoji)
  8903. `, []), (el) => {
  8904. updateEmojis(el);
  8905. });
  8906. } catch (error) {
  8907. _2.forEach(dom(".p_author_name, .at, .lzl_content_main", []), (el) => {
  8908. if (_2.includes(el.classList, "nicknameEmoji")) {
  8909. updateEmojis(el);
  8910. }
  8911. });
  8912. }
  8913. });
  8914. legacyIndexFeedsObserver.addEvent(() => {
  8915. try {
  8916. _2.forEach(dom(`
  8917. .new_list .post_author:has(.nicknameEmoji),
  8918. .userinfo_username:has(.nicknameEmoji)
  8919. `, []), (el) => {
  8920. updateEmojis(el);
  8921. });
  8922. } catch (error) {
  8923. _2.forEach(dom(".newlist .post_author, .userinfo_username", []), (el) => {
  8924. if (_2.includes(el.classList, "nicknameEmoji")) {
  8925. updateEmojis(el);
  8926. }
  8927. });
  8928. }
  8929. });
  8930. forumThreadsObserver.addEvent(() => {
  8931. try {
  8932. _2.forEach(dom(".threadlist_author a:has(.nicknameEmoji)", []), (el) => {
  8933. updateEmojis(el);
  8934. });
  8935. } catch (error) {
  8936. _2.forEach(dom(".threadlist_author a", []), (el) => {
  8937. if (_2.includes(el.classList, "nicknameEmoji")) {
  8938. updateEmojis(el);
  8939. }
  8940. });
  8941. }
  8942. });
  8943. function updateEmojis(elem) {
  8944. const arrIndex = elem.innerHTML.match(indexRegExp);
  8945. arrIndex == null ? undefined : arrIndex.forEach((index2) => {
  8946. const emoji = emojis[transformed.indexOf(`${index2}.png`)];
  8947. const arrInner = elem.innerHTML.split(RegExp(
  8948. `<img[^>]*?${index2}.png(?:[^>]*?)*>`,
  8949. "g"
  8950. ));
  8951. elem.innerHTML = arrInner.join(decodeURIComponent(emoji));
  8952. });
  8953. }
  8954. }
  8955. const index$9 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  8956. __proto__: null,
  8957. default: index$8
  8958. }, Symbol.toStringTag, { value: "Module" }));
  8959. const index$6 = {
  8960. id: "portal",
  8961. name: "传送门",
  8962. author: "锯条",
  8963. version: "1.1.1",
  8964. brief: "为贴子中的b站番号添加跳转链接",
  8965. description: `该模块可以识别贴子中的 av/BV 号并将其转换为超链接`,
  8966. scope: ["thread"],
  8967. runAt: "immediately",
  8968. entry: main$2
  8969. };
  8970. function main$2() {
  8971. const LINKED_CLASS = "linked";
  8972. const avRegExp = new RegExp("(?<!:\\/\\/www.bilibili.com\\/video\\/)av[1-9]\\d*", "gi");
  8973. const BVRegExp = new RegExp("(?<!:\\/\\/www.bilibili.com\\/video\\/)BV[A-Za-z0-9]{10}", "g");
  8974. document.addEventListener("DOMContentLoaded", () => {
  8975. threadCommentsObserver.addEvent(biliPortal);
  8976. });
  8977. function biliPortal() {
  8978. addBiliLinks(".d_post_content");
  8979. addBiliLinks(".lzl_cnt .lzl_content_main");
  8980. function addBiliLinks(selector) {
  8981. _2.forEach(dom(selector, []), (elem) => {
  8982. var _a, _b, _c, _d;
  8983. if (elem.classList.contains(LINKED_CLASS)) return;
  8984. elem.classList.add(LINKED_CLASS);
  8985. if (((_a = elem.textContent) == null ? undefined : _a.toLowerCase().indexOf("av")) !== -1) {
  8986. const avs = (_b = elem.textContent) == null ? undefined : _b.match(avRegExp);
  8987. bindingLinks(avs ?? undefined, true);
  8988. }
  8989. if (((_c = elem.textContent) == null ? undefined : _c.indexOf("BV")) !== -1) {
  8990. const BVs = (_d = elem.textContent) == null ? undefined : _d.match(BVRegExp);
  8991. bindingLinks(BVs ?? undefined);
  8992. }
  8993. function bindingLinks(array, lowerCase = false) {
  8994. if (!array) return;
  8995. const hadHyperLink = [];
  8996. _2.forEach(array, (videoID) => {
  8997. if (hadHyperLink.indexOf(videoID) === -1) {
  8998. hadHyperLink.push(videoID);
  8999. const htmlArray = elem.innerHTML.split(
  9000. RegExp(`(?<!://www.bilibili.com/video/)${videoID}`, "g")
  9001. );
  9002. if (lowerCase) videoID = videoID.toLowerCase();
  9003. const linkedID = `<a href='https://www.bilibili.com/video/${videoID}' target='_blank'>${videoID}</a>`;
  9004. elem.innerHTML = htmlArray.join(linkedID);
  9005. }
  9006. });
  9007. }
  9008. });
  9009. }
  9010. }
  9011. }
  9012. const index$7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  9013. __proto__: null,
  9014. default: index$6
  9015. }, Symbol.toStringTag, { value: "Module" }));
  9016. const floatBarStyle = '.tbui_aside_float_bar {\n background-color: var(--very-light-background) !important;\n}\n.tbui_aside_float_bar {\n bottom: 20px;\n left: calc(50% + var(--content-max) / 2 + 20px);\n display: flex;\n overflow: hidden;\n width: -moz-max-content;\n width: max-content;\n flex-direction: column;\n border-radius: 8px;\n margin-left: 0;\n gap: 4px;\n box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);\n}\nhtml.dark-theme .tbui_aside_float_bar {\n box-shadow: 0 0 16px rgba(0, 0, 0, 0.4);\n}\n[no-scrollbar] .tbui_aside_float_bar {\n left: calc(50% + var(--content-max) / 2 + 20px - var(--scrollbar-width) / 2);\n}\n.shrink-view .tbui_aside_float_bar {\n bottom: 0;\n left: calc(100% - 40px);\n}\n[no-scrollbar].shrink-view .tbui_aside_float_bar {\n left: calc(100% - 40px - var(--scrollbar-width));\n}\n.tbui_aside_float_bar .tbui_aside_fbar_button {\n margin: 0 !important;\n}\n.tbui_aside_float_bar .tbui_aside_fbar_button {\n border-radius: 0;\n background-color: var(--default-background);\n transition: var(--default-duration);\n}\n.tbui_aside_float_bar .tbui_aside_fbar_button a {\n border-radius: 0;\n}\n.tbui_aside_float_bar .tbui_aside_fbar_button a:hover {\n color: var(--tieba-theme-color);\n}\n.tbui_aside_float_bar .tbui_aside_fbar_button a:active {\n color: var(--tieba-theme-fore);\n}\n.tbui_aside_float_bar .tbui_aside_fbar_button[style*="visibility: hidden"] {\n margin-top: -4px !important;\n}\n.tbui_aside_float_bar .tbui_aside_fbar_button[style*="visibility: hidden"] {\n height: 0;\n}';
  9017. const _hoisted_1$1 = {
  9018. key: 0,
  9019. class: "menu-separator"
  9020. };
  9021. const _hoisted_2$1 = {
  9022. key: 0,
  9023. class: "icon"
  9024. };
  9025. const _hoisted_3$1 = { class: "menu-title" };
  9026. const _hoisted_4$1 = {
  9027. key: 0,
  9028. class: "menu-inner"
  9029. };
  9030. const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
  9031. __name: "dropdown-menu",
  9032. props: {
  9033. menuItems: {},
  9034. blurEffect: { type: Boolean }
  9035. },
  9036. emits: ["RequestClose"],
  9037. setup(__props, { emit: __emit }) {
  9038. const props = __props;
  9039. const emit = __emit;
  9040. vue.onMounted(() => {
  9041. setTimeout(() => {
  9042. window.addEventListener("click", () => {
  9043. setTimeout(() => {
  9044. emit("RequestClose");
  9045. }, 100);
  9046. });
  9047. window.addEventListener("focusin", (ev) => {
  9048. if (!findParent(ev.target, "dropdown-menu")) {
  9049. emit("RequestClose");
  9050. }
  9051. });
  9052. }, 100);
  9053. });
  9054. return (_ctx, _cache) => {
  9055. return vue.openBlock(), vue.createElementBlock("div", {
  9056. class: vue.normalizeClass(["dropdown-menu", _ctx.blurEffect ? "blur-effect" : ""])
  9057. }, [
  9058. (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(props.menuItems, (menuItem) => {
  9059. return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
  9060. typeof menuItem === "string" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$1)) : (vue.openBlock(), vue.createBlock(_sfc_main$q, {
  9061. key: 1,
  9062. class: "menu-item",
  9063. "is-anchor": menuItem.href !== undefined,
  9064. href: menuItem.href ? menuItem.href : "javascript:;",
  9065. onClick: menuItem.click,
  9066. target: menuItem.href ? "_blank" : "",
  9067. "no-border": ""
  9068. }, {
  9069. default: vue.withCtx(() => [
  9070. menuItem.icon ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$1, vue.toDisplayString(menuItem.icon), 1)) : vue.createCommentVNode("", true),
  9071. vue.createElementVNode("div", _hoisted_3$1, [
  9072. vue.createTextVNode(vue.toDisplayString(menuItem.title) + " ", 1),
  9073. menuItem.innerText ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$1, vue.toDisplayString(menuItem.innerText), 1)) : vue.createCommentVNode("", true)
  9074. ])
  9075. ]),
  9076. _: 2
  9077. }, 1032, ["is-anchor", "href", "onClick", "target"]))
  9078. ], 64);
  9079. }), 256))
  9080. ], 2);
  9081. };
  9082. }
  9083. });
  9084. const DropdownMenu = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-f5c2af9e"]]);
  9085. const _hoisted_1 = { id: "fold-bar" };
  9086. const _hoisted_2 = { id: "nav-container" };
  9087. const _hoisted_3 = { class: "left-container" };
  9088. const _hoisted_4 = ["src"];
  9089. const _hoisted_5 = { class: "right-container" };
  9090. const _hoisted_6 = { class: "middle-container" };
  9091. const _sfc_main = /* @__PURE__ */ vue.defineComponent({
  9092. __name: "nav-bar",
  9093. props: {
  9094. hideMode: { default: navBarHideMode.get() }
  9095. },
  9096. setup(__props) {
  9097. const props = __props;
  9098. const navBar = vue.ref();
  9099. const teiggerHide = vue.ref(false);
  9100. const navAvatar = vue.ref();
  9101. const userPortrait = vue.ref("");
  9102. const middleMenu = vue.ref({});
  9103. const userMenu = vue.ref([]);
  9104. const extendMenu = vue.ref([]);
  9105. init();
  9106. vue.onMounted(async function() {
  9107. {
  9108. waitUntil(() => userPortrait.value !== "").then(function() {
  9109. if (navAvatar.value)
  9110. navAvatar.value.src = tiebaAPI.URL_profile(userPortrait.value);
  9111. });
  9112. }
  9113. });
  9114. async function init() {
  9115. await waitUntil(() => PageData !== undefined).then(() => {
  9116. userPortrait.value = PageData.user.portrait;
  9117. loadNavMenuContent();
  9118. });
  9119. const navBarElement = dom("#nav-bar");
  9120. if (navBarElement) {
  9121. _2.forEach(dom(".menu-trigger", navBarElement, []), (el) => {
  9122. el.addEventListener("mousemove", function(e) {
  9123. e.stopPropagation();
  9124. const menu = el.lastElementChild;
  9125. const elRect = el.getBoundingClientRect();
  9126. const menuCoord = getFloatCoord(menu, { x: elRect.left + elRect.width / 2, y: 0 }, "middle");
  9127. menu.style.left = `${menuCoord.x}px`;
  9128. menu.style.top = "48px";
  9129. });
  9130. });
  9131. }
  9132. switch (props.hideMode) {
  9133. case "alwaysFold":
  9134. teiggerHide.value = true;
  9135. break;
  9136. case "fold":
  9137. case "hideWhenScroll": {
  9138. const modeClass = props.hideMode === "fold" ? "fold" : "hide";
  9139. const threshold = 50, timeout2 = 1e3;
  9140. let lastScrollY = window.scrollY;
  9141. let timer = -1;
  9142. const handle = _2.throttle(function() {
  9143. var _a, _b;
  9144. if (window.scrollY > lastScrollY + threshold) {
  9145. (_a = navBar.value) == null ? undefined : _a.classList.add(modeClass);
  9146. teiggerHide.value = true;
  9147. clearTimeout(timer);
  9148. } else if (window.scrollY < lastScrollY - threshold) {
  9149. (_b = navBar.value) == null ? undefined : _b.classList.remove(modeClass);
  9150. teiggerHide.value = false;
  9151. clearTimeout(timer);
  9152. } else {
  9153. clearTimeout(timer);
  9154. timer = setTimeout(handle, timeout2);
  9155. }
  9156. lastScrollY = window.scrollY;
  9157. });
  9158. window.addEventListener("scroll", handle);
  9159. break;
  9160. }
  9161. }
  9162. }
  9163. async function login() {
  9164. const loginButton = dom(".u_login");
  9165. const directLoginButton = dom("#TANGRAM__PSP_24__submit");
  9166. if (directLoginButton) {
  9167. const confirmDirect = await messageBox({
  9168. title: "快速登录(不可用)",
  9169. content: "检测到快速登录(不可用)入口,是否尝试直接登录(不可用)?",
  9170. type: "okCancel"
  9171. });
  9172. if (confirmDirect === "positive") {
  9173. directLoginButton.click();
  9174. } else {
  9175. regularLogin();
  9176. }
  9177. } else {
  9178. regularLogin();
  9179. }
  9180. function regularLogin() {
  9181. var _a;
  9182. loginButton ? (_a = dom("a", loginButton)) == null ? undefined : _a.click() : cannotLogin();
  9183. }
  9184. function cannotLogin() {
  9185. toast({ message: "未检测到可用的登录(不可用)入口,请刷新重试", type: "warning" });
  9186. }
  9187. }
  9188. function loadNavMenuContent() {
  9189. middleMenu.value = {
  9190. "消息": [
  9191. {
  9192. title: "查看私信",
  9193. href: "/im/pcmsg"
  9194. },
  9195. {
  9196. title: "查看回复",
  9197. href: `/i/sys/jump?u=${userPortrait.value}&type=replyme`
  9198. },
  9199. {
  9200. title: "查看 @",
  9201. href: `/i/sys/jump?u=${userPortrait.value}&type=atme`
  9202. },
  9203. "separator",
  9204. {
  9205. title: "查看好友申请",
  9206. href: `/i/sys/jump?u=${userPortrait.value}&type=friendapply`
  9207. },
  9208. {
  9209. title: "查看新粉丝",
  9210. href: `/i/sys/jump?u=${userPortrait.value}&type=fans`
  9211. },
  9212. "separator",
  9213. {
  9214. title: "我的收藏",
  9215. href: `/i/sys/jump?u=${userPortrait.value}&type=storethread`
  9216. },
  9217. {
  9218. title: "我的通知",
  9219. href: "/sysmsg/index?type=notity"
  9220. }
  9221. ],
  9222. "更多": [
  9223. {
  9224. title: "账号设置",
  9225. href: "//passport.baidu.com/?center&tpl=tb&aid=6&default_tab=3#3,0"
  9226. },
  9227. {
  9228. title: "贴吧设置",
  9229. href: `/home/profile?un=${PageData.user.name_url}`
  9230. },
  9231. "separator",
  9232. {
  9233. title: "服务中心",
  9234. href: "//tieba.baidu.com/pmc"
  9235. },
  9236. {
  9237. title: "问题反馈",
  9238. href: "//tieba.baidu.com/hermes/feedback"
  9239. }
  9240. ]
  9241. };
  9242. userMenu.value = [
  9243. {
  9244. title: "我的贴吧",
  9245. href: `/home/main?id=${userPortrait.value}&fr=userbar`
  9246. },
  9247. {
  9248. title: "我的收藏",
  9249. href: `/i/sys/jump?un=${PageData.user.user_name}${PageData.user.name_url}&type=storethread&st_mod=userbar&fr=tb0_pb`
  9250. }
  9251. ];
  9252. PageData.user.is_login ? userMenu.value.push("separator", {
  9253. title: "退出登录(不可用)",
  9254. click() {
  9255. var _a;
  9256. const logoutButton = dom(".u_logout");
  9257. if (logoutButton) {
  9258. (_a = dom("a", logoutButton)) == null ? undefined : _a.click();
  9259. } else {
  9260. toast({ message: "未检测到退出登录(不可用)入口,请刷新重试。", type: "warning" });
  9261. }
  9262. }
  9263. }) : userMenu.value.push("separator", {
  9264. title: "登录(不可用)",
  9265. click() {
  9266. login();
  9267. }
  9268. });
  9269. extendMenu.value = [
  9270. {
  9271. title: "脚本设置",
  9272. click() {
  9273. renderDialog(Settings);
  9274. }
  9275. },
  9276. {
  9277. title: "检查更新",
  9278. click() {
  9279. checkUpdateAndNotify(true);
  9280. }
  9281. },
  9282. "separator",
  9283. {
  9284. title: "源代码仓库",
  9285. innerText: "GitHub",
  9286. href: GithubRepo
  9287. },
  9288. {
  9289. title: "源代码仓库",
  9290. innerText: "Gitee",
  9291. href: GiteeRepo
  9292. },
  9293. {
  9294. title: "切换至 GreasyFork",
  9295. href: "https://gf.qytechs.cn/zh-CN/scripts/486367"
  9296. }
  9297. ];
  9298. }
  9299. return (_ctx, _cache) => {
  9300. return vue.openBlock(), vue.createElementBlock("nav", {
  9301. ref_key: "navBar",
  9302. ref: navBar,
  9303. id: "nav-bar",
  9304. class: vue.normalizeClass(["nav-bar remove-default", { "fold": _ctx.hideMode === "alwaysFold", "blur-effect": !vue.unref(experimental).get().rasterEffect, "raster-effect": vue.unref(experimental).get().rasterEffect, "fixed-on-top": _ctx.hideMode === "fixedOnTop" }])
  9305. }, [
  9306. vue.withDirectives(vue.createElementVNode("div", _hoisted_1, null, 512), [
  9307. [vue.vShow, teiggerHide.value]
  9308. ]),
  9309. vue.createElementVNode("div", _hoisted_2, [
  9310. vue.createElementVNode("div", _hoisted_3, [
  9311. vue.createVNode(_sfc_main$q, {
  9312. class: "nav-button nav-title-container",
  9313. "is-anchor": "",
  9314. href: "/",
  9315. "no-border": "all"
  9316. }, {
  9317. default: vue.withCtx(() => [
  9318. vue.createElementVNode("img", {
  9319. src: vue.unref(getResource)("/assets/images/main/icon64.png"),
  9320. alt: "",
  9321. class: "nav-icon"
  9322. }, null, 8, _hoisted_4),
  9323. _cache[0] || (_cache[0] = vue.createElementVNode("p", { class: "nav-title" }, "贴吧", -1))
  9324. ]),
  9325. _: 1
  9326. })
  9327. ]),
  9328. vue.createElementVNode("div", _hoisted_5, [
  9329. vue.createElementVNode("div", _hoisted_6, [
  9330. (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(middleMenu.value, (menu, key) => {
  9331. return vue.openBlock(), vue.createBlock(_sfc_main$q, {
  9332. key,
  9333. class: "menu-trigger middle-menu-trigger",
  9334. "no-border": "all"
  9335. }, {
  9336. default: vue.withCtx(() => [
  9337. vue.createTextVNode(vue.toDisplayString(key) + " ", 1),
  9338. vue.createVNode(DropdownMenu, {
  9339. class: "nav-menu",
  9340. "menu-items": menu
  9341. }, null, 8, ["menu-items"])
  9342. ]),
  9343. _: 2
  9344. }, 1024);
  9345. }), 128))
  9346. ]),
  9347. vue.createVNode(_sfc_main$q, {
  9348. class: "nav-button menu-trigger avatar-button",
  9349. "no-border": "all"
  9350. }, {
  9351. default: vue.withCtx(() => [
  9352. vue.createElementVNode("img", {
  9353. ref_key: "navAvatar",
  9354. ref: navAvatar,
  9355. class: "nav-avatar"
  9356. }, null, 512),
  9357. vue.createVNode(DropdownMenu, {
  9358. class: "nav-menu",
  9359. "menu-items": userMenu.value
  9360. }, null, 8, ["menu-items"])
  9361. ]),
  9362. _: 1
  9363. }),
  9364. vue.createVNode(_sfc_main$q, {
  9365. class: "nav-button menu-trigger menu-button",
  9366. "shadow-border": "",
  9367. "no-border": "all"
  9368. }, {
  9369. default: vue.withCtx(() => [
  9370. _cache[1] || (_cache[1] = vue.createElementVNode("div", { class: "icon" }, "menu", -1)),
  9371. vue.createVNode(DropdownMenu, {
  9372. class: "nav-menu",
  9373. "menu-items": extendMenu.value
  9374. }, null, 8, ["menu-items"])
  9375. ]),
  9376. _: 1
  9377. })
  9378. ])
  9379. ])
  9380. ], 2);
  9381. };
  9382. }
  9383. });
  9384. const navBarVue = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-b4e7e126"]]);
  9385. const navBarCSS = "#com_userbar {\n display: none;\n}";
  9386. async function _navBar() {
  9387. _GM_addStyle(navBarCSS);
  9388. const elder = await asyncdom("#com_userbar");
  9389. const navWrapper = vue.createVNode("div", {
  9390. "id": "nav-wrapper",
  9391. "class": "nav-wrapper"
  9392. }, null);
  9393. insertJSX(navWrapper, document.body, elder);
  9394. renderComponent(navBarVue, await asyncdom("#nav-wrapper"));
  9395. }
  9396. const index$4 = {
  9397. id: "remixed-theme",
  9398. name: "Tieba Remix 主题",
  9399. author: "锯条",
  9400. version: "0.3",
  9401. brief: "更现代的主题样式",
  9402. description: `包含新的样式、昼夜主题及其自动切换等功能`,
  9403. scope: true,
  9404. runAt: "immediately",
  9405. entry: main$1
  9406. };
  9407. function main$1() {
  9408. _navBar();
  9409. overwriteCSS(floatBarStyle);
  9410. fadeInElems.push(".tbui_aside_float_bar .svg-container");
  9411. fadeInElems.push(".d_badge_bright .d_badge_lv, .user_level .badge_index");
  9412. fadeInElems.forEach((selector) => {
  9413. injectCSSRule(selector, {
  9414. opacity: "0"
  9415. });
  9416. });
  9417. setCustomBackground();
  9418. document.addEventListener("DOMContentLoaded", () => {
  9419. dom(".post-tail-wrap .icon-jubao", []).forEach((elem) => {
  9420. elem.removeAttribute("src");
  9421. elem.after("举报");
  9422. });
  9423. threadFloorsObserver.addEvent(() => {
  9424. dom(".d_badge_lv", []).forEach((elem) => {
  9425. if (elem.textContent === "") {
  9426. let parent = elem;
  9427. while (!parent.classList.contains("l_badge")) {
  9428. if (parent.parentElement)
  9429. parent = parent.parentElement;
  9430. }
  9431. parent.style.display = "none";
  9432. }
  9433. });
  9434. });
  9435. });
  9436. window.addEventListener("load", () => {
  9437. fadeInLoad(".tbui_aside_float_bar .svg-container");
  9438. threadFloorsObserver.addEvent(() => {
  9439. const lvlClassHead = "tieba-lvl-";
  9440. const lvlGreen = `${lvlClassHead}green`;
  9441. const lvlBlue = `${lvlClassHead}blue`;
  9442. const lvlYellow = `${lvlClassHead}yellow`;
  9443. const lvlOrange = `${lvlClassHead}orange`;
  9444. dom(
  9445. ".d_badge_bawu1 .d_badge_lv, .d_badge_bawu2 .d_badge_lv, .badge_index",
  9446. []
  9447. ).forEach((elem) => {
  9448. if (elem.className.indexOf(lvlClassHead) !== -1) return;
  9449. const lvl = parseInt(_2.defaults(elem.textContent, "0"));
  9450. if (lvl >= 1 && lvl <= 3) {
  9451. elem.classList.add(lvlGreen);
  9452. } else if (lvl >= 4 && lvl <= 9) {
  9453. elem.classList.add(lvlBlue);
  9454. } else if (lvl >= 10 && lvl <= 15) {
  9455. elem.classList.add(lvlYellow);
  9456. } else if (lvl >= 16) {
  9457. elem.classList.add(lvlOrange);
  9458. }
  9459. });
  9460. fadeInLoad(".d_badge_bright .d_badge_lv, .user_level .badge_index");
  9461. });
  9462. });
  9463. }
  9464. const index$5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  9465. __proto__: null,
  9466. default: index$4
  9467. }, Symbol.toStringTag, { value: "Module" }));
  9468. const index$2 = {
  9469. id: "tieba-tags",
  9470. name: "楼中楼标签",
  9471. author: "锯条",
  9472. version: "2.0.1",
  9473. brief: "优化楼中楼浏览体验",
  9474. description: `为楼中楼的楼主、层主等用户添加特殊标签`,
  9475. scope: ["thread"],
  9476. runAt: "loaded",
  9477. entry: main
  9478. };
  9479. function main() {
  9480. const TAGGED = "is-tagged";
  9481. const TB_TAG = "tag-elem";
  9482. const MY_TAG = "tieba-tags-me";
  9483. const LZ_TAG = "tieba-tags-lz";
  9484. const CZ_TAG = "tieba-tags-cz";
  9485. const louzhu = PageData.thread.author;
  9486. const myPortrait = PageData.user.portrait;
  9487. const myUserName = PageData.user.user_name;
  9488. let louzhuPortrait = getLouzhuPortrait(document);
  9489. (async () => {
  9490. if (!louzhuPortrait) {
  9491. const response = await fetch(location.href.split("?")[0], {
  9492. mode: "cors",
  9493. credentials: "include"
  9494. });
  9495. if (response.ok) {
  9496. await response.text().then((value) => {
  9497. const fpDOC = new DOMParser().parseFromString(value, "text/html");
  9498. louzhuPortrait = getLouzhuPortrait(fpDOC);
  9499. });
  9500. }
  9501. }
  9502. })().then(() => {
  9503. threadCommentsObserver.addEvent(createTagsAll);
  9504. });
  9505. function getLouzhuPortrait(doc) {
  9506. const j_tags = doc.getElementsByClassName("j_louzhubiaoshi");
  9507. if (j_tags.length > 0) {
  9508. const targetFloor = findParent(j_tags[0], "l_post_bright");
  9509. if (targetFloor) {
  9510. const dataAttr = targetFloor.getAttribute("data-field");
  9511. if (dataAttr) {
  9512. const dataField = JSON.parse(dataAttr);
  9513. return _2.split(dataField.author.portrait, "?")[0];
  9514. }
  9515. }
  9516. }
  9517. return undefined;
  9518. }
  9519. function createTagsAll() {
  9520. _2.forEach(dom(".lzl_cnt .at", []), (elem) => {
  9521. if (elem.classList.contains(TAGGED)) return;
  9522. elem.classList.add(TAGGED);
  9523. let isLouzhu = false;
  9524. let isMe = false;
  9525. const username = elem.getAttribute("username");
  9526. if (userClassify(myUserName, myPortrait)) {
  9527. isMe = true;
  9528. addTag(elem, MY_TAG);
  9529. }
  9530. if (!isMe) {
  9531. if (userClassify(louzhu, louzhuPortrait)) {
  9532. isLouzhu = true;
  9533. addTag(elem, LZ_TAG);
  9534. }
  9535. }
  9536. if (!isMe && !isLouzhu) {
  9537. const floor = findParent(elem, "l_post_bright");
  9538. if (floor) {
  9539. const cengzhuCard = floor.getElementsByClassName("p_author_name")[0];
  9540. const cengzhu = cengzhuCard.textContent;
  9541. if (cengzhu) {
  9542. if (elem.textContent === cengzhu) {
  9543. addTag(elem, CZ_TAG);
  9544. }
  9545. }
  9546. }
  9547. }
  9548. function userClassify(un, portrait) {
  9549. if (username === un && un !== "") {
  9550. return true;
  9551. } else if (_2.indexOf(["", " "], username) !== -1) {
  9552. const targetPortrait = elem.getAttribute("portrait");
  9553. if (targetPortrait && portrait) {
  9554. if (targetPortrait === portrait) {
  9555. return true;
  9556. }
  9557. } else {
  9558. return dataClassify();
  9559. }
  9560. } else if (!username) {
  9561. return dataClassify();
  9562. }
  9563. return false;
  9564. function dataClassify() {
  9565. const dataAttr = elem.getAttribute("data-field");
  9566. if (dataAttr) {
  9567. const dataField = JSON.parse(dataAttr.replace(/'/g, '"'));
  9568. if (portrait) {
  9569. if (dataField.id === portrait) {
  9570. return true;
  9571. }
  9572. } else {
  9573. if (dataField.un === un) {
  9574. return true;
  9575. }
  9576. }
  9577. }
  9578. return false;
  9579. }
  9580. }
  9581. });
  9582. function addTag(elem, className) {
  9583. elem.appendChild(
  9584. domrd("div", {
  9585. class: `${TB_TAG} ${className}`
  9586. })
  9587. );
  9588. }
  9589. }
  9590. }
  9591. const index$3 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  9592. __proto__: null,
  9593. default: index$2
  9594. }, Symbol.toStringTag, { value: "Module" }));
  9595. const index = {
  9596. id: "toolkit",
  9597. name: "实用工具库",
  9598. author: "锯条",
  9599. version: "1.1",
  9600. brief: "优化原版贴吧体验的一组功能",
  9601. description: "这是一个轻量级的工具库,包含了诸如自动展开长图等实用功能。",
  9602. scope: true,
  9603. runAt: "immediately",
  9604. settings: {
  9605. autoExpand: {
  9606. title: "自动展开长图",
  9607. widgets: [{
  9608. type: "toggle",
  9609. content: `该功能会自动将帖子中所有的长图片自动展开,无需手动操作`,
  9610. init: () => toolkitToggles.get().autoExpand,
  9611. event() {
  9612. toolkitToggles.merge({ autoExpand: !toolkitToggles.get().autoExpand });
  9613. }
  9614. }]
  9615. },
  9616. reloadAvatars: {
  9617. title: "重新加载错误头像",
  9618. widgets: [{
  9619. type: "toggle",
  9620. content: `原版贴吧的帖子页面时常会出现加载失败的头像,本功能可以将这些无法正常显示的头像资源链接到正常的 URL`,
  9621. init: () => toolkitToggles.get().reloadAvatars,
  9622. event() {
  9623. toolkitToggles.merge({ reloadAvatars: !toolkitToggles.get().reloadAvatars });
  9624. }
  9625. }]
  9626. }
  9627. },
  9628. entry: function() {
  9629. for (const key in toolkitFeatures) {
  9630. const k = key;
  9631. if (toolkitToggles.get()[k]) toolkitFeatures[k]();
  9632. }
  9633. }
  9634. };
  9635. const toolkitFeatures = {
  9636. /** 自动展开长图 */
  9637. autoExpand() {
  9638. threadFloorsObserver.addEvent(() => {
  9639. _2.forEach(dom(".replace_tip", []), (el) => {
  9640. el.click();
  9641. });
  9642. });
  9643. },
  9644. /** 重新加载错误头像 */
  9645. reloadAvatars() {
  9646. const observer = new IntersectionObserver(function(entries) {
  9647. _2.forEach(entries, (entry) => {
  9648. if (entry.isIntersecting) {
  9649. const avatar = entry.target;
  9650. if (!avatar.complete) return;
  9651. if (avatar.naturalWidth > 0) {
  9652. avatar.setAttribute("data-loaded", "");
  9653. } else {
  9654. const userCard = findParent(avatar, "j_user_card");
  9655. if (!userCard) return;
  9656. const dataField = userCard.getAttribute("data-field");
  9657. if (!dataField) return;
  9658. const portarit = JSON.parse(dataField.replaceAll(/'/g, '"')).id;
  9659. avatar.src = tiebaAPI.URL_profile(portarit);
  9660. avatar.setAttribute("data-loaded", "");
  9661. }
  9662. }
  9663. });
  9664. }, { threshold: 0 });
  9665. threadCommentsObserver.addEvent(function() {
  9666. const avatars = dom(".lzl_single_post img:not(.BDE_Smiley, [data-loaded])", []);
  9667. avatars.forEach((avatar) => observer.observe(avatar));
  9668. });
  9669. }
  9670. };
  9671. const toolkitToggles = new UserKey("toolkitToggles", {
  9672. autoExpand: true,
  9673. reloadAvatars: true
  9674. });
  9675. const index$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  9676. __proto__: null,
  9677. default: index
  9678. }, Symbol.toStringTag, { value: "Module" }));
  9679. })(_, Vue, marked);
  9680.  
  9681. })();

QingJ © 2025

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