🏠 Home 

linuxdo 增强插件

linux.do 增强插件,功能持续更新,欢迎提出新想法!


安装此脚本?
  1. // ==UserScript==
  2. // @name linuxdo 增强插件
  3. // @namespace https://github.com/dlzmoe/linuxdo-scripts
  4. // @version 0.4.10
  5. // @author dlzmoe
  6. // @description linux.do 增强插件,功能持续更新,欢迎提出新想法!
  7. // @license MIT
  8. // @icon https://linux.do/uploads/default/optimized/3X/9/d/9dd49731091ce8656e94433a26a3ef36062b3994_2_32x32.png
  9. // @match *://linux.do/*
  10. // @require https://unpkg.com/vue@3.5.13/dist/vue.global.prod.js
  11. // @require https://unpkg.com/jquery@3.7.1/dist/jquery.min.js
  12. // @require https://unpkg.com/pangu@4.0.7/dist/browser/pangu.js
  13. // @require https://unpkg.com/marked@14.1.4/marked.min.js
  14. // @grant GM_addStyle
  15. // @grant GM_xmlhttpRequest
  16. // ==/UserScript==
  17. (t=>{if(typeof GM_addStyle=="function"){GM_addStyle(t);return}const i=document.createElement("style");i.textContent=t,document.head.append(i)})(' .emojiPicker{top:0;left:100%;position:absolute;display:grid;grid-template-columns:repeat(12,1fr);gap:10px;height:100%;overflow:auto;background-color:#000c;padding:10px;border-radius:5px;z-index:9}.emojiPicker img{cursor:pointer;width:30px;height:30px}.sidebar-section-header-caret.right{transform:rotate(-90deg)}.item select[data-v-d780d688]{height:28px;border:1px solid #b6b6b6;border-radius:4px;width:180px;margin-left:10px;cursor:pointer}.item[data-v-e33f1de9]{border:none!important}.item a[data-v-e33f1de9]:hover{text-decoration:underline}.item[data-v-cb743585],.item[data-v-97d36adb],.item[data-v-7dffe7ad],.item[data-v-7877f446]{border:none!important}input[type=text][data-v-ac149a76]{width:100px!important;outline:none;height:24px;border:1px solid #b6b6b6;border-radius:4px;margin-left:10px;padding:0 10px;box-sizing:border-box}.linxudoscripts-tag{background:#29a6a9;color:#fff;font-size:14px!important;padding:0 10px;height:26px;text-align:center;display:inline-flex!important;align-items:center;justify-content:center;border-radius:5px}.menu-table{width:100%}.menu-table td,.menu-table th{padding:10px;font-size:14px}.menu-table .span{cursor:pointer}.menu-table .span+.span{margin-left:10px}.item[data-v-d1d5d03b]{border:none}.item[data-v-b5335091]{display:block!important}p[data-v-b5335091]{margin:8px 0!important}ul[data-v-b5335091]{display:flex;flex-wrap:wrap;justify-content:space-between;list-style:none;padding:0}ul li[data-v-b5335091]{width:48%;margin-bottom:30px}input[type=radio][data-v-b5335091]{transform:scale(1.2)}.ls-flex[data-v-b5335091]{display:flex;align-content:center;margin-bottom:10px;cursor:pointer}.ls-flex input[data-v-b5335091]{margin-right:10px}.ls-flex label[data-v-b5335091]{cursor:pointer;font-weight:300}.item[data-v-11333de1]{border:none!important;padding:0!important;margin-top:15px;position:relative}.item .tit[data-v-11333de1]{white-space:nowrap;width:160px}.item input[data-v-11333de1]{margin:0;width:100%}.item em[data-v-11333de1]{position:absolute;right:10px;top:50%;transform:translateY(-50%);cursor:pointer;display:flex;align-items:center;justify-content:center}.item em svg[data-v-11333de1]{color:#999}.item .lxwebdavpassword[data-v-11333de1]{filter:blur(5px)}.item .lxwebdavpassword.act[data-v-11333de1]{filter:none}.btnwrapper[data-v-11333de1]{margin-top:20px}.post-stream.lookopwrapactive .topic-post{display:none!important}.post-stream.lookopwrapactive .topic-post.topic-owner{display:block!important}.el-button.act[data-v-6520db1a]{background:linear-gradient(to right,var(--tertiary-low),var(--tertiary-high))!important}@keyframes breathAnimation-82d039ba{0%,to{transform:scale(1);box-shadow:0 0 5px #00000080}50%{transform:scale(1.1);box-shadow:0 0 10px #000000b3}}.breath-animation[data-v-82d039ba]{animation:breathAnimation-82d039ba 4s ease-in-out infinite}.minimized[data-v-82d039ba]{width:50px!important;height:50px!important;border-radius:50%!important;padding:0!important;overflow:hidden;cursor:pointer}#linuxDoLevelPopupContent[data-v-82d039ba]{line-height:1.6;position:fixed;bottom:20px;right:90px;width:250px;height:auto;background-color:var(--tertiary-low);padding:15px;z-index:10000;font-size:14px;border-radius:5px}#linuxDoUserSearch[data-v-82d039ba]{width:100%;margin-top:10px}.button[data-v-82d039ba]{margin-top:10px}.minimize-button[data-v-82d039ba]{position:absolute;top:5px;right:5px;z-index:10001;background:transparent;border:none;cursor:pointer;border-radius:50%;text-align:center;line-height:40px;width:40px;height:40px}.linuxdoscripts-aidialog{position:fixed;top:0;left:-100%;width:500px;height:100vh;background:#fff;box-shadow:1px 2px 5px #0000003d;z-index:999;padding-top:60px;transition:all .1s linear;opacity:0;visibility:hidden;overflow:hidden}.linuxdoscripts-aidialog.act{left:0;opacity:1;visibility:inherit;overflow:inherit}a[data-v-17d52b22]:hover{text-decoration:underline}.item-foot[data-v-17d52b22]{display:flex;flex-direction:column;align-items:flex-start;position:absolute;bottom:70px;left:22px;line-height:2}.item-foot span[data-v-17d52b22]{margin-bottom:2px}.UsageTip{position:static;margin:0;font-size:14px;line-height:1.6;background:var(--d-sidebar-background);color:var(--primary-medium)}.UsageTip>div{margin:10px 0}.UsageTip button{padding:8px 10px;margin-bottom:10px;border:none;outline:none;border-radius:4px}.menu-body[data-v-9114409e]{padding:0 15px}.inner[data-v-9114409e]{display:flex;align-items:center;margin-bottom:10px}.inner label[data-v-9114409e]{width:70px;font-weight:400}.inner input[data-v-9114409e]{flex:1;margin:0;max-width:300px}.timeline-container .topic-timeline .timeline-scrollarea{max-width:100px!important}#linuxdoscripts{font-size:14px}#linuxdoscripts input[type=text]{width:100%;background:var(--d-input-bg-color)}#linuxdoscripts input[type=checkbox]{transform:scale(1.2)}#linuxdoscripts #menu_suspendedball{display:none}#linuxdoscripts img{vertical-align:bottom;max-width:100%;height:auto}#linuxdoscripts .close{position:absolute;right:10px;top:45%;cursor:pointer;font-size:34px;color:#999;transform:translateY(-50%) rotate(45deg)}#linuxdoscripts .setting-btn{z-index:199;position:fixed;bottom:20px;right:20px}#linuxdoscripts .setting-btn .el-button{margin:15px 0 0;width:50px;height:50px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:var(--tertiary-low);font-size:14px;cursor:pointer;border:none}#linuxdoscripts .setting-btn .el-button svg{margin:0}#linuxdoscripts .setting-btn .el-button:hover{opacity:.9}#linuxdoscripts .hint{margin-top:5px;color:#d94f4f;font-size:14px}#linuxdoscripts dialog{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);width:700px;max-width:100vw;background:var(--header_background);color:var(--primary);box-shadow:0 8px 32px #0000001a;border-radius:16px;padding:15px;z-index:99999;overflow-x:hidden;box-sizing:border-box;margin:0;border:none;outline:none}#linuxdoscripts dialog .menu-about{padding:5px 0;line-height:2}#linuxdoscripts dialog .menu-about .initialization{color:#999;border-bottom:1px dashed #999;cursor:pointer}#linuxdoscripts dialog .menu-about .initialization:hover{color:#333;border-color:#333}#linuxdoscripts dialog p{margin:0;font-size:14px}#linuxdoscripts .menu-header{padding:.5rem .5rem 1rem;border-bottom:1px solid #eee;position:relative}#linuxdoscripts .title{font-size:18px;font-weight:600;display:flex;align-items:center}#linuxdoscripts .title img{margin-left:10px}#linuxdoscripts button{padding:10px 16px;border-radius:8px;font-size:14px;font-weight:500;cursor:pointer;transition:all .2s ease;border:none;display:inline-flex;align-items:center;justify-content:center;background-color:var(--primary-low)}#linuxdoscripts button+button{margin-left:8px}#linuxdoscripts button.saveload{background:#000;color:#fff}#linuxdoscripts button:hover{opacity:.9}#linuxdoscripts .menu-flex{display:flex;justify-content:space-between;align-items:flex-start}#linuxdoscripts .menu-nav{width:140px;display:flex;flex-direction:column;margin:0 20px 0 0;padding-top:15px}#linuxdoscripts .menu-nav li{border-radius:4px;height:32px;width:100%;margin-bottom:5px;box-sizing:border-box;padding:0 10px;display:inline-flex;align-items:center;justify-content:flex-start;font-size:14px;cursor:pointer;line-height:1}#linuxdoscripts .menu-nav li svg{width:16px;margin-right:5px}#linuxdoscripts .menu-nav li.act{background:var(--d-selected)}#linuxdoscripts .menu-body{flex:1;height:480px;overflow-y:auto;padding-right:10px}#linuxdoscripts .menu-body::-webkit-scrollbar{height:8px;width:8px}#linuxdoscripts .menu-body::-webkit-scrollbar-corner{background:none}#linuxdoscripts .menu-body::-webkit-scrollbar-thumb{background:#dee0e1;border-radius:8px}#linuxdoscripts .menu-body .menu-body-item{display:none}#linuxdoscripts .menu-body .menu-body-item.act{display:block}#linuxdoscripts .menu-footer{display:flex;margin-top:10px;padding-top:6px}#linuxdoscripts .import{margin-left:auto!important}#linuxdoscripts .import,#linuxdoscripts .export{background:#d1f0ff;color:#559095}#linuxdoscripts .floorlottery{background:#ffb003}#linuxdoscripts .menu-body-item{padding-bottom:30px}#linuxdoscripts .menu-body-item .item{border-bottom:1px solid rgba(0,0,0,.05);padding:15px 0;display:flex;align-items:center;justify-content:space-between}#linuxdoscripts .menu-body-item .item .tit{height:100%;display:flex;align-items:center}#linuxdoscripts .menu-body-item .item input,#linuxdoscripts .menu-body-item .item select{margin-top:0;margin-bottom:0}#linuxdoscripts .menu-body-item .item input[type=checkbox]{width:30px;height:16px;position:relative;background-color:#dcdfe6;box-shadow:#dfdfdf 0 0 inset;border-radius:20px;background-clip:content-box;display:inline-block;appearance:none;-webkit-appearance:none;-moz-appearance:none;-webkit-user-select:none;user-select:none;outline:none;padding:0}#linuxdoscripts .menu-body-item .item input[type=checkbox]:before{content:"";position:absolute;width:12px;height:12px;background-color:#fff;border-radius:50%;left:2px;top:0;bottom:0;margin:auto;transition:.3s}#linuxdoscripts .menu-body-item .item input[type=checkbox]:checked{background-color:var(--tertiary);transition:.6s}#linuxdoscripts .menu-body-item .item input[type=checkbox]:checked:before{left:14px;transition:.3s}#linuxdoscripts textarea{font-family:inherit;width:100%;min-height:100px!important;border:1px solid #999;outline:0;padding:5px;font-size:14px;margin:5px 0 0;resize:none;border-radius:0;color:var(--d-input-text-color);background:var(--d-input-bg-color)}#linuxdoscripts textarea:focus{border-color:var(--tertiary);outline:2px solid var(--tertiary);outline-offset:-2px}#linuxdoscripts #floorlotterloading img{width:50px;height:50px}#linuxdoscripts .floorlotterywrap{display:none;width:400px;height:300px;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);margin:0;z-index:999}#linuxdoscripts .floorlotterywrap{width:400px;height:300px}#linuxdoscripts .el-checkbox__inner{border:1px solid #979797}#linuxdoscripts label{margin:0}.linuxdoscripts-opacity{display:none;position:fixed;left:0;top:0;width:100vw;height:100vh;background:#00000080;z-index:9999}.linuxlevel.four{background:linear-gradient(to right,red,#00f);-webkit-background-clip:text;color:transparent}.topic-post{position:relative}.linuxfloor{display:flex;color:var(--tertiary);width:30px;height:30px;align-items:center;justify-content:center;border-radius:6px;font-size:16px;margin-left:10px}.signature-p{color:#279a36;font-size:14px;word-break:break-word}.topic-list .views{font-weight:400!important;white-space:nowrap!important}.createreply{display:flex;flex-direction:column;max-width:300px}.createreply button{margin-bottom:10px;justify-content:flex-start;text-align:left}.topicpreview-btn,.donottopic-btn{padding:4px 12px!important;font-size:14px!important;opacity:0!important;margin-right:5px!important}.topic-list-item:hover .topicpreview-btn,.topic-list-item:hover .donottopic-btn{opacity:1!important}.topicpreview{position:fixed;top:0;left:0;z-index:99999;width:100vw;height:100vh;display:flex;justify-content:center;align-items:center;display:none}.topicpreview .topicpreview-container{padding:30px 0;border-radius:5px;width:100%;max-width:800px;overflow-y:auto;height:80vh;z-index:10;background:var(--header_background);position:absolute;left:50%;top:50%;transform:translate(-50%,-50%)}.topicpreview .topicpreview-container .topicpreview-title{font-size:22px;font-weight:600;padding:0 30px}.topicpreview .topicpreview-container .topicpreview-date{padding:0 30px;color:#666}.topicpreview .topicpreview-container .topicpreview-content>.item{display:flex;align-items:flex-start;padding:20px 30px}.topicpreview .topicpreview-container .topicpreview-content>.item .itemfloor{width:50px;text-align:left;font-size:16px;padding-top:15px;color:#25b4cf}.topicpreview .topicpreview-container .topicpreview-content>.item .itempost{flex:1;background:var(--tertiary-low);padding:15px;border-radius:10px;font-size:15px;word-break:break-all}.topicpreview .topicpreview-container .topicpreview-content>.item .itempost pre code{max-width:620px}.topicpreview .topicpreview-container .topicpreview-content>.item .itempost img{max-width:100%;max-height:100%;height:auto}.topicpreview .topicpreview-container .topicpreview-content>.item .itempost .itemname{font-size:16px;color:#8f3a3a;display:flex;justify-content:space-between;align-items:center}.topicpreview .topicpreview-container .topicpreview-content>.item .itempost .itemname span{color:#9e9e9e;margin-left:20px}.topicpreview .topicpreview-container .topicpreview-content>.item .itempost .itemdate{color:#b9b9b9;font-size:16px;margin-left:auto}.topicpreview-opacity{position:absolute;top:0;left:0;width:100%;height:100%;opacity:1;background:#0009;z-index:9}.body-preview .sidebar-wrapper{display:none!important}body.body-preview #main-outlet-wrapper{display:block!important;padding-left:50px!important}.body-preview .d-header-wrap,.body-preview .menu_suspendedball{display:none!important}.post-activity{white-space:nowrap;display:inline-block;width:100%;text-align:left}.d-header img{height:var(--d-logo-height);width:auto;max-width:100%;object-fit:contain}.aicreated-btn,.aireplay-btn{outline:none;border:none;background:var(--tertiary-low);display:inline-flex;align-items:center;justify-content:center;line-height:1;font-size:14px;padding:4px 10px;border-radius:3px;margin-bottom:10px;margin-right:10px}.aicreated-btn{display:none}.gpt-summary-wrap{background:var(--tertiary-low);border-radius:5px;padding:10px;font-size:14px;margin:0 0 10px;line-height:1.6}.gpt-summary-wrap .airegenerate{display:none;margin-top:6px;outline:none;border:1px solid #eee;background:#ffe27d;color:#626262;padding:4px 10px;cursor:pointer;border-radius:3px}.aicreatenewtopictitle{margin-left:20px}.aicreatenewtopictitle:hover{text-decoration:underline;cursor:pointer}.aireply-popup{z-index:999999;position:fixed;top:10%;left:50%;transform:translate(-50%);width:500px;padding:20px;background:var(--tertiary-low);color:#333;box-shadow:#0000 0 0,#0000 0 0,#0000001a 0 20px 25px -5px,#0000001a 0 8px 10px -6px;border-radius:10px;display:none}.aireply-popup .aireply-popup-text{width:100%;height:120px}.aireply-popup .aireply-popup-close{outline:0;min-width:80px;height:32px;border:none;background-color:var(--header_background);text-shadow:0 -1px 0 rgba(0,0,0,.12);box-shadow:0 2px #0000000b;border-radius:4px;padding:0 10px;box-sizing:border-box;transition:all .1s linear}#messageToast{z-index:9999999;position:fixed;left:50%;transform:translate(-50%);top:10%;width:100%;display:flex;flex-direction:column;align-items:center}#messageToast .messageToast-text{background:#4caf50;width:auto;display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;text-align:center;line-height:1;height:40px;min-width:240px;font-size:16px;box-sizing:border-box;margin-bottom:10px;opacity:0;animation:messageToast .2s forwards;padding:12px 24px;color:#fff;border-radius:4px;font-size:14px;z-index:9999;box-shadow:0 2px 5px #0003}@keyframes messageToast{0%{transform:translateY(10px);opacity:0}to{transform:translateY(0);opacity:1}}.pangutext{cursor:pointer;margin-left:20px}.pangutext:hover{color:#279a36}.navigation-container.is-active{position:fixed;top:65px;background:var(--header_background);z-index:9;box-shadow:1px 3px 7px #0003;margin-left:-30px;padding-left:30px;border-radius:5px;padding-top:10px;padding-right:20px;min-width:1000px;width:auto}.topic-body.clearfix.highlighted{background-color:var(--tertiary-low)!important}.hotranking-container{position:fixed;right:100px;bottom:20px;background:#fff;box-shadow:1px 10px 20px #0003;border-radius:10px;width:400px;min-height:380px;padding:20px;box-sizing:border-box;z-index:999}.hotranking-container .flex{display:flex;align-items:center;justify-content:space-between;margin-bottom:1rem}.hotranking-container ul li,.hotranking-container ol li{padding:2px 0}.hotranking-container ul li a:hover,.hotranking-container ol li a:hover{text-decoration:underline} ');
  18. (function (vue, pangu, marked, $$1) {
  19. 'use strict';
  20. if (document.getElementById('challenge-form')) {
  21. return;
  22. }
  23. const name = "linuxdo-scripts";
  24. const version = "0.4.10";
  25. const author = "dlzmoe";
  26. const description = "An enhanced script for the linux.do forum";
  27. const type = "module";
  28. const license = "MIT";
  29. const scripts = {
  30. dev: "vite --mode development",
  31. build: "vite build && py build.py",
  32. preview: "vite preview"
  33. };
  34. const dependencies = {
  35. jquery: "^3.7.1",
  36. marked: "^14.1.1",
  37. pangu: "^4.0.7",
  38. vue: "^3.4.27",
  39. webdav: "^5.7.1"
  40. };
  41. const devDependencies = {
  42. "@vitejs/plugin-vue": "^5.0.4",
  43. less: "^4.1.0",
  44. "less-loader": "^8.0.0",
  45. "style-loader": "^2.0.0",
  46. vite: "^5.2.12",
  47. "vite-plugin-monkey": "^4.0.0"
  48. };
  49. const packageJson = {
  50. name,
  51. version,
  52. author,
  53. description,
  54. type,
  55. license,
  56. scripts,
  57. dependencies,
  58. devDependencies
  59. };
  60. const _export_sfc = (sfc, props) => {
  61. const target = sfc.__vccOpts || sfc;
  62. for (const [key, val] of props) {
  63. target[key] = val;
  64. }
  65. return target;
  66. };
  67. const _sfc_main$12 = {
  68. props: ["modelValue", "sort"],
  69. emits: ["update:modelValue"],
  70. data() {
  71. return {
  72. eventListeners: []
  73. };
  74. },
  75. methods: {
  76. creat###perLabel(url, id) {
  77. let a = document.createElement("a");
  78. a.setAttribute("href", url);
  79. a.setAttribute("target", "_blank");
  80. a.setAttribute("id", id);
  81. if (!document.getElementById(id)) {
  82. document.body.appendChild(a);
  83. }
  84. a.click();
  85. },
  86. init() {
  87. this.removeEventListeners();
  88. $(".topic-list a.title,.topic .search-link").each((index, element) => {
  89. const listener = (event) => {
  90. event.preventDefault();
  91. var url = $(element).attr("href");
  92. this.creat###perLabel(url, url);
  93. };
  94. $(element).on("click", listener);
  95. this.eventListeners.push({ element, listener });
  96. });
  97. },
  98. removeEventListeners() {
  99. this.eventListeners.forEach(({ element, listener }) => {
  100. $(element).off("click", listener);
  101. });
  102. this.eventListeners = [];
  103. }
  104. },
  105. created() {
  106. if (this.modelValue) {
  107. let pollinglength1 = 0;
  108. let pollinglength2 = 0;
  109. setInterval(() => {
  110. if (pollinglength1 != $(".topic-list-body tr").length) {
  111. pollinglength1 = $(".topic-list-body tr").length;
  112. this.init();
  113. }
  114. if (pollinglength2 != $(".post-stream .topic-post").length) {
  115. pollinglength2 = $(".post-stream .topic-post").length;
  116. this.init();
  117. }
  118. }, 1e3);
  119. }
  120. },
  121. beforeDestroy() {
  122. this.removeEventListeners();
  123. }
  124. };
  125. const _hoisted_1$Z = { class: "item" };
  126. const _hoisted_2$O = { class: "tit" };
  127. const _hoisted_3$G = ["checked"];
  128. function _sfc_render$12(_ctx, _cache, $props, $setup, $data, $options) {
  129. return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$Z, [
  130. vue.createElementVNode("div", _hoisted_2$O, vue.toDisplayString($props.sort) + ". 是否新标签页打开话题", 1),
  131. vue.createElementVNode("input", {
  132. type: "checkbox",
  133. checked: $props.modelValue,
  134. onChange: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:modelValue", $event.target.checked))
  135. }, null, 40, _hoisted_3$G)
  136. ]);
  137. }
  138. const MenuOpenpostblank = /* @__PURE__ */ _export_sfc(_sfc_main$12, [["render", _sfc_render$12]]);
  139. const _sfc_main$11 = {
  140. props: ["modelValue", "sort"],
  141. emits: ["update:modelValue"],
  142. methods: {
  143. init() {
  144. if ($("#list-area .show-more").length > 0) {
  145. $("head title").html("【有新话题赶紧来水!!】");
  146. }
  147. }
  148. },
  149. created() {
  150. if (this.modelValue) {
  151. setInterval(() => {
  152. this.init();
  153. }, 1e3);
  154. }
  155. }
  156. };
  157. const _hoisted_1$Y = { class: "item" };
  158. const _hoisted_2$N = { class: "tit" };
  159. const _hoisted_3$F = ["checked"];
  160. function _sfc_render$11(_ctx, _cache, $props, $setup, $data, $options) {
  161. return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$Y, [
  162. vue.createElementVNode("div", _hoisted_2$N, vue.toDisplayString($props.sort) + ". 是否开启新话题提醒", 1),
  163. vue.createElementVNode("input", {
  164. type: "checkbox",
  165. checked: $props.modelValue,
  166. onChange: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:modelValue", $event.target.checked))
  167. }, null, 40, _hoisted_3$F)
  168. ]);
  169. }
  170. const MenuNewtopicreminder = /* @__PURE__ */ _export_sfc(_sfc_main$11, [["render", _sfc_render$11]]);
  171. const _sfc_main$10 = {
  172. props: ["modelValue", "sort"],
  173. emits: ["update:modelValue"],
  174. methods: {
  175. init() {
  176. $("nav.post-controls .show-replies").each(function() {
  177. $(this).click();
  178. });
  179. }
  180. },
  181. created() {
  182. if (this.modelValue) {
  183. let pollinglength2 = 0;
  184. setInterval(() => {
  185. if (pollinglength2 != $(".post-stream .topic-post").length) {
  186. pollinglength2 = $(".post-stream .topic-post").length;
  187. this.init();
  188. }
  189. }, 1e3);
  190. }
  191. }
  192. };
  193. const _hoisted_1$X = { class: "item" };
  194. const _hoisted_2$M = { class: "tit" };
  195. const _hoisted_3$E = ["checked"];
  196. function _sfc_render$10(_ctx, _cache, $props, $setup, $data, $options) {
  197. return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$X, [
  198. vue.createElementVNode("div", _hoisted_2$M, vue.toDisplayString($props.sort) + ". 是否自动展开回复", 1),
  199. vue.createElementVNode("input", {
  200. type: "checkbox",
  201. checked: $props.modelValue,
  202. onChange: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:modelValue", $event.target.checked))
  203. }, null, 40, _hoisted_3$E)
  204. ]);
  205. }
  206. const MenuAutoexpandreply = /* @__PURE__ */ _export_sfc(_sfc_main$10, [["render", _sfc_render$10]]);
  207. const _sfc_main$$ = {
  208. props: ["modelValue", "sort"],
  209. emits: ["update:modelValue"],
  210. methods: {
  211. init() {
  212. const tabs = $(".reply-to-tab");
  213. let index = 0;
  214. const clickNext = () => {
  215. if (index >= tabs.length) return;
  216. const tab = $(tabs[index]);
  217. if (!tab.data("clicked")) {
  218. tab.click();
  219. tab.data("clicked", true);
  220. }
  221. index++;
  222. setTimeout(clickNext, 1e3);
  223. };
  224. clickNext();
  225. }
  226. },
  227. created() {
  228. if (this.modelValue) {
  229. setInterval(() => {
  230. if ($(".topic-body .reply-to-tab").length > 0) {
  231. this.init();
  232. }
  233. }, 1e3);
  234. }
  235. }
  236. };
  237. const _hoisted_1$W = { class: "item" };
  238. const _hoisted_2$L = { class: "tit" };
  239. const _hoisted_3$D = ["checked"];
  240. function _sfc_render$$(_ctx, _cache, $props, $setup, $data, $options) {
  241. return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$W, [
  242. vue.createElementVNode("div", _hoisted_2$L, vue.toDisplayString($props.sort) + ". 是否自动展开回复父帖子", 1),
  243. vue.createElementVNode("input", {
  244. type: "checkbox",
  245. checked: $props.modelValue,
  246. onChange: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:modelValue", $event.target.checked))
  247. }, null, 40, _hoisted_3$D)
  248. ]);
  249. }
  250. const MenuAutoexpandreply1 = /* @__PURE__ */ _export_sfc(_sfc_main$$, [["render", _sfc_render$$]]);
  251. const _sfc_main$_ = {
  252. props: ["modelValue", "sort"],
  253. emits: ["update:modelValue"],
  254. methods: {
  255. formattedDate(time) {
  256. const timestamp = Number(time);
  257. const date = new Date(timestamp);
  258. const now = /* @__PURE__ */ new Date();
  259. const isToday = now.getFullYear() === date.getFullYear() && now.getMonth() === date.getMonth() && now.getDate() === date.getDate();
  260. date.getFullYear();
  261. const month = String(date.getMonth() + 1).padStart(2, "0");
  262. const day = String(date.getDate()).padStart(2, "0");
  263. const hours = String(date.getHours()).padStart(2, "0");
  264. const minutes = String(date.getMinutes()).padStart(2, "0");
  265. return isToday ? `${hours}:${minutes}` : `${month}/${day} ${hours}:${minutes}`;
  266. },
  267. convertToTimestamp(dateStr) {
  268. const cleanedDateStr = dateStr.replace(/\s+/g, "");
  269. const datePattern = /(\d{4})年(\d{1,2})月(\d{1,2})日(\d{2}):(\d{2})/;
  270. const dateMatch = cleanedDateStr.match(datePattern);
  271. if (dateMatch) {
  272. const year = parseInt(dateMatch[1], 10);
  273. const month = parseInt(dateMatch[2], 10) - 1;
  274. const day = parseInt(dateMatch[3], 10);
  275. const hours = parseInt(dateMatch[4], 10);
  276. const minutes = parseInt(dateMatch[5], 10);
  277. const date = new Date(year, month, day, hours, minutes);
  278. return date.getTime();
  279. }
  280. return null;
  281. },
  282. setInitDate() {
  283. $(".topic-list .age").each((index, element) => {
  284. const str = $(element).attr("title");
  285. const match = str.match(/创建日期:([\s\S]*?)最新:/);
  286. if (match && match[1]) {
  287. const creationDate = match[1].trim();
  288. const timestamp = this.convertToTimestamp(creationDate);
  289. if ($(element).find(".linuxtime").length < 1) {
  290. const now = (/* @__PURE__ */ new Date()).getTime();
  291. const oneDay = 1e3 * 60 * 60 * 24;
  292. const oneWeek = oneDay * 7;
  293. const oneMonth = oneDay * 30;
  294. const threeMonths = oneMonth * 3;
  295. let color;
  296. const timeDiff = now - timestamp;
  297. if (timeDiff < oneDay) {
  298. color = "#45B5AA";
  299. $(element).find(".post-activity").append(
  300. `<span class="linuxtime" style="color:${color}">(${this.formattedDate(
  301. timestamp
  302. )})</span>`
  303. );
  304. } else if (timeDiff < oneWeek) {
  305. color = "#66A586";
  306. $(element).find(".post-activity").append(
  307. `<span class="linuxtime" style="color:${color}">(${this.formattedDate(
  308. timestamp
  309. )})</span>`
  310. );
  311. } else if (timeDiff < oneMonth) {
  312. color = "#CFA94A";
  313. $(element).find(".post-activity").append(
  314. `<span class="linuxtime" style="color:${color}">(${this.formattedDate(
  315. timestamp
  316. )})</span>`
  317. );
  318. } else if (timeDiff < threeMonths) {
  319. color = "#3e8ed2";
  320. $(element).find(".post-activity").append(
  321. `<span class="linuxtime" style="color:${color}">(${this.formattedDate(
  322. timestamp
  323. )})</span>`
  324. );
  325. } else {
  326. color = "#cccccc";
  327. $(element).find(".post-activity").append(
  328. `<span class="linuxtime" style="color:${color}">
  329. (<img style="width:20px;vertical-align:sub;" src="https://linux.do/uploads/default/original/4X/4/0/8/408c29a1d1dfaada3160fb2ae366cf3a7c7c1696.png">${this.formattedDate(
  330. timestamp
  331. )})
  332. </span>`
  333. );
  334. }
  335. }
  336. }
  337. });
  338. },
  339. initDateAndStartPolling() {
  340. setInterval(() => {
  341. this.setInitDate();
  342. this.startPolling();
  343. }, 1e3);
  344. },
  345. startPolling() {
  346. setInterval(() => {
  347. this.setInitDate();
  348. }, 1e4);
  349. }
  350. },
  351. mounted() {
  352. if (this.modelValue) {
  353. this.startPolling();
  354. this.initDateAndStartPolling();
  355. }
  356. }
  357. };
  358. const _hoisted_1$V = { class: "item" };
  359. const _hoisted_2$K = { class: "tit" };
  360. const _hoisted_3$C = ["checked"];
  361. function _sfc_render$_(_ctx, _cache, $props, $setup, $data, $options) {
  362. return vue.openBlock(), vue.createElementBlock("div", null, [
  363. vue.createElementVNode("div", _hoisted_1$V, [
  364. vue.createElementVNode("div", _hoisted_2$K, vue.toDisplayString($props.sort) + ". 话题列表显示创建时间", 1),
  365. vue.createElementVNode("input", {
  366. type: "checkbox",
  367. checked: $props.modelValue,
  368. onChange: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:modelValue", $event.target.checked))
  369. }, null, 40, _hoisted_3$C)
  370. ])
  371. ]);
  372. }
  373. const MenuShowcreatetime = /* @__PURE__ */ _export_sfc(_sfc_main$_, [["render", _sfc_render$_]]);
  374. const _sfc_main$Z = {
  375. props: ["modelValue", "sort"],
  376. emits: ["update:modelValue"],
  377. methods: {
  378. formattedDate(time) {
  379. const timestamp = Number(time);
  380. const date = new Date(timestamp);
  381. const now = /* @__PURE__ */ new Date();
  382. const isToday = now.getFullYear() === date.getFullYear() && now.getMonth() === date.getMonth() && now.getDate() === date.getDate();
  383. date.getFullYear();
  384. const month = String(date.getMonth() + 1).padStart(2, "0");
  385. const day = String(date.getDate()).padStart(2, "0");
  386. const hours = String(date.getHours()).padStart(2, "0");
  387. const minutes = String(date.getMinutes()).padStart(2, "0");
  388. return isToday ? `${hours}:${minutes}` : `${month}/${day} ${hours}:${minutes}`;
  389. },
  390. convertToTimestamp(dateStr) {
  391. const cleanedDateStr = dateStr.replace(/\s+/g, "");
  392. const datePattern = /(\d{4})年(\d{1,2})月(\d{1,2})日(\d{2}):(\d{2})/;
  393. const dateMatch = cleanedDateStr.match(datePattern);
  394. if (dateMatch) {
  395. const year = parseInt(dateMatch[1], 10);
  396. const month = parseInt(dateMatch[2], 10) - 1;
  397. const day = parseInt(dateMatch[3], 10);
  398. const hours = parseInt(dateMatch[4], 10);
  399. const minutes = parseInt(dateMatch[5], 10);
  400. const date = new Date(year, month, day, hours, minutes);
  401. return date.getTime();
  402. }
  403. return null;
  404. },
  405. setInitDate() {
  406. $(".topic-list-item .age").each((index, element) => {
  407. const str = $(element).attr("title");
  408. const match = str.match(/创建日期:([\s\S]*?)最新:/);
  409. if (match && match[1]) {
  410. const creationDate = match[1].trim();
  411. const timestamp = this.convertToTimestamp(creationDate);
  412. const now = (/* @__PURE__ */ new Date()).getTime();
  413. const oneDay = 1e3 * 60 * 60 * 24;
  414. const oneWeek = oneDay * 7;
  415. const oneMonth = oneDay * 30;
  416. const threeMonths = oneMonth * 3;
  417. let color;
  418. const timeDiff = now - timestamp;
  419. if (timeDiff < oneDay) {
  420. color = "#45B5AA";
  421. $(element).siblings(".views").html(
  422. `<span class="linuxtime" style="color:${color}">${this.formattedDate(
  423. timestamp
  424. )}</span>`
  425. );
  426. } else if (timeDiff < oneWeek) {
  427. color = "#66A586";
  428. $(element).siblings(".views").html(
  429. `<span class="linuxtime" style="color:${color}">${this.formattedDate(
  430. timestamp
  431. )}</span>`
  432. );
  433. } else if (timeDiff < oneMonth) {
  434. color = "#CFA94A";
  435. $(element).siblings(".views").html(
  436. `<span class="linuxtime" style="color:${color}">${this.formattedDate(
  437. timestamp
  438. )}</span>`
  439. );
  440. } else if (timeDiff < threeMonths) {
  441. color = "#3e8ed2";
  442. $(element).siblings(".views").html(
  443. `<span class="linuxtime" style="color:${color}">${this.formattedDate(
  444. timestamp
  445. )}</span>`
  446. );
  447. } else {
  448. color = "#cccccc";
  449. $(element).siblings(".views").html(
  450. `<span class="linuxtime" style="color:${color}">
  451. <img style="width:20px;vertical-align:sub;" src="https://linux.do/uploads/default/original/4X/4/0/8/408c29a1d1dfaada3160fb2ae366cf3a7c7c1696.png">${this.formattedDate(
  452. timestamp
  453. )}
  454. </span>`
  455. );
  456. }
  457. }
  458. });
  459. },
  460. initDateAndStartPolling() {
  461. setInterval(() => {
  462. this.setInitDate();
  463. this.startPolling();
  464. }, 1e3);
  465. },
  466. startPolling() {
  467. setInterval(() => {
  468. this.setInitDate();
  469. }, 1e4);
  470. }
  471. },
  472. mounted() {
  473. if (this.modelValue) {
  474. this.startPolling();
  475. this.initDateAndStartPolling();
  476. }
  477. }
  478. };
  479. const _hoisted_1$U = { class: "item" };
  480. const _hoisted_2$J = { class: "tit" };
  481. const _hoisted_3$B = ["checked"];
  482. function _sfc_render$Z(_ctx, _cache, $props, $setup, $data, $options) {
  483. return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$U, [
  484. vue.createElementVNode("div", _hoisted_2$J, vue.toDisplayString($props.sort) + ". 将浏览量替换为创建时间(与 4 互斥,只可选择一个)", 1),
  485. vue.createElementVNode("input", {
  486. type: "checkbox",
  487. checked: $props.modelValue,
  488. onChange: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:modelValue", $event.target.checked))
  489. }, null, 40, _hoisted_3$B)
  490. ]);
  491. }
  492. const MenuShowcreatetime1 = /* @__PURE__ */ _export_sfc(_sfc_main$Z, [["render", _sfc_render$Z]]);
  493. const _sfc_main$Y = {
  494. props: ["modelValue", "sort"],
  495. emits: ["update:modelValue"],
  496. methods: {
  497. init() {
  498. $(".topic-post").each(function() {
  499. const num = $(this).find("article").attr("id").replace(/^post_/, "");
  500. if ($(this).find(".linuxfloor").length < 1) {
  501. $(this).find(".post-infos").append(`<span class="linuxfloor">#${num}</span>`);
  502. }
  503. });
  504. }
  505. },
  506. created() {
  507. if (this.modelValue) {
  508. let pollinglength2 = 0;
  509. setInterval(() => {
  510. if (pollinglength2 != $(".post-stream .topic-post").length) {
  511. pollinglength2 = $(".post-stream .topic-post").length;
  512. this.init();
  513. }
  514. }, 1e3);
  515. }
  516. }
  517. };
  518. const _hoisted_1$T = { class: "item" };
  519. const _hoisted_2$I = { class: "tit" };
  520. const _hoisted_3$A = ["checked"];
  521. function _sfc_render$Y(_ctx, _cache, $props, $setup, $data, $options) {
  522. return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$T, [
  523. vue.createElementVNode("div", _hoisted_2$I, vue.toDisplayString($props.sort) + ". 是否显示楼层数", 1),
  524. vue.createElementVNode("input", {
  525. type: "checkbox",
  526. checked: $props.modelValue,
  527. onChange: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:modelValue", $event.target.checked))
  528. }, null, 40, _hoisted_3$A)
  529. ]);
  530. }
  531. const MenuShowfloors = /* @__PURE__ */ _export_sfc(_sfc_main$Y, [["render", _sfc_render$Y]]);
  532. const _sfc_main$X = {
  533. props: ["modelValue", "sort"],
  534. emits: ["update:modelValue"],
  535. created() {
  536. if (this.modelValue) {
  537. $("head").append(`<style>.header-title{display:none!important}</style>`);
  538. }
  539. }
  540. };
  541. const _hoisted_1$S = { class: "item" };
  542. const _hoisted_2$H = { class: "tit" };
  543. const _hoisted_3$z = ["checked"];
  544. function _sfc_render$X(_ctx, _cache, $props, $setup, $data, $options) {
  545. return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$S, [
  546. vue.createElementVNode("div", _hoisted_2$H, vue.toDisplayString($props.sort) + ". 隐藏话题详情顶部大标题", 1),
  547. vue.createElementVNode("input", {
  548. type: "checkbox",
  549. checked: $props.modelValue,
  550. onChange: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:modelValue", $event.target.checked))
  551. }, null, 40, _hoisted_3$z)
  552. ]);
  553. }
  554. const MenuHidetopicdetailtitle = /* @__PURE__ */ _export_sfc(_sfc_main$X, [["render", _sfc_render$X]]);
  555. const _sfc_main$W = {
  556. props: ["modelValue", "sort"],
  557. emits: ["update:modelValue"],
  558. methods: {
  559. init() {
  560. if ($(".topicpreview").length < 1) {
  561. $("body").append(`<div class="topicpreview">
  562. <div class="topicpreview-opacity"></div>
  563. <div class="topicpreview-container">
  564. <p style="text-align: center">正在加载中...</p>
  565. </div>
  566. </div>`);
  567. }
  568. $(".topic-list .main-link a.title").each(function() {
  569. const id = $(this).attr("data-topic-id");
  570. if ($(this).parents(".link-top-line").find(".topicpreview-btn").length < 1) {
  571. $(this).parents(".link-top-line").append(
  572. `<button class="btn btn-icon-text btn-default topicpreview-btn" data-id="${id}">预览</button>`
  573. );
  574. }
  575. });
  576. },
  577. setClick() {
  578. $(".topicpreview-btn").each(function() {
  579. $(this).click(function() {
  580. $(".topicpreview").show();
  581. let previewData = {};
  582. let previewurl = $(this).attr("data-id");
  583. fetch(`/t/${previewurl}.json`).then((response) => response.json()).then((data) => {
  584. previewData = data;
  585. function formatDate(isoString) {
  586. const date = new Date(isoString);
  587. const year = date.getFullYear();
  588. const month = String(date.getMonth() + 1).padStart(2, "0");
  589. const day = String(date.getDate()).padStart(2, "0");
  590. const hours = String(date.getHours()).padStart(2, "0");
  591. const minutes = String(date.getMinutes()).padStart(2, "0");
  592. const seconds = String(date.getSeconds()).padStart(2, "0");
  593. return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
  594. }
  595. $(".topicpreview-container").html(`
  596. <div class="topicpreview-title">${previewData.title}</div>
  597. <p class="topicpreview-date">发帖时间:${formatDate(
  598. previewData.created_at
  599. )}</p>
  600. <div class="topicpreview-content"></div>
  601. <p style="text-align: center;">仅显示前 20 条,<a href="/t/topic/${previewurl}/">查看更多</a></p>
  602. `);
  603. $.each(previewData.post_stream.posts, function(index, post) {
  604. $(".topicpreview .topicpreview-content").append(`
  605. <div class="item">
  606. <span class="itemfloor">${index + 1}楼</span>
  607. <div class="itempost">
  608. <div class="itemname">
  609. ${post.display_username}
  610. <span>${post.username}</span>
  611. <div class="itemdate">${formatDate(post.created_at)}</div>
  612. </div>
  613. ${post.cooked}
  614. </div>
  615. </div>
  616. `);
  617. });
  618. setInterval(() => {
  619. $(".lightbox").attr("href", "javascript:void(0)");
  620. }, 1e3);
  621. });
  622. });
  623. });
  624. $(".topicpreview-opacity").click(this.closePreview);
  625. },
  626. closePreview() {
  627. $(".topicpreview").hide();
  628. $(".topicpreview-container").html(
  629. `<p style="text-align: center">正在加载中...</p> `
  630. );
  631. },
  632. handleKeyDown(event) {
  633. if (event.key === "Escape") {
  634. this.closePreview();
  635. }
  636. }
  637. },
  638. created() {
  639. if (this.modelValue) {
  640. setInterval(() => {
  641. this.init();
  642. }, 1e3);
  643. let pollinglength1 = 0;
  644. let pollinglength2 = 0;
  645. setInterval(() => {
  646. if (pollinglength1 != $(".topic-list-body tr").length) {
  647. pollinglength1 = $(".topic-list-body tr").length;
  648. this.setClick();
  649. }
  650. if (pollinglength2 != $(".post-stream .topic-post").length) {
  651. pollinglength2 = $(".post-stream .topic-post").length;
  652. this.setClick();
  653. }
  654. }, 1e3);
  655. document.addEventListener("keydown", this.handleKeyDown);
  656. }
  657. },
  658. beforeUnmount() {
  659. document.removeEventListener("keydown", this.handleKeyDown);
  660. }
  661. };
  662. const _hoisted_1$R = { class: "item" };
  663. const _hoisted_2$G = { class: "tit" };
  664. const _hoisted_3$y = ["checked"];
  665. function _sfc_render$W(_ctx, _cache, $props, $setup, $data, $options) {
  666. return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$R, [
  667. vue.createElementVNode("div", _hoisted_2$G, vue.toDisplayString($props.sort) + ". 是否开启话题预览功能", 1),
  668. vue.createElementVNode("input", {
  669. type: "checkbox",
  670. checked: $props.modelValue,
  671. onChange: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:modelValue", $event.target.checked))
  672. }, null, 40, _hoisted_3$y)
  673. ]);
  674. }
  675. const MenuTopicpreview = /* @__PURE__ */ _export_sfc(_sfc_main$W, [["render", _sfc_render$W]]);
  676. const _sfc_main$V = {
  677. props: ["modelValue", "sort"],
  678. emits: ["update:modelValue"]
  679. };
  680. const _hoisted_1$Q = { class: "item" };
  681. const _hoisted_2$F = { class: "tit" };
  682. const _hoisted_3$x = ["checked"];
  683. function _sfc_render$V(_ctx, _cache, $props, $setup, $data, $options) {
  684. return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$Q, [
  685. vue.createElementVNode("div", _hoisted_2$F, vue.toDisplayString($props.sort) + ". 是否开启只看楼主", 1),
  686. vue.createElementVNode("input", {
  687. type: "checkbox",
  688. checked: $props.modelValue,
  689. onChange: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:modelValue", $event.target.checked))
  690. }, null, 40, _hoisted_3$x)
  691. ]);
  692. }
  693. const MenuLookOP = /* @__PURE__ */ _export_sfc(_sfc_main$V, [["render", _sfc_render$V]]);
  694. const _sfc_main$U = {
  695. props: ["modelValue", "sort"],
  696. emits: ["update:modelValue"],
  697. created() {
  698. if (this.modelValue) {
  699. $("head").append(`<style>
  700. .topic-body .cooked{max-height:600px!important;overflow-y:auto!important;}
  701. </style>`);
  702. }
  703. }
  704. };
  705. const _hoisted_1$P = { class: "item" };
  706. const _hoisted_2$E = { class: "tit" };
  707. const _hoisted_3$w = ["checked"];
  708. function _sfc_render$U(_ctx, _cache, $props, $setup, $data, $options) {
  709. return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$P, [
  710. vue.createElementVNode("div", _hoisted_2$E, vue.toDisplayString($props.sort) + ". 智能限制楼层高度", 1),
  711. vue.createElementVNode("input", {
  712. type: "checkbox",
  713. checked: $props.modelValue,
  714. onChange: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:modelValue", $event.target.checked))
  715. }, null, 40, _hoisted_3$w)
  716. ]);
  717. }
  718. const MenuFloorHeight = /* @__PURE__ */ _export_sfc(_sfc_main$U, [["render", _sfc_render$U]]);
  719. const emojiSet = [
  720. {
  721. size: "30x30",
  722. name: "tieba_001",
  723. url: "/uploads/default/original/3X/9/a/9ac368cc8eafad165###f61b0263803d3b2dc2a7.png?v=12"
  724. },
  725. {
  726. size: "30x30",
  727. name: "tieba_002",
  728. url: "/uploads/default/original/3X/1/6/16baef70ba80d438e4bb1907ec0c354d680e09df.png?v=12"
  729. },
  730. {
  731. size: "30x30",
  732. name: "tieba_003",
  733. url: "/uploads/default/original/3X/2/7/27a55a1370c41f0736ba094bdc8866c6c2878c16.png?v=12"
  734. },
  735. {
  736. size: "30x30",
  737. name: "tieba_004",
  738. url: "/uploads/default/original/3X/9/e/9eac534efec605f5a1ac3b2f08d768cfbb4c63a9.png?v=12"
  739. },
  740. {
  741. size: "30x30",
  742. name: "tieba_005",
  743. url: "/uploads/default/original/3X/7/4/7493e87cae45656ac7997e8c79c852f9abc80454.png?v=12"
  744. },
  745. {
  746. size: "30x30",
  747. name: "tieba_006",
  748. url: "/uploads/default/original/3X/5/9/596da26825d2a806bd1952b5231f24d212866c1b.png?v=12"
  749. },
  750. {
  751. size: "30x30",
  752. name: "tieba_007",
  753. url: "/uploads/default/original/3X/c/0/c055b564a5b580ddfbf651df9a70feaec2b3b8e4.png?v=12"
  754. },
  755. {
  756. size: "30x30",
  757. name: "tieba_008",
  758. url: "/uploads/default/original/3X/9/e/9e137b2c72b77ee75454d737b5ad9d043dd49954.png?v=12"
  759. },
  760. {
  761. size: "30x30",
  762. name: "tieba_009",
  763. url: "/uploads/default/original/3X/c/7/c756c0f079d25093ed6c7c2feaaa423ead63411c.png?v=12"
  764. },
  765. {
  766. size: "30x30",
  767. name: "tieba_125",
  768. url: "/uploads/default/original/3X/1/3/133688dda7ae38a3ddbc9eda0ca99fa8ddbb2704.png?v=12"
  769. },
  770. {
  771. size: "30x30",
  772. name: "tieba_010",
  773. url: "/uploads/default/original/3X/2/b/2b58793c54c273c2d3d40722c4def435543084b4.png?v=12"
  774. },
  775. {
  776. size: "30x30",
  777. name: "tieba_011",
  778. url: "/uploads/default/original/3X/0/b/0b73771da5b3dc534ad05f1b5fff24325fc0eff7.png?v=12"
  779. },
  780. {
  781. size: "30x30",
  782. name: "tieba_012",
  783. url: "/uploads/default/original/3X/9/d/9d9e539ba33d272a5c6468cdb2fa7615695fa788.png?v=12"
  784. },
  785. {
  786. size: "30x30",
  787. name: "tieba_013",
  788. url: "/uploads/default/original/3X/e/1/e1aad11157b14d04bc8056573ecb23b5a219d260.png?v=12"
  789. },
  790. {
  791. size: "30x30",
  792. name: "tieba_014",
  793. url: "/uploads/default/original/3X/1/2/123defe5ac241618f3bb5246a727be77d###656d.png?v=12"
  794. },
  795. {
  796. size: "30x30",
  797. name: "tieba_015",
  798. url: "/uploads/default/original/3X/d/3/d3347ade2d4baf8092696b33c3523e634923b4fe.png?v=12"
  799. },
  800. {
  801. size: "30x30",
  802. name: "tieba_016",
  803. url: "/uploads/default/original/3X/2/1/21158038759f6a8630df8507f782a45a6caee004.png?v=12"
  804. },
  805. {
  806. size: "30x30",
  807. name: "tieba_017",
  808. url: "/uploads/default/original/3X/7/7/7732425deb158037a8692c45381de35ca83105e6.png?v=12"
  809. },
  810. {
  811. size: "30x30",
  812. name: "tieba_018",
  813. url: "/uploads/default/original/3X/7/1/7101ed3a9c047d318454b4eff91d74c06db5eaab.png?v=12"
  814. },
  815. {
  816. size: "30x30",
  817. name: "tieba_019",
  818. url: "/uploads/default/original/3X/e/e/eeccf0c1ccda4a4f3b33b4bb502c14e80c324443.png?v=12"
  819. },
  820. {
  821. size: "30x30",
  822. name: "tieba_020",
  823. url: "/uploads/default/original/3X/2/8/286824f9727de34e43b906346c0bdb0f854b1e2b.png?v=12"
  824. },
  825. {
  826. size: "30x30",
  827. name: "tieba_021",
  828. url: "/uploads/default/original/3X/0/9/09077d62fc78be7a9c19a8c084a35eac8373d241.png?v=12"
  829. },
  830. {
  831. size: "30x30",
  832. name: "tieba_022",
  833. url: "/uploads/default/original/3X/6/2/62e7b0ea68e56cc033f78527e62a825a6d9001f2.png?v=12"
  834. },
  835. {
  836. size: "30x30",
  837. name: "tieba_023",
  838. url: "/uploads/default/original/3X/d/4/d4e4c57ba70bd38264f0677cf338fa8af3228fbd.png?v=12"
  839. },
  840. {
  841. size: "30x30",
  842. name: "tieba_024",
  843. url: "/uploads/default/original/3X/9/c/9c2f3e1ce5982036af66b951a26231b7590e93d4.png?v=12"
  844. },
  845. {
  846. size: "30x30",
  847. name: "tieba_025",
  848. url: "/uploads/default/original/3X/e/4/e415f72201d585ac7ccc869a334048006d2b6b9d.png?v=12"
  849. },
  850. {
  851. size: "30x30",
  852. name: "tieba_026",
  853. url: "/uploads/default/original/3X/a/d/ad2d245bbe71a05b0bd7a42f435d25524517c7ac.png?v=12"
  854. },
  855. {
  856. size: "30x30",
  857. name: "tieba_027",
  858. url: "/uploads/default/original/3X/7/9/7992e06b38f76d7d55a8bc496fa6dd046ba1f0ad.png?v=12"
  859. },
  860. {
  861. size: "30x30",
  862. name: "tieba_028",
  863. url: "/uploads/default/original/3X/4/4/448d0cb933ec8016797faef8c8dcfb8822e43326.png?v=12"
  864. },
  865. {
  866. size: "30x30",
  867. name: "tieba_029",
  868. url: "/uploads/default/original/3X/8/4/84cd00fd735f11a57b193d62880f55b4ab835c7e.png?v=12"
  869. },
  870. {
  871. size: "30x30",
  872. name: "tieba_030",
  873. url: "/uploads/default/original/3X/6/8/68b3471539dbbe40437b0881916feb2d9d4ad254.png?v=12"
  874. },
  875. {
  876. size: "30x30",
  877. name: "tieba_031",
  878. url: "/uploads/default/original/3X/8/9/89870339101e10993ef1e55dd9e96f275a6a99f9.png?v=12"
  879. },
  880. {
  881. size: "30x30",
  882. name: "tieba_032",
  883. url: "/uploads/default/original/3X/2/5/25936c19b7808540b4a46eb7aeddced05658ec77.png?v=12"
  884. },
  885. {
  886. size: "30x30",
  887. name: "tieba_033",
  888. url: "/uploads/default/original/3X/d/f/dff9a29b33ccc0eeffe6d457cee58307246e28ab.png?v=12"
  889. },
  890. {
  891. size: "30x30",
  892. name: "tieba_034",
  893. url: "/uploads/default/original/3X/8/b/8b42b74ab6f63dcd02b923cee5ab8f224f32954e.png?v=12"
  894. },
  895. {
  896. size: "30x30",
  897. name: "tieba_035",
  898. url: "/uploads/default/original/3X/a/2/a268ad46209a864548c0439854c562d5a1a852e4.png?v=12"
  899. },
  900. {
  901. size: "30x30",
  902. name: "tieba_036",
  903. url: "/uploads/default/original/3X/4/9/49b2eba636dba687d98c4254bb00c682194f3556.png?v=12"
  904. },
  905. {
  906. size: "30x30",
  907. name: "tieba_037",
  908. url: "/uploads/default/original/3X/5/3/5359fdcfeb8a92794fdf7e0a9e1b7002ba635765.png?v=12"
  909. },
  910. {
  911. size: "30x30",
  912. name: "tieba_038",
  913. url: "/uploads/default/original/3X/5/3/535b871b10c649510280825c98e80ee1122613ec.png?v=12"
  914. },
  915. {
  916. size: "30x30",
  917. name: "tieba_039",
  918. url: "/uploads/default/original/3X/9/8/98939cb96a8df85af0efdaf02dcc144265e64703.png?v=12"
  919. },
  920. {
  921. size: "30x30",
  922. name: "tieba_040",
  923. url: "/uploads/default/original/3X/3/a/3a5fcb80663d73c1f116527c17de7cad37b72c49.png?v=12"
  924. },
  925. {
  926. size: "30x30",
  927. name: "tieba_041",
  928. url: "/uploads/default/original/3X/4/0/40cc7fe068c66b38c5e58ee8b59879f572dcd2ca.png?v=12"
  929. },
  930. {
  931. size: "30x30",
  932. name: "tieba_042",
  933. url: "/uploads/default/original/3X/e/6/e69395f0a9f391ca3c296aeddf510d0fb1d28fdf.png?v=12"
  934. },
  935. {
  936. size: "30x30",
  937. name: "tieba_043",
  938. url: "/uploads/default/original/3X/1/2/123e2d16a27491073fd90994fcd2820a48b2eb1d.png?v=12"
  939. },
  940. {
  941. size: "30x30",
  942. name: "tieba_044",
  943. url: "/uploads/default/original/3X/4/d/4d101bae8975480e4c81969242c6db771ccf29df.png?v=12"
  944. },
  945. {
  946. size: "30x30",
  947. name: "tieba_045",
  948. url: "/uploads/default/original/3X/6/8/687dca2210abafbcaaf211e27a013c1c0d7d480c.png?v=12"
  949. },
  950. {
  951. size: "30x30",
  952. name: "tieba_046",
  953. url: "/uploads/default/original/3X/1/4/14bca5d4cdaca743d0da8bc7f3b23146b53bc534.png?v=12"
  954. },
  955. {
  956. size: "30x30",
  957. name: "tieba_047",
  958. url: "/uploads/default/original/3X/c/d/cd555f2a5f605873e85b12ebf5e20affeb86817b.png?v=12"
  959. },
  960. {
  961. size: "30x30",
  962. name: "tieba_048",
  963. url: "/uploads/default/original/3X/7/d/7d5173acb48b6662934d93d15ccf03bc4eb4fe1e.png?v=12"
  964. },
  965. {
  966. size: "30x30",
  967. name: "tieba_049",
  968. url: "/uploads/default/original/3X/b/7/b774ed3e1792a0c345c3dc6b405398fc330476c4.png?v=12"
  969. },
  970. {
  971. size: "30x30",
  972. name: "tieba_050",
  973. url: "/uploads/default/original/3X/6/3/63c1a091c6a7a3a4ba09f79d3df61b5258d1da14.png?v=12"
  974. },
  975. {
  976. size: "30x30",
  977. name: "tieba_062",
  978. url: "/uploads/default/original/3X/6/4/644937964bfb3b7ff9519a8c789fba156bc51493.png?v=12"
  979. },
  980. {
  981. size: "30x30",
  982. name: "tieba_063",
  983. url: "/uploads/default/original/3X/9/7/977e25c3bb0bb2ffffd7680ef75de860c9bc8eeb.png?v=12"
  984. },
  985. {
  986. size: "30x30",
  987. name: "tieba_064",
  988. url: "/uploads/default/original/3X/f/a/fa08552ff47b7347fe769ea71e251784fe46e9c4.png?v=12"
  989. },
  990. {
  991. size: "30x30",
  992. name: "tieba_065",
  993. url: "/uploads/default/original/3X/8/d/8ddf6f88c399106b30f08bc6ae594dba19e8da36.png?v=12"
  994. },
  995. {
  996. size: "30x30",
  997. name: "tieba_066",
  998. url: "/uploads/default/original/3X/d/c/dccf34dbec6856992ab133e61a1f35417caf5f94.png?v=12"
  999. },
  1000. {
  1001. size: "30x30",
  1002. name: "tieba_067",
  1003. url: "/uploads/default/original/3X/1/6/16cd502b6c1d42d6d929788d47a96e50313b361f.png?v=12"
  1004. },
  1005. {
  1006. size: "30x30",
  1007. name: "tieba_068",
  1008. url: "/uploads/default/original/3X/a/7/a79256841becf6fc218cf13ed7c9708d2846f472.png?v=12"
  1009. },
  1010. {
  1011. size: "30x30",
  1012. name: "tieba_069",
  1013. url: "/uploads/default/original/3X/1/b/1b279f1106ef55973ae2df3a41edda04181163f6.png?v=12"
  1014. },
  1015. {
  1016. size: "30x30",
  1017. name: "tieba_070",
  1018. url: "/uploads/default/original/3X/1/e/1e8646c269ac7a1cea631b1a2fe107a4b0137dd4.png?v=12"
  1019. },
  1020. {
  1021. size: "30x30",
  1022. name: "tieba_071",
  1023. url: "/uploads/default/original/3X/4/f/4fcf98aa20e5148d8f0dd1e117d99ad52fe7787a.png?v=12"
  1024. },
  1025. {
  1026. size: "30x30",
  1027. name: "tieba_072",
  1028. url: "/uploads/default/original/3X/f/b/fbdca3a08e2eb36d408a9f723251132a6e1a4a1d.png?v=12"
  1029. },
  1030. {
  1031. size: "30x30",
  1032. name: "tieba_073",
  1033. url: "/uploads/default/original/3X/e/f/efcf23577412c17df6354df84eae836ad324d3fc.png?v=12"
  1034. },
  1035. {
  1036. size: "30x30",
  1037. name: "tieba_074",
  1038. url: "/uploads/default/original/3X/4/0/40f2d01d50e90a29680636aa5b5b6808fe4e496b.png?v=12"
  1039. },
  1040. {
  1041. size: "30x30",
  1042. name: "tieba_075",
  1043. url: "/uploads/default/original/3X/b/2/b29012e6751baac99a0b364978e2ba6c68696bb0.png?v=12"
  1044. },
  1045. {
  1046. size: "30x30",
  1047. name: "tieba_076",
  1048. url: "/uploads/default/original/3X/8/e/8eb5b83342386cac1dcf7ee4de785540eb85b941.png?v=12"
  1049. },
  1050. {
  1051. size: "30x30",
  1052. name: "tieba_077",
  1053. url: "/uploads/default/original/3X/0/d/0d84801a6c000b4724a4f998ae2cebbb75088672.png?v=12"
  1054. },
  1055. {
  1056. size: "30x30",
  1057. name: "tieba_078",
  1058. url: "/uploads/default/original/3X/e/8/e8342efcc78faa5225bc94fdc50d595b35de226a.png?v=12"
  1059. },
  1060. {
  1061. size: "30x30",
  1062. name: "tieba_079",
  1063. url: "/uploads/default/original/3X/0/3/03493b5fee0ad65939b223bcb99256c2ad3f92cf.png?v=12"
  1064. },
  1065. {
  1066. size: "30x30",
  1067. name: "tieba_080",
  1068. url: "/uploads/default/original/3X/6/0/6010085f85bbd33ec476d908a3adedf43bf806d2.png?v=12"
  1069. },
  1070. {
  1071. size: "30x30",
  1072. name: "tieba_081",
  1073. url: "/uploads/default/original/3X/4/7/472396c3c1fdc62031460f52fa57e70656559956.png?v=12"
  1074. },
  1075. {
  1076. size: "30x30",
  1077. name: "tieba_082",
  1078. url: "/uploads/default/original/3X/e/8/e8ed47702a901d932ce0f2c926006c569777acae.png?v=12"
  1079. },
  1080. {
  1081. size: "30x30",
  1082. name: "tieba_083",
  1083. url: "/uploads/default/original/3X/8/3/839487b3bbfe38ea8a6d69115c2b18e336c776aa.png?v=12"
  1084. },
  1085. {
  1086. size: "30x30",
  1087. name: "tieba_084",
  1088. url: "/uploads/default/original/3X/d/a/da2b0f67a66746f0702044254460f5f210159dfe.png?v=12"
  1089. },
  1090. {
  1091. size: "30x30",
  1092. name: "tieba_085",
  1093. url: "/uploads/default/original/3X/4/b/4bfbebdb5da3afb04e73813042a2645dea7895a3.png?v=12"
  1094. },
  1095. {
  1096. size: "30x30",
  1097. name: "tieba_086",
  1098. url: "/uploads/default/original/3X/4/0/4035794fd9995594b024ca6695de918567c5b192.png?v=12"
  1099. },
  1100. {
  1101. size: "30x30",
  1102. name: "tieba_087",
  1103. url: "/uploads/default/original/3X/2/e/2e09f3a3c7b27eacbabe9e9614b06b88d5b06343.png?v=12"
  1104. },
  1105. {
  1106. size: "30x30",
  1107. name: "tieba_088",
  1108. url: "/uploads/default/original/3X/8/8/8842b4bbda39465fefb2a5cee47c8b203463e327.png?v=12"
  1109. },
  1110. {
  1111. size: "30x30",
  1112. name: "tieba_089",
  1113. url: "/uploads/default/original/3X/c/2/c20aca50f9432ad01fdaf454e2013083be11909c.png?v=12"
  1114. },
  1115. {
  1116. size: "30x30",
  1117. name: "tieba_090",
  1118. url: "/uploads/default/original/3X/0/e/0eb0e2df1d8287c00069e1bb906f65a7e6f8ac1f.png?v=12"
  1119. },
  1120. {
  1121. size: "30x30",
  1122. name: "tieba_091",
  1123. url: "/uploads/default/original/3X/f/c/fcb760df48754f55cd9030370300880cddc30aeb.png?v=12"
  1124. },
  1125. {
  1126. size: "30x30",
  1127. name: "tieba_092",
  1128. url: "/uploads/default/original/3X/6/d/6d1bcb4bdba18ec87caac87e5c944d81244c0925.png?v=12"
  1129. },
  1130. {
  1131. size: "30x30",
  1132. name: "tieba_093",
  1133. url: "/uploads/default/original/3X/1/7/17e9f52f1b3f19e5fcf1e30b0bef7154b9cb25e9.png?v=12"
  1134. },
  1135. {
  1136. size: "30x30",
  1137. name: "tieba_094",
  1138. url: "/uploads/default/original/3X/d/8/d84a7737da89e36a682519cc53dc36869dc8324a.png?v=12"
  1139. },
  1140. {
  1141. size: "30x30",
  1142. name: "tieba_095",
  1143. url: "/uploads/default/original/3X/d/6/d687f7716a72d08b5ab44bf515b4b47ddf973a16.png?v=12"
  1144. },
  1145. {
  1146. size: "30x30",
  1147. name: "tieba_096",
  1148. url: "/uploads/default/original/3X/9/1/91c4bdc5b31022de2047b0e326f85aac696a61d8.png?v=12"
  1149. },
  1150. {
  1151. size: "30x30",
  1152. name: "tieba_097",
  1153. url: "/uploads/default/original/3X/9/9/992ffdfd94f164debe2ff1ffd686eb9b6d886c30.png?v=12"
  1154. },
  1155. {
  1156. size: "30x30",
  1157. name: "tieba_098",
  1158. url: "/uploads/default/original/3X/a/b/ab4d09d173fe9d726a7df370527e3bb11b86ac37.png?v=12"
  1159. },
  1160. {
  1161. size: "30x30",
  1162. name: "tieba_099",
  1163. url: "/uploads/default/original/3X/9/e/9e07307cddc9a8e1b17374d688dcd9cac0009b36.png?v=12"
  1164. },
  1165. {
  1166. size: "30x30",
  1167. name: "tieba_100",
  1168. url: "/uploads/default/original/3X/0/8/083d87100f8608832766302d52e90c66bfa7b55e.png?v=12"
  1169. },
  1170. {
  1171. size: "30x30",
  1172. name: "tieba_101",
  1173. url: "/uploads/default/original/3X/d/d/ddf9dab71979b328b8cc99a110961278b31af15f.png?v=12"
  1174. },
  1175. {
  1176. size: "30x30",
  1177. name: "tieba_102",
  1178. url: "/uploads/default/original/3X/c/1/c1e30e625a80f2c4e38d15051adc0fbff0cdac85.png?v=12"
  1179. },
  1180. {
  1181. size: "30x30",
  1182. name: "tieba_103",
  1183. url: "/uploads/default/original/3X/4/9/4932179ffb43027d3482ff0a8e79ad3c9f124675.png?v=12"
  1184. },
  1185. {
  1186. size: "30x30",
  1187. name: "tieba_104",
  1188. url: "/uploads/default/original/3X/e/e/ee4698ca2806e680bf8710a13####433caeec7db.png?v=12"
  1189. },
  1190. {
  1191. size: "30x30",
  1192. name: "tieba_105",
  1193. url: "/uploads/default/original/3X/0/4/04b9b300e3259e61fe2e9b6e1a291112fece7aa5.png?v=12"
  1194. },
  1195. {
  1196. size: "30x30",
  1197. name: "tieba_106",
  1198. url: "/uploads/default/original/3X/4/5/45cf9833729d3f67e4b71327c07bda302ac3f792.png?v=12"
  1199. },
  1200. {
  1201. size: "30x30",
  1202. name: "tieba_107",
  1203. url: "/uploads/default/original/3X/6/c/6c0346f696e90c6f804ade9f9d578c8c79c99aac.png?v=12"
  1204. },
  1205. {
  1206. size: "30x30",
  1207. name: "tieba_108",
  1208. url: "/uploads/default/original/3X/a/1/a1ec5ef51c85ebabebe5102b00a1a4caeb08be63.png?v=12"
  1209. },
  1210. {
  1211. size: "30x30",
  1212. name: "tieba_109",
  1213. url: "/uploads/default/original/3X/b/7/b75001317cf515737019777e8a6ed35b5b46ca6c.png?v=12"
  1214. },
  1215. {
  1216. size: "30x30",
  1217. name: "tieba_110",
  1218. url: "/uploads/default/original/3X/0/1/0194cea00dae49fd82321825b52d96e1f8f47732.png?v=12"
  1219. },
  1220. {
  1221. size: "30x30",
  1222. name: "tieba_111",
  1223. url: "/uploads/default/original/3X/b/5/b52e429fb2a84f8e72169c358f00b20e271d9f83.png?v=12"
  1224. },
  1225. {
  1226. size: "30x30",
  1227. name: "tieba_112",
  1228. url: "/uploads/default/original/3X/c/9/c9aa6ca75dbffd21308721ce156da371e82b47f9.png?v=12"
  1229. },
  1230. {
  1231. size: "30x30",
  1232. name: "tieba_113",
  1233. url: "/uploads/default/original/3X/1/c/1cadebeaf0cd36af11665ffa5802ba1c5b143be9.png?v=12"
  1234. },
  1235. {
  1236. size: "30x30",
  1237. name: "tieba_114",
  1238. url: "/uploads/default/original/3X/d/d/dd93786f2a24352b65e23f81d2c24c1a41439cf0.png?v=12"
  1239. },
  1240. {
  1241. size: "30x30",
  1242. name: "tieba_115",
  1243. url: "/uploads/default/original/3X/1/e/1e79d50d73b1afaeffe39574e92154d5d2878787.png?v=12"
  1244. },
  1245. {
  1246. size: "30x30",
  1247. name: "tieba_116",
  1248. url: "/uploads/default/original/3X/d/a/daf75362acc5e46c813a77d8bd143e4e20dd89e5.png?v=12"
  1249. },
  1250. {
  1251. size: "30x30",
  1252. name: "tieba_117",
  1253. url: "/uploads/default/original/3X/f/c/fcca64230d5d15b933b3b9db491f9d3516909b62.png?v=12"
  1254. },
  1255. {
  1256. size: "30x30",
  1257. name: "tieba_118",
  1258. url: "/uploads/default/original/3X/1/8/189ed0fa3c3c01fdf1a99e836f1fa921f679b286.png?v=12"
  1259. },
  1260. {
  1261. size: "30x30",
  1262. name: "tieba_119",
  1263. url: "/uploads/default/original/3X/1/2/1267794a9888419b4d72a2e92162dcb10c08d740.png?v=12"
  1264. },
  1265. {
  1266. size: "30x30",
  1267. name: "tieba_120",
  1268. url: "/uploads/default/original/3X/2/b/2b20054bfb140ededbc4a5b94d52###0ab49522a.png?v=12"
  1269. },
  1270. {
  1271. size: "30x30",
  1272. name: "tieba_121",
  1273. url: "/uploads/default/original/3X/5/4/54c6102be172ff5b326edcff59e4ed6485495218.png?v=12"
  1274. },
  1275. {
  1276. size: "30x30",
  1277. name: "tieba_122",
  1278. url: "/uploads/default/original/3X/f/b/fb9a3fe91bb52c30496dd41c739bd829511498fe.png?v=12"
  1279. },
  1280. {
  1281. size: "30x30",
  1282. name: "tieba_123",
  1283. url: "/uploads/default/original/3X/0/6/069a4f21d927aac0db15bb2304ca29f5bdd0f733.png?v=12"
  1284. },
  1285. {
  1286. size: "30x30",
  1287. name: "tieba_124",
  1288. url: "/uploads/default/original/3X/3/7/372798490ea3b5ca4dac38233413355c6c8175ce.png?v=12"
  1289. }
  1290. ];
  1291. setInterval(() => {
  1292. var editor = document.querySelector(".d-editor-button-bar");
  1293. if (!document.querySelector(".emoji-picker-button") && editor) {
  1294. var emojiButton = document.createElement("button");
  1295. emojiButton.classList.add(
  1296. "btn",
  1297. "no-text",
  1298. "btn-icon",
  1299. "emoji",
  1300. "emoji-picker-button"
  1301. );
  1302. emojiButton.title = "插入贴吧表情包";
  1303. emojiButton.innerHTML = "<svg class='fa d-icon d-icon-far-face-smile svg-icon svg-string' xmlns='http://www.w3.org/2000/svg'><use href='#far-face-smile'></use></svg>";
  1304. editor.appendChild(emojiButton);
  1305. emojiButton.addEventListener("click", function() {
  1306. var emojiPicker = document.createElement("div");
  1307. emojiPicker.className = "emojiPicker";
  1308. var emojiSetHtml = emojiSet.map(
  1309. (emo) => `<img src="${emo.url}" name="${emo.name}" url="${emo.url}" alt="${emo.size}" onclick="insertEmoji(event)"/>`
  1310. ).join("");
  1311. emojiPicker.innerHTML = emojiSetHtml;
  1312. emojiPicker.style.position = "absolute";
  1313. emojiPicker.style.background = "#FFF";
  1314. emojiPicker.style.border = "1px solid #ddd";
  1315. emojiPicker.style.padding = "10px";
  1316. if (document.body.contains(document.querySelector(".emojiPicker"))) {
  1317. document.querySelector(".emojiPicker").remove();
  1318. } else {
  1319. emojiButton.after(emojiPicker);
  1320. }
  1321. emojiPicker.addEventListener("click", function(e) {
  1322. if (e.target.tagName === "IMG") {
  1323. var textArea = document.querySelector(".d-editor-input");
  1324. if (!textArea) {
  1325. alert("找不到输入框");
  1326. return;
  1327. }
  1328. var emojiMarkdown = `![${e.target.name}|${e.target.alt}](${e.target.src})`;
  1329. var startPos = textArea.selectionStart;
  1330. var endPos = textArea.selectionEnd;
  1331. textArea.value = textArea.value.substring(0, startPos) + emojiMarkdown + textArea.value.substring(endPos, textArea.value.length);
  1332. var event = new Event("input", {
  1333. bubbles: true,
  1334. cancelable: true
  1335. });
  1336. textArea.dispatchEvent(event);
  1337. emojiPicker.remove();
  1338. }
  1339. });
  1340. });
  1341. }
  1342. }, 100);
  1343. const _sfc_main$T = {};
  1344. function _sfc_render$T(_ctx, _cache, $props, $setup, $data, $options) {
  1345. return null;
  1346. }
  1347. const ReplyTBEnjoy = /* @__PURE__ */ _export_sfc(_sfc_main$T, [["render", _sfc_render$T]]);
  1348. const _sfc_main$S = {
  1349. props: ["modelValue", "sort"],
  1350. emits: ["update:modelValue"],
  1351. created() {
  1352. if (this.modelValue) {
  1353. setInterval(() => {
  1354. pangu.spacingElementByClassName("cooked");
  1355. pangu.spacingElementByTagName("h1");
  1356. document.addEventListener("DOMContentLoaded", () => {
  1357. pangu.autoSpacingPage();
  1358. });
  1359. if ($(".pangutext").length < 1) {
  1360. $(".save-or-cancel .cancel").before(`<span class="pangutext">混排优化</span>`);
  1361. $(".pangutext").click(function() {
  1362. const $textarea = $(".d-editor-input");
  1363. let text = pangu.spacing($textarea.val());
  1364. $textarea.focus();
  1365. $textarea.val("");
  1366. for (let i = 0; i < text.length; i++) {
  1367. let char = text[i];
  1368. $textarea.val($textarea.val() + char);
  1369. let inputEvent = new Event("input", {
  1370. bubbles: true,
  1371. cancelable: true
  1372. });
  1373. $textarea[0].dispatchEvent(inputEvent);
  1374. let keyEvent = new KeyboardEvent("keydown", {
  1375. key: char,
  1376. char,
  1377. keyCode: char.charCodeAt(0),
  1378. which: char.charCodeAt(0),
  1379. bubbles: true
  1380. });
  1381. $textarea[0].dispatchEvent(keyEvent);
  1382. }
  1383. });
  1384. }
  1385. }, 1e3);
  1386. }
  1387. }
  1388. };
  1389. const _hoisted_1$O = { class: "item" };
  1390. const _hoisted_2$D = { class: "tit" };
  1391. const _hoisted_3$v = ["checked"];
  1392. function _sfc_render$S(_ctx, _cache, $props, $setup, $data, $options) {
  1393. return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$O, [
  1394. vue.createElementVNode("div", _hoisted_2$D, vue.toDisplayString($props.sort) + ". 是否开启中英文混排优化显示", 1),
  1395. vue.createElementVNode("input", {
  1396. type: "checkbox",
  1397. checked: $props.modelValue,
  1398. onChange: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:modelValue", $event.target.checked))
  1399. }, null, 40, _hoisted_3$v)
  1400. ]);
  1401. }
  1402. const MenuPangu = /* @__PURE__ */ _export_sfc(_sfc_main$S, [["render", _sfc_render$S]]);
  1403. const _sfc_main$R = {
  1404. props: ["modelValue", "sort"],
  1405. emits: ["update:modelValue"]
  1406. };
  1407. const _hoisted_1$N = { class: "item" };
  1408. const _hoisted_2$C = { class: "tit" };
  1409. const _hoisted_3$u = ["checked"];
  1410. function _sfc_render$R(_ctx, _cache, $props, $setup, $data, $options) {
  1411. return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$N, [
  1412. vue.createElementVNode("div", _hoisted_2$C, vue.toDisplayString($props.sort) + ". 是否显示等级查询按钮", 1),
  1413. vue.createElementVNode("input", {
  1414. type: "checkbox",
  1415. checked: $props.modelValue,
  1416. onChange: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:modelValue", $event.target.checked))
  1417. }, null, 40, _hoisted_3$u)
  1418. ]);
  1419. }
  1420. const MenuLevelSearch = /* @__PURE__ */ _export_sfc(_sfc_main$R, [["render", _sfc_render$R]]);
  1421. const _sfc_main$Q = {
  1422. props: ["modelValue", "sort"],
  1423. emits: ["update:modelValue"],
  1424. created() {
  1425. if (this.modelValue) {
  1426. $("head").append(`<style>
  1427. .user-menu-dropdown-wrapper .notification.read{display:none!important;}
  1428. .user-menu-dropdown-wrapper .notification.unread{display:list-item!important;}
  1429. </style>`);
  1430. }
  1431. }
  1432. };
  1433. const _hoisted_1$M = { class: "item" };
  1434. const _hoisted_2$B = { class: "tit" };
  1435. const _hoisted_3$t = ["checked"];
  1436. function _sfc_render$Q(_ctx, _cache, $props, $setup, $data, $options) {
  1437. return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$M, [
  1438. vue.createElementVNode("div", _hoisted_2$B, vue.toDisplayString($props.sort) + ". 消息通知仅显示未读", 1),
  1439. vue.createElementVNode("input", {
  1440. type: "checkbox",
  1441. checked: $props.modelValue,
  1442. onChange: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:modelValue", $event.target.checked))
  1443. }, null, 40, _hoisted_3$t)
  1444. ]);
  1445. }
  1446. const MenuShowUnread = /* @__PURE__ */ _export_sfc(_sfc_main$Q, [["render", _sfc_render$Q]]);
  1447. const _sfc_main$P = {
  1448. props: ["modelValue", "sort"],
  1449. emits: ["update:modelValue"],
  1450. created() {
  1451. if (this.modelValue) {
  1452. $("head").append(`<style>.spoiled,.spoiled *{filter:none!important;}</style>`);
  1453. }
  1454. }
  1455. };
  1456. const _hoisted_1$L = { class: "item" };
  1457. const _hoisted_2$A = { class: "tit" };
  1458. const _hoisted_3$s = ["checked"];
  1459. function _sfc_render$P(_ctx, _cache, $props, $setup, $data, $options) {
  1460. return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$L, [
  1461. vue.createElementVNode("div", _hoisted_2$A, vue.toDisplayString($props.sort) + ". 是否屏蔽模糊文字", 1),
  1462. vue.createElementVNode("input", {
  1463. type: "checkbox",
  1464. checked: $props.modelValue,
  1465. onChange: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:modelValue", $event.target.checked))
  1466. }, null, 40, _hoisted_3$s)
  1467. ]);
  1468. }
  1469. const MenuFilterText = /* @__PURE__ */ _export_sfc(_sfc_main$P, [["render", _sfc_render$P]]);
  1470. const _sfc_main$O = {
  1471. props: ["modelValue", "sort"],
  1472. emits: ["update:modelValue"],
  1473. created() {
  1474. if (this.modelValue) {
  1475. $("head").append(`<style>
  1476. .topic-post .cooked+hr,
  1477. .topic-post .signature-img,
  1478. .topic-post .signature-p{display:none}
  1479. .topic-post.current-user-post .cooked+hr,
  1480. .topic-post.current-user-post .signature-img,
  1481. .topic-post.current-user-post .signature-p{display:block}
  1482. </style>`);
  1483. }
  1484. }
  1485. };
  1486. const _hoisted_1$K = { class: "item" };
  1487. const _hoisted_2$z = { class: "tit" };
  1488. const _hoisted_3$r = ["checked"];
  1489. function _sfc_render$O(_ctx, _cache, $props, $setup, $data, $options) {
  1490. return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$K, [
  1491. vue.createElementVNode("div", _hoisted_2$z, vue.toDisplayString($props.sort) + ". 只看自己签名尾巴", 1),
  1492. vue.createElementVNode("input", {
  1493. type: "checkbox",
  1494. checked: $props.modelValue,
  1495. onChange: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:modelValue", $event.target.checked))
  1496. }, null, 40, _hoisted_3$r)
  1497. ]);
  1498. }
  1499. const MenuLookmeSign = /* @__PURE__ */ _export_sfc(_sfc_main$O, [["render", _sfc_render$O]]);
  1500. const _sfc_main$N = {
  1501. props: ["modelValue", "sort"],
  1502. emits: ["update:modelValue"],
  1503. methods: {
  1504. init() {
  1505. $(".sidebar-custom-sections>div:nth-child(1)").after(`
  1506. <div data-section-name="快速访问" class=" sidebar-section-wrapper sidebar-section--expanded">
  1507. <div class="sidebar-section-header-wrapper sidebar-row" id="MenuQuickAccess">
  1508. <button class="btn no-text sidebar-section-header sidebar-section-header-collapsable btn-transparent">
  1509. <span class="sidebar-section-header-caret">
  1510. <svg class="fa d-icon d-icon-angle-down svg-icon svg-string" xmlns="http://www.w3.org/2000/svg">
  1511. <use href="#angle-down"></use>
  1512. </svg>
  1513. </span>
  1514. <span class="sidebar-section-header-text">快速访问</span>
  1515. </button>
  1516. </div>
  1517. <ul class="sidebar-section-content">
  1518. <li class="sidebar-section-link-wrapper">
  1519. <a href="/bookmarks" class="sidebar-section-link sidebar-row">
  1520. <span class="sidebar-section-link-prefix icon">
  1521. <svg class="fa d-icon d-icon-bookmark svg-icon svg-string" xmlns="http://www.w3.org/2000/svg"><use href="#bookmark"></use></svg>
  1522. </span>
  1523. <span class="sidebar-section-link-content-text">我的书签</span>
  1524. </a>
  1525. </li>
  1526. </ul>
  1527. </div>
  1528. `);
  1529. $("#MenuQuickAccess").click(function() {
  1530. $(this).find(".sidebar-section-header-caret").toggleClass("right");
  1531. $(this).siblings(".sidebar-section-content").slideToggle();
  1532. });
  1533. }
  1534. },
  1535. created() {
  1536. if (this.modelValue) {
  1537. setInterval(() => {
  1538. if ($("#MenuQuickAccess").length < 1) {
  1539. this.init();
  1540. }
  1541. }, 1e3);
  1542. }
  1543. }
  1544. };
  1545. const _hoisted_1$J = { class: "item" };
  1546. const _hoisted_2$y = { class: "tit" };
  1547. const _hoisted_3$q = ["checked"];
  1548. function _sfc_render$N(_ctx, _cache, $props, $setup, $data, $options) {
  1549. return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$J, [
  1550. vue.createElementVNode("div", _hoisted_2$y, vue.toDisplayString($props.sort) + ". 开启左侧快速访问", 1),
  1551. vue.createElementVNode("input", {
  1552. type: "checkbox",
  1553. checked: $props.modelValue,
  1554. onChange: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:modelValue", $event.target.checked))
  1555. }, null, 40, _hoisted_3$q)
  1556. ]);
  1557. }
  1558. const MenuQuickAccess = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["render", _sfc_render$N]]);
  1559. const _sfc_main$M = {
  1560. props: ["modelValue", "sort"],
  1561. emits: ["update:modelValue"],
  1562. data() {
  1563. return {
  1564. options: [
  1565. { value: "twitter", label: "twitter" },
  1566. { value: "facebook_messenger", label: "facebook_messenger" },
  1567. { value: "google", label: "google" },
  1568. { value: "google_classic", label: "google_classic" },
  1569. { value: "win10", label: "win10" }
  1570. ]
  1571. };
  1572. },
  1573. computed: {
  1574. value1: {
  1575. get() {
  1576. return this.modelValue.value1;
  1577. },
  1578. set(newValue) {
  1579. this.$emit("update:modelValue", { ...this.modelValue, value1: newValue });
  1580. }
  1581. },
  1582. value2: {
  1583. get() {
  1584. return this.modelValue.value2;
  1585. },
  1586. set(newValue) {
  1587. this.$emit("update:modelValue", { ...this.modelValue, value2: newValue });
  1588. }
  1589. }
  1590. },
  1591. methods: {
  1592. handleChange() {
  1593. this.toggleEmojiStyle();
  1594. },
  1595. toggleEmojiStyle() {
  1596. if (this.value1) {
  1597. this.replaceEmojiStyle();
  1598. this.initObserver();
  1599. } else {
  1600. this.observer && this.observer.disconnect();
  1601. }
  1602. },
  1603. replaceEmojiStyle() {
  1604. const imgs = document.querySelectorAll("img");
  1605. imgs.forEach(this.updateImageSrc);
  1606. },
  1607. updateImageSrc(img) {
  1608. const applePath = "images/emoji/apple";
  1609. if (img.src.includes(applePath)) {
  1610. img.src = img.src.replace(applePath, `images/emoji/${this.value2}`);
  1611. }
  1612. },
  1613. processMutations(mutations) {
  1614. mutations.forEach((mutation) => {
  1615. mutation.addedNodes.forEach((node) => {
  1616. if (node.nodeType === 1) {
  1617. if (node.tagName === "IMG") {
  1618. this.updateImageSrc(node);
  1619. } else if (node.querySelectorAll) {
  1620. node.querySelectorAll("img").forEach(this.updateImageSrc);
  1621. }
  1622. }
  1623. });
  1624. if (mutation.type === "attributes" && mutation.target.tagName === "IMG") {
  1625. this.updateImageSrc(mutation.target);
  1626. }
  1627. });
  1628. },
  1629. initObserver() {
  1630. this.observer = new MutationObserver(this.processMutations);
  1631. this.observer.observe(document.body, {
  1632. childList: true,
  1633. subtree: true,
  1634. attributes: true,
  1635. attributeFilter: ["src"]
  1636. });
  1637. }
  1638. },
  1639. mounted() {
  1640. if (this.value1) {
  1641. this.toggleEmojiStyle();
  1642. }
  1643. },
  1644. beforeDestroy() {
  1645. this.observer && this.observer.disconnect();
  1646. }
  1647. };
  1648. const _hoisted_1$I = { class: "item" };
  1649. const _hoisted_2$x = { class: "tit" };
  1650. const _hoisted_3$p = ["value"];
  1651. function _sfc_render$M(_ctx, _cache, $props, $setup, $data, $options) {
  1652. return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$I, [
  1653. vue.createElementVNode("div", _hoisted_2$x, [
  1654. vue.createTextVNode(vue.toDisplayString($props.sort) + ". 切换论坛表情风格 ", 1),
  1655. vue.withDirectives(vue.createElementVNode("select", {
  1656. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $options.value2 = $event)
  1657. }, [
  1658. (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($data.options, (item) => {
  1659. return vue.openBlock(), vue.createElementBlock("option", {
  1660. value: item.value,
  1661. key: item.value
  1662. }, vue.toDisplayString(item.label), 9, _hoisted_3$p);
  1663. }), 128))
  1664. ], 512), [
  1665. [vue.vModelSelect, $options.value2]
  1666. ])
  1667. ]),
  1668. vue.withDirectives(vue.createElementVNode("input", {
  1669. type: "checkbox",
  1670. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $options.value1 = $event),
  1671. onChange: _cache[2] || (_cache[2] = (...args) => $options.handleChange && $options.handleChange(...args))
  1672. }, null, 544), [
  1673. [vue.vModelCheckbox, $options.value1]
  1674. ])
  1675. ]);
  1676. }
  1677. const MenureplaceEmojiStyle = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["render", _sfc_render$M], ["__scopeId", "data-v-d780d688"]]);
  1678. const _sfc_main$L = {
  1679. props: ["modelValue", "sort"],
  1680. emits: ["update:modelValue"]
  1681. };
  1682. const _hoisted_1$H = { class: "item" };
  1683. const _hoisted_2$w = { class: "tit" };
  1684. const _hoisted_3$o = ["checked"];
  1685. function _sfc_render$L(_ctx, _cache, $props, $setup, $data, $options) {
  1686. return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$H, [
  1687. vue.createElementVNode("div", _hoisted_2$w, vue.toDisplayString($props.sort) + ". 快速打开 Shared(需提前解锁 Shared)", 1),
  1688. vue.createElementVNode("input", {
  1689. type: "checkbox",
  1690. checked: $props.modelValue,
  1691. onChange: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:modelValue", $event.target.checked))
  1692. }, null, 40, _hoisted_3$o)
  1693. ]);
  1694. }
  1695. const MenuShowAI = /* @__PURE__ */ _export_sfc(_sfc_main$L, [["render", _sfc_render$L]]);
  1696. const _sfc_main$K = {
  1697. props: ["modelValue", "sort"],
  1698. emits: ["update:modelValue"],
  1699. created() {
  1700. if (this.modelValue) {
  1701. setInterval(() => {
  1702. if ($(".replyja").length < 1) {
  1703. $("#reply-control .save-or-cancel .create").after(
  1704. `<button class="btn btn-default replyja" style="margin-left:15px;" type="button">ja 字体</button>`
  1705. );
  1706. $(".replyja").click(function() {
  1707. let $textarea = $(".d-editor-textarea-wrapper textarea");
  1708. let text = `<span lang="ja">
  1709. ${$(".d-editor-input").val()}
  1710. </span>`;
  1711. $(".d-editor-textarea-wrapper textarea").val("");
  1712. $textarea.focus();
  1713. for (let i = 0; i < text.length; i++) {
  1714. let char = text[i];
  1715. $textarea.val($textarea.val() + char);
  1716. let inputEvent = new Event("input", {
  1717. bubbles: true,
  1718. cancelable: true
  1719. });
  1720. $textarea[0].dispatchEvent(inputEvent);
  1721. let keyEvent = new KeyboardEvent("keydown", {
  1722. key: char,
  1723. char,
  1724. keyCode: char.charCodeAt(0),
  1725. which: char.charCodeAt(0),
  1726. bubbles: true
  1727. });
  1728. $textarea[0].dispatchEvent(keyEvent);
  1729. }
  1730. });
  1731. }
  1732. }, 1e3);
  1733. }
  1734. }
  1735. };
  1736. const _hoisted_1$G = { class: "item" };
  1737. const _hoisted_2$v = { class: "tit" };
  1738. const _hoisted_3$n = ["checked"];
  1739. function _sfc_render$K(_ctx, _cache, $props, $setup, $data, $options) {
  1740. return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$G, [
  1741. vue.createElementVNode("div", _hoisted_2$v, vue.toDisplayString($props.sort) + ". 编辑器切换 ja 字体", 1),
  1742. vue.createElementVNode("input", {
  1743. type: "checkbox",
  1744. checked: $props.modelValue,
  1745. onChange: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:modelValue", $event.target.checked))
  1746. }, null, 40, _hoisted_3$n)
  1747. ]);
  1748. }
  1749. const MenuEditorJa = /* @__PURE__ */ _export_sfc(_sfc_main$K, [["render", _sfc_render$K]]);
  1750. const _sfc_main$J = {
  1751. props: {
  1752. value: {
  1753. type: Boolean,
  1754. default: false
  1755. },
  1756. sort: {
  1757. type: Number,
  1758. required: true
  1759. }
  1760. },
  1761. data() {
  1762. return {
  1763. localChecked: this.value
  1764. };
  1765. },
  1766. watch: {
  1767. value(newValue) {
  1768. this.localChecked = newValue;
  1769. }
  1770. },
  1771. methods: {
  1772. handleChange() {
  1773. this.$emit("update:value", this.localChecked);
  1774. }
  1775. },
  1776. created() {
  1777. if (this.localChecked) {
  1778. setInterval(() => {
  1779. if ($(".created_order").length < 1) {
  1780. $("#navigation-bar").prepend(
  1781. `<li title="最新创建" class="latest ember-view created_order"><a href="/latest?order=created">最新创建</a></li>`
  1782. );
  1783. $(".created_order").click(function() {
  1784. setTimeout(() => {
  1785. $("#navigation-bar>li").removeClass("active");
  1786. $(this).addClass("active");
  1787. }, 500);
  1788. });
  1789. }
  1790. }, 1e3);
  1791. }
  1792. }
  1793. };
  1794. const _hoisted_1$F = { class: "item" };
  1795. const _hoisted_2$u = { class: "tit" };
  1796. function _sfc_render$J(_ctx, _cache, $props, $setup, $data, $options) {
  1797. return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$F, [
  1798. vue.createElementVNode("div", _hoisted_2$u, vue.toDisplayString($props.sort) + ". 首页新增按创建时间排序", 1),
  1799. vue.withDirectives(vue.createElementVNode("input", {
  1800. type: "checkbox",
  1801. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.localChecked = $event),
  1802. onChange: _cache[1] || (_cache[1] = (...args) => $options.handleChange && $options.handleChange(...args))
  1803. }, null, 544), [
  1804. [vue.vModelCheckbox, $data.localChecked]
  1805. ])
  1806. ]);
  1807. }
  1808. const MenuCreatedOrder = /* @__PURE__ */ _export_sfc(_sfc_main$J, [["render", _sfc_render$J]]);
  1809. const _sfc_main$I = {
  1810. props: ["modelValue", "sort"],
  1811. emits: ["update:modelValue"],
  1812. created() {
  1813. if (this.modelValue) {
  1814. $(window).on("scroll", function() {
  1815. if ($(window).scrollTop() >= 250) {
  1816. $(".navigation-container").addClass("is-active");
  1817. } else {
  1818. $(".navigation-container").removeClass("is-active");
  1819. }
  1820. });
  1821. }
  1822. }
  1823. };
  1824. const _hoisted_1$E = { class: "item" };
  1825. const _hoisted_2$t = { class: "tit" };
  1826. const _hoisted_3$m = ["checked"];
  1827. function _sfc_render$I(_ctx, _cache, $props, $setup, $data, $options) {
  1828. return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$E, [
  1829. vue.createElementVNode("div", _hoisted_2$t, vue.toDisplayString($props.sort) + ". 开启列表页导航栏浮动", 1),
  1830. vue.createElementVNode("input", {
  1831. type: "checkbox",
  1832. checked: $props.modelValue,
  1833. onChange: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:modelValue", $event.target.checked))
  1834. }, null, 40, _hoisted_3$m)
  1835. ]);
  1836. }
  1837. const MenuStickyNav = /* @__PURE__ */ _export_sfc(_sfc_main$I, [["render", _sfc_render$I]]);
  1838. const _sfc_main$H = {
  1839. props: ["modelValue", "sort"],
  1840. emits: ["update:modelValue"],
  1841. methods: {
  1842. async init() {
  1843. const id = $(".post-stream .topic-post:last-child").find("article").attr("data-topic-id");
  1844. let currentId = parseInt(id) + 1;
  1845. const maxAttempts = 10;
  1846. const checkPageExists = async (idToCheck) => {
  1847. const newUrl = `/t/topic/${idToCheck}`;
  1848. try {
  1849. const response = await fetch(newUrl);
  1850. if (response.ok) {
  1851. this.$messageToast("正在跳转下一个帖子!");
  1852. window.location.href = newUrl;
  1853. return true;
  1854. } else {
  1855. return false;
  1856. }
  1857. } catch (error) {
  1858. console.error("请求出错:", error);
  1859. this.$messageToast("请求出错,请稍后再试。");
  1860. return false;
  1861. }
  1862. };
  1863. for (let attempts = 0; attempts < maxAttempts; attempts++) {
  1864. const exists = await checkPageExists(currentId);
  1865. if (exists) {
  1866. break;
  1867. }
  1868. currentId++;
  1869. }
  1870. if (currentId === parseInt(id) + 1 + maxAttempts) {
  1871. this.$messageToast("已是最新帖子!");
  1872. }
  1873. }
  1874. },
  1875. created() {
  1876. if (this.modelValue) {
  1877. let lastKeyTime = 0;
  1878. const doubleClickTime = 300;
  1879. document.addEventListener("keydown", (event) => {
  1880. const activeElement = document.activeElement;
  1881. if (activeElement && activeElement.classList.contains("d-editor-input")) {
  1882. return;
  1883. }
  1884. if (event.key === "ArrowRight") {
  1885. const currentTime = Date.now();
  1886. if (currentTime - lastKeyTime <= doubleClickTime) {
  1887. this.$messageToast("正在检测中...");
  1888. this.init();
  1889. }
  1890. lastKeyTime = currentTime;
  1891. }
  1892. });
  1893. }
  1894. }
  1895. };
  1896. const _hoisted_1$D = { class: "item" };
  1897. const _hoisted_2$s = { class: "tit" };
  1898. const _hoisted_3$l = ["checked"];
  1899. function _sfc_render$H(_ctx, _cache, $props, $setup, $data, $options) {
  1900. return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$D, [
  1901. vue.createElementVNode("div", _hoisted_2$s, [
  1902. vue.createTextVNode(vue.toDisplayString($props.sort) + ". 开启快速打开下一个帖子(快捷键:双击 ", 1),
  1903. _cache[1] || (_cache[1] = vue.createElementVNode("kbd", null, "→", -1)),
  1904. _cache[2] || (_cache[2] = vue.createTextVNode(")"))
  1905. ]),
  1906. vue.createElementVNode("input", {
  1907. type: "checkbox",
  1908. checked: $props.modelValue,
  1909. onChange: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:modelValue", $event.target.checked))
  1910. }, null, 40, _hoisted_3$l)
  1911. ]);
  1912. }
  1913. const MenuNextPosts = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["render", _sfc_render$H]]);
  1914. const _sfc_main$G = {
  1915. props: ["modelValue", "sort"],
  1916. emits: ["update:modelValue"],
  1917. created() {
  1918. if (this.modelValue) {
  1919. $("head").append(`<style>
  1920. .quote-button .quote-sharing{display:none!important}
  1921. </style>`);
  1922. }
  1923. }
  1924. };
  1925. const _hoisted_1$C = { class: "item" };
  1926. const _hoisted_2$r = { class: "tit" };
  1927. const _hoisted_3$k = ["checked"];
  1928. function _sfc_render$G(_ctx, _cache, $props, $setup, $data, $options) {
  1929. return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$C, [
  1930. vue.createElementVNode("div", _hoisted_2$r, vue.toDisplayString($props.sort) + ". 禁用选中文字分享功能", 1),
  1931. vue.createElementVNode("input", {
  1932. type: "checkbox",
  1933. checked: $props.modelValue,
  1934. onChange: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:modelValue", $event.target.checked))
  1935. }, null, 40, _hoisted_3$k)
  1936. ]);
  1937. }
  1938. const MenuSelectedShare = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["render", _sfc_render$G]]);
  1939. const _sfc_main$F = {
  1940. props: ["modelValue", "sort"],
  1941. emits: ["update:modelValue"],
  1942. created() {
  1943. if (this.modelValue) {
  1944. setInterval(() => {
  1945. $(".cooked iframe, .cooked video").each(function() {
  1946. const $element = $(this);
  1947. let src = $element.attr("src");
  1948. if (src) {
  1949. if (!src.includes("autoplay=false")) {
  1950. if (src.includes("autoplay=")) {
  1951. src = src.replace(/autoplay=[^&]*/, "autoplay=false");
  1952. } else {
  1953. const separator = src.includes("?") ? "&" : "?";
  1954. src += `${separator}autoplay=false`;
  1955. }
  1956. $element.attr("src", src);
  1957. }
  1958. }
  1959. });
  1960. }, 1e3);
  1961. }
  1962. }
  1963. };
  1964. const _hoisted_1$B = { class: "item" };
  1965. const _hoisted_2$q = { class: "tit" };
  1966. const _hoisted_3$j = ["checked"];
  1967. function _sfc_render$F(_ctx, _cache, $props, $setup, $data, $options) {
  1968. return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$B, [
  1969. vue.createElementVNode("div", _hoisted_2$q, vue.toDisplayString($props.sort) + ". 禁用视频自动播放", 1),
  1970. vue.createElementVNode("input", {
  1971. type: "checkbox",
  1972. checked: $props.modelValue,
  1973. onChange: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:modelValue", $event.target.checked))
  1974. }, null, 40, _hoisted_3$j)
  1975. ]);
  1976. }
  1977. const MenuDisableAutoplay = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["render", _sfc_render$F]]);
  1978. const _sfc_main$E = {
  1979. props: ["modelValue", "sort"],
  1980. emits: ["update:modelValue"]
  1981. };
  1982. const _hoisted_1$A = { class: "item" };
  1983. const _hoisted_2$p = { class: "tit" };
  1984. const _hoisted_3$i = ["checked"];
  1985. function _sfc_render$E(_ctx, _cache, $props, $setup, $data, $options) {
  1986. return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$A, [
  1987. vue.createElementVNode("div", _hoisted_2$p, vue.toDisplayString($props.sort) + ". 是否显示回复悬浮按钮", 1),
  1988. vue.createElementVNode("input", {
  1989. type: "checkbox",
  1990. checked: $props.modelValue,
  1991. onChange: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:modelValue", $event.target.checked))
  1992. }, null, 40, _hoisted_3$i)
  1993. ]);
  1994. }
  1995. const MenuShowRepltBtn = /* @__PURE__ */ _export_sfc(_sfc_main$E, [["render", _sfc_render$E]]);
  1996. const _sfc_main$D = {
  1997. props: ["modelValue", "sort"],
  1998. emits: ["update:modelValue"],
  1999. methods: {
  2000. init() {
  2001. $(".topic-list .main-link a.title").each(function() {
  2002. const id = $(this).attr("data-topic-id");
  2003. if ($(this).parents(".link-top-line").find(".donottopic-btn").length < 1) {
  2004. $(this).parents(".link-top-line").append(
  2005. `<button class="btn btn-icon-text btn-default donottopic-btn donottopic-${id}" data-id="${id}">免打扰</button>`
  2006. );
  2007. }
  2008. });
  2009. function getCSRFToken() {
  2010. return document.querySelector('meta[name="csrf-token"]').getAttribute("content");
  2011. }
  2012. $(document).off("click", ".donottopic-btn").on("click", ".donottopic-btn", function() {
  2013. const formData = new FormData();
  2014. formData.append("notification_level", 0);
  2015. const topicId = $(this).attr("data-id");
  2016. return new Promise((resolve, reject) => {
  2017. fetch(`https://linux.do/t/${topicId}/notifications`, {
  2018. method: "POST",
  2019. body: formData,
  2020. headers: {
  2021. "X-CSRF-Token": getCSRFToken(),
  2022. // CSRF 令牌
  2023. "X-Requested-With": "XMLHttpRequest"
  2024. // 表明这是 XMLHttpRequest 请求
  2025. },
  2026. credentials: "include"
  2027. // 附带 cookie
  2028. }).then((response) => {
  2029. if (!response.ok) {
  2030. reject(`HTTP error! status: ${response.status}`);
  2031. }
  2032. return response.json();
  2033. }).then(() => {
  2034. $(this).parents(".topic-list-item").remove();
  2035. const messageElement = $(
  2036. `<div class="messageToast-text">帖子已设为免打扰!</div>`
  2037. );
  2038. $("#messageToast").append(messageElement);
  2039. setTimeout(() => {
  2040. messageElement.remove();
  2041. }, 3e3);
  2042. resolve();
  2043. }).catch((error) => {
  2044. console.log(error);
  2045. });
  2046. });
  2047. });
  2048. }
  2049. },
  2050. created() {
  2051. if (this.modelValue) {
  2052. setInterval(() => {
  2053. this.init();
  2054. }, 1e3);
  2055. }
  2056. }
  2057. };
  2058. const _hoisted_1$z = { class: "item" };
  2059. const _hoisted_2$o = { class: "tit" };
  2060. const _hoisted_3$h = ["checked"];
  2061. function _sfc_render$D(_ctx, _cache, $props, $setup, $data, $options) {
  2062. return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$z, [
  2063. vue.createElementVNode("div", _hoisted_2$o, vue.toDisplayString($props.sort) + ". 列表快速免打扰帖子", 1),
  2064. vue.createElementVNode("input", {
  2065. type: "checkbox",
  2066. checked: $props.modelValue,
  2067. onChange: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:modelValue", $event.target.checked))
  2068. }, null, 40, _hoisted_3$h)
  2069. ]);
  2070. }
  2071. const MenuDonotTopic = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["render", _sfc_render$D]]);
  2072. const _sfc_main$C = {
  2073. props: ["modelValue", "sort"],
  2074. emits: ["update:modelValue"],
  2075. created() {
  2076. if (this.modelValue) {
  2077. setTimeout(() => {
  2078. var svgElement = $('button[title="切换颜色主题"]').find("svg");
  2079. var currentTime = /* @__PURE__ */ new Date();
  2080. var currentHour = currentTime.getHours();
  2081. if (currentHour >= 18 || currentHour < 6) {
  2082. console.log("现在是夜里");
  2083. if (svgElement.hasClass("d-icon-moon")) {
  2084. $('button[title="切换颜色主题"]')[0].click();
  2085. }
  2086. } else {
  2087. console.log("现在不是夜里");
  2088. if (svgElement.hasClass("d-icon-sun")) {
  2089. $('button[title="切换颜色主题"]')[0].click();
  2090. }
  2091. }
  2092. }, 1e3);
  2093. }
  2094. }
  2095. };
  2096. const _hoisted_1$y = { class: "item" };
  2097. const _hoisted_2$n = { class: "tit" };
  2098. const _hoisted_3$g = ["checked"];
  2099. function _sfc_render$C(_ctx, _cache, $props, $setup, $data, $options) {
  2100. return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$y, [
  2101. vue.createElementVNode("div", _hoisted_2$n, vue.toDisplayString($props.sort) + ". 是否自动切换黑夜模式", 1),
  2102. vue.createElementVNode("input", {
  2103. type: "checkbox",
  2104. checked: $props.modelValue,
  2105. onChange: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:modelValue", $event.target.checked))
  2106. }, null, 40, _hoisted_3$g)
  2107. ]);
  2108. }
  2109. const MenuAutoDark = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["render", _sfc_render$C]]);
  2110. const _sfc_main$B = {
  2111. props: ["modelValue", "sort"],
  2112. emits: ["update:modelValue"],
  2113. created() {
  2114. if (this.modelValue) {
  2115. $("head").append(`<style>
  2116. .d-editor-input::placeholder{opacity:0;}
  2117. </style>`);
  2118. }
  2119. }
  2120. };
  2121. const _hoisted_1$x = { class: "item" };
  2122. const _hoisted_2$m = { class: "tit" };
  2123. const _hoisted_3$f = ["checked"];
  2124. function _sfc_render$B(_ctx, _cache, $props, $setup, $data, $options) {
  2125. return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$x, [
  2126. vue.createElementVNode("div", _hoisted_2$m, vue.toDisplayString($props.sort) + ". 是否隐藏输入框提示文字", 1),
  2127. vue.createElementVNode("input", {
  2128. type: "checkbox",
  2129. checked: $props.modelValue,
  2130. onChange: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:modelValue", $event.target.checked))
  2131. }, null, 40, _hoisted_3$f)
  2132. ]);
  2133. }
  2134. const MenuHiddenPlaceholder = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["render", _sfc_render$B]]);
  2135. const _sfc_main$A = {
  2136. props: ["modelValue", "sort"],
  2137. emits: ["update:modelValue"],
  2138. created() {
  2139. if (this.modelValue) {
  2140. try {
  2141. require("discourse/routes/topic").default.disableReplaceState = true;
  2142. console.log("disableReplaceState 已成功设置为 true");
  2143. } catch (e) {
  2144. console.error("设置 disableReplaceState 失败:", e);
  2145. }
  2146. }
  2147. }
  2148. };
  2149. const _hoisted_1$w = { class: "item" };
  2150. const _hoisted_2$l = { class: "tit" };
  2151. const _hoisted_3$e = ["checked"];
  2152. function _sfc_render$A(_ctx, _cache, $props, $setup, $data, $options) {
  2153. return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$w, [
  2154. vue.createElementVNode("div", _hoisted_2$l, vue.toDisplayString($props.sort) + ". 是否禁用浏览帖子时 URL 更新楼层数", 1),
  2155. vue.createElementVNode("input", {
  2156. type: "checkbox",
  2157. checked: $props.modelValue,
  2158. onChange: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:modelValue", $event.target.checked))
  2159. }, null, 40, _hoisted_3$e)
  2160. ]);
  2161. }
  2162. const MenuDisableReplaceState = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["render", _sfc_render$A]]);
  2163. const _sfc_main$z = {
  2164. props: ["modelValue", "sort"],
  2165. emits: ["update:modelValue"],
  2166. created() {
  2167. if (this.modelValue.enable) {
  2168. $("head").append(`<style>
  2169. .topic-list-data.posters { width: max-content !important; }
  2170. .topic-list-content.right { margin-left:0 !important; }
  2171. .topic-list-data.posters ${this.modelValue.showAuthor ? "> *:not(:first-child)" : ""},
  2172. .topic-list-avatar.pull-left { display:none !important }
  2173. </style>`);
  2174. }
  2175. }
  2176. };
  2177. const _hoisted_1$v = { class: "item" };
  2178. const _hoisted_2$k = { class: "tit" };
  2179. const _hoisted_3$d = ["checked"];
  2180. const _hoisted_4$6 = ["checked"];
  2181. function _sfc_render$z(_ctx, _cache, $props, $setup, $data, $options) {
  2182. return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$v, [
  2183. vue.createElementVNode("div", _hoisted_2$k, [
  2184. vue.createTextVNode(vue.toDisplayString($props.sort) + ". 是否移除话题列表上的头像(是否保留发帖人 ", 1),
  2185. vue.createElementVNode("input", {
  2186. type: "checkbox",
  2187. checked: $props.modelValue.showAuthor,
  2188. onChange: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:modelValue", {
  2189. enable: $props.modelValue.enable,
  2190. showAuthor: $event.target.checked
  2191. }))
  2192. }, null, 40, _hoisted_3$d),
  2193. _cache[2] || (_cache[2] = vue.createTextVNode(" ) "))
  2194. ]),
  2195. vue.createElementVNode("input", {
  2196. type: "checkbox",
  2197. checked: $props.modelValue.enable,
  2198. onChange: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("update:modelValue", {
  2199. enable: $event.target.checked,
  2200. showAuthor: $props.modelValue.showAuthor
  2201. }))
  2202. }, null, 40, _hoisted_4$6)
  2203. ]);
  2204. }
  2205. const MenuRemovePostAvatar = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["render", _sfc_render$z]]);
  2206. const _sfc_main$y = {
  2207. props: ["modelValue", "sort"],
  2208. emits: ["update:modelValue"]
  2209. };
  2210. const _hoisted_1$u = { class: "item" };
  2211. const _hoisted_2$j = { class: "tit" };
  2212. const _hoisted_3$c = ["checked"];
  2213. function _sfc_render$y(_ctx, _cache, $props, $setup, $data, $options) {
  2214. return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$u, [
  2215. vue.createElementVNode("div", _hoisted_2$j, vue.toDisplayString($props.sort) + ". 是否显示最热帖子排行榜", 1),
  2216. vue.createElementVNode("input", {
  2217. type: "checkbox",
  2218. checked: $props.modelValue,
  2219. onChange: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:modelValue", $event.target.checked))
  2220. }, null, 40, _hoisted_3$c)
  2221. ]);
  2222. }
  2223. const MenuHotRankingList = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["render", _sfc_render$y]]);
  2224. const _sfc_main$x = {
  2225. props: ["modelValue", "sort"],
  2226. emits: ["update:modelValue"]
  2227. };
  2228. const _hoisted_1$t = { class: "item" };
  2229. const _hoisted_2$i = { class: "tit" };
  2230. const _hoisted_3$b = ["checked"];
  2231. function _sfc_render$x(_ctx, _cache, $props, $setup, $data, $options) {
  2232. return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$t, [
  2233. vue.createElementVNode("div", _hoisted_2$i, vue.toDisplayString($props.sort) + ". 显示返回顶部按钮", 1),
  2234. vue.createElementVNode("input", {
  2235. type: "checkbox",
  2236. checked: $props.modelValue,
  2237. onChange: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:modelValue", $event.target.checked))
  2238. }, null, 40, _hoisted_3$b)
  2239. ]);
  2240. }
  2241. const MenuBackToTop = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["render", _sfc_render$x]]);
  2242. const _sfc_main$w = {
  2243. props: ["modelValue", "sort"],
  2244. emits: ["update:modelValue"],
  2245. data() {
  2246. return {
  2247. isFocusedOnInput: false
  2248. // 标记当前是否聚焦在输入框上
  2249. };
  2250. },
  2251. created() {
  2252. if (this.modelValue) {
  2253. window.addEventListener("keydown", this.handleKeyDown);
  2254. window.addEventListener("focus", this.handleFocus, true);
  2255. window.addEventListener("blur", this.handleBlur, true);
  2256. }
  2257. },
  2258. beforeUnmount() {
  2259. window.removeEventListener("keydown", this.handleKeyDown);
  2260. window.removeEventListener("focus", this.handleFocus, true);
  2261. window.removeEventListener("blur", this.handleBlur, true);
  2262. },
  2263. watch: {
  2264. modelValue(newValue) {
  2265. if (newValue) {
  2266. window.addEventListener("keydown", this.handleKeyDown);
  2267. window.addEventListener("focus", this.handleFocus, true);
  2268. window.addEventListener("blur", this.handleBlur, true);
  2269. } else {
  2270. window.removeEventListener("keydown", this.handleKeyDown);
  2271. window.removeEventListener("focus", this.handleFocus, true);
  2272. window.removeEventListener("blur", this.handleBlur, true);
  2273. }
  2274. }
  2275. },
  2276. methods: {
  2277. handleKeyDown(event) {
  2278. if (this.isFocusedOnInput) return;
  2279. if (event.key.toLowerCase() === "q") {
  2280. const parentSelector = "#post_1";
  2281. const button = document.querySelector(
  2282. `${parentSelector} .btn-toggle-reaction-like[title="点赞此帖子"]`
  2283. );
  2284. if (button) {
  2285. button.click();
  2286. this.$messageToast("已点赞!");
  2287. } else {
  2288. console.log("按钮未找到");
  2289. }
  2290. }
  2291. },
  2292. handleFocus(event) {
  2293. if (event.target.tagName.toLowerCase() === "input" || event.target.tagName.toLowerCase() === "textarea") {
  2294. this.isFocusedOnInput = true;
  2295. }
  2296. },
  2297. handleBlur(event) {
  2298. if (event.target.tagName.toLowerCase() === "input" || event.target.tagName.toLowerCase() === "textarea") {
  2299. this.isFocusedOnInput = false;
  2300. }
  2301. }
  2302. }
  2303. };
  2304. const _hoisted_1$s = { class: "item" };
  2305. const _hoisted_2$h = { class: "tit" };
  2306. const _hoisted_3$a = ["checked"];
  2307. function _sfc_render$w(_ctx, _cache, $props, $setup, $data, $options) {
  2308. return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$s, [
  2309. vue.createElementVNode("div", _hoisted_2$h, [
  2310. vue.createTextVNode(vue.toDisplayString($props.sort) + ". 是否开启快捷给主题点赞 (快捷键:", 1),
  2311. _cache[1] || (_cache[1] = vue.createElementVNode("kbd", null, "Q", -1)),
  2312. _cache[2] || (_cache[2] = vue.createTextVNode(")"))
  2313. ]),
  2314. vue.createElementVNode("input", {
  2315. type: "checkbox",
  2316. checked: $props.modelValue,
  2317. onChange: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:modelValue", $event.target.checked))
  2318. }, null, 40, _hoisted_3$a)
  2319. ]);
  2320. }
  2321. const MenuQuickLikeTopic = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["render", _sfc_render$w]]);
  2322. const _sfc_main$v = {
  2323. props: ["modelValue", "sort"],
  2324. emits: ["update:modelValue"],
  2325. created() {
  2326. if (this.modelValue) {
  2327. $("head").append(`<style>
  2328. .sidebar-section-link-suffix.icon.unread,
  2329. .topic-post-badges{display:none !important}
  2330. </style>`);
  2331. }
  2332. }
  2333. };
  2334. const _hoisted_1$r = { class: "item" };
  2335. const _hoisted_2$g = { class: "tit" };
  2336. const _hoisted_3$9 = ["checked"];
  2337. function _sfc_render$v(_ctx, _cache, $props, $setup, $data, $options) {
  2338. return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$r, [
  2339. vue.createElementVNode("div", _hoisted_2$g, vue.toDisplayString($props.sort) + ". 是否隐藏新消息小蓝点(除帖子未读小蓝点)", 1),
  2340. vue.createElementVNode("input", {
  2341. type: "checkbox",
  2342. checked: $props.modelValue,
  2343. onChange: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:modelValue", $event.target.checked))
  2344. }, null, 40, _hoisted_3$9)
  2345. ]);
  2346. }
  2347. const MenuHideNewBluedot = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["render", _sfc_render$v]]);
  2348. const _sfc_main$u = {
  2349. props: ["modelValue", "sort"],
  2350. emits: ["update:modelValue"],
  2351. created() {
  2352. if (this.modelValue) {
  2353. setInterval(() => {
  2354. $(".post-avatar .avatar").each(function() {
  2355. const currentSrc = $(this).attr("src");
  2356. if (currentSrc.endsWith(".gif")) {
  2357. $(this).attr("src", currentSrc.replace(".gif", ".png"));
  2358. }
  2359. });
  2360. }, 1e3);
  2361. }
  2362. }
  2363. };
  2364. const _hoisted_1$q = { class: "item" };
  2365. const _hoisted_2$f = { class: "tit" };
  2366. const _hoisted_3$8 = ["checked"];
  2367. function _sfc_render$u(_ctx, _cache, $props, $setup, $data, $options) {
  2368. return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$q, [
  2369. vue.createElementVNode("div", _hoisted_2$f, vue.toDisplayString($props.sort) + ". gif 头像转静态图片(不喜花里胡哨的佬友可以开启)", 1),
  2370. vue.createElementVNode("input", {
  2371. type: "checkbox",
  2372. checked: $props.modelValue,
  2373. onChange: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:modelValue", $event.target.checked))
  2374. }, null, 40, _hoisted_3$8)
  2375. ]);
  2376. }
  2377. const MenuGifToPng = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["render", _sfc_render$u]]);
  2378. const _sfc_main$t = {
  2379. props: ["modelValue", "sort"],
  2380. emits: ["update:modelValue"],
  2381. created() {
  2382. if (this.modelValue) {
  2383. $("head").append(`<style>
  2384. .search-banner{display:none!important;}
  2385. #main-outlet{padding-top:1.5em!important;}
  2386. </style>`);
  2387. }
  2388. }
  2389. };
  2390. const _hoisted_1$p = { class: "item" };
  2391. const _hoisted_2$e = { class: "tit" };
  2392. const _hoisted_3$7 = ["checked"];
  2393. function _sfc_render$t(_ctx, _cache, $props, $setup, $data, $options) {
  2394. return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$p, [
  2395. vue.createElementVNode("div", _hoisted_2$e, vue.toDisplayString($props.sort) + ". 是否隐藏首页 banner 区域", 1),
  2396. vue.createElementVNode("input", {
  2397. type: "checkbox",
  2398. checked: $props.modelValue,
  2399. onChange: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:modelValue", $event.target.checked))
  2400. }, null, 40, _hoisted_3$7)
  2401. ]);
  2402. }
  2403. const MenuHideHomeBanner = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_render$t]]);
  2404. const _sfc_main$s = {
  2405. props: {
  2406. value: {
  2407. type: String,
  2408. default: ""
  2409. },
  2410. sort: {
  2411. type: Number,
  2412. required: true
  2413. }
  2414. },
  2415. data() {
  2416. return {
  2417. textarea: this.value
  2418. };
  2419. },
  2420. watch: {
  2421. value(newValue) {
  2422. this.textarea = newValue;
  2423. }
  2424. },
  2425. methods: {
  2426. handleChange() {
  2427. this.$emit("update:value", this.textarea);
  2428. }
  2429. },
  2430. created() {
  2431. if (this.textarea) {
  2432. $("body").after(`<style>${this.textarea}</style>`);
  2433. }
  2434. }
  2435. };
  2436. const _hoisted_1$o = { class: "item" };
  2437. const _hoisted_2$d = { class: "tit" };
  2438. function _sfc_render$s(_ctx, _cache, $props, $setup, $data, $options) {
  2439. return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
  2440. vue.createElementVNode("div", _hoisted_1$o, [
  2441. vue.createElementVNode("div", _hoisted_2$d, vue.toDisplayString($props.sort) + ". 自定义 CSS(支持 import 引入第三方样式文件) ", 1)
  2442. ]),
  2443. vue.withDirectives(vue.createElementVNode("textarea", {
  2444. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.textarea = $event),
  2445. onInput: _cache[1] || (_cache[1] = (...args) => $options.handleChange && $options.handleChange(...args)),
  2446. placeholder: "body{font-size:16px;}"
  2447. }, " ", 544), [
  2448. [vue.vModelText, $data.textarea]
  2449. ])
  2450. ], 64);
  2451. }
  2452. const MenuOtherCss = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["render", _sfc_render$s], ["__scopeId", "data-v-e33f1de9"]]);
  2453. const _sfc_main$r = {
  2454. props: {
  2455. value: {
  2456. type: String,
  2457. default: ""
  2458. },
  2459. sort: {
  2460. type: Number,
  2461. required: true
  2462. }
  2463. },
  2464. data() {
  2465. return {
  2466. textarea: this.value
  2467. };
  2468. },
  2469. watch: {
  2470. value(newValue) {
  2471. this.textarea = newValue;
  2472. }
  2473. },
  2474. methods: {
  2475. handleChange() {
  2476. this.$emit("update:value", this.textarea);
  2477. },
  2478. init() {
  2479. $(".d-header .title a").html(`<img src="${this.textarea}">`);
  2480. }
  2481. },
  2482. created() {
  2483. if (this.textarea && this.textarea != "") {
  2484. this.init();
  2485. }
  2486. }
  2487. };
  2488. const _hoisted_1$n = { class: "item" };
  2489. const _hoisted_2$c = { class: "tit" };
  2490. function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) {
  2491. return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
  2492. vue.createElementVNode("div", _hoisted_1$n, [
  2493. vue.createElementVNode("div", _hoisted_2$c, vue.toDisplayString($props.sort) + ". 自定义论坛 logo", 1)
  2494. ]),
  2495. vue.withDirectives(vue.createElementVNode("input", {
  2496. type: "text",
  2497. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.textarea = $event),
  2498. onInput: _cache[1] || (_cache[1] = (...args) => $options.handleChange && $options.handleChange(...args)),
  2499. placeholder: "输入图片链接"
  2500. }, null, 544), [
  2501. [vue.vModelText, $data.textarea]
  2502. ])
  2503. ], 64);
  2504. }
  2505. const MenuLogoUrl = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["render", _sfc_render$r], ["__scopeId", "data-v-cb743585"]]);
  2506. const _sfc_main$q = {
  2507. props: {
  2508. value: {
  2509. type: String,
  2510. default: ""
  2511. },
  2512. sort: {
  2513. type: Number,
  2514. required: true
  2515. }
  2516. },
  2517. data() {
  2518. return {
  2519. textarea: this.value
  2520. };
  2521. },
  2522. watch: {
  2523. value(newValue) {
  2524. this.textarea = newValue;
  2525. }
  2526. },
  2527. methods: {
  2528. handleChange() {
  2529. this.$emit("update:value", this.textarea);
  2530. },
  2531. init() {
  2532. this.list = this.textarea.split(/\r?\n/) || [];
  2533. if ($(".createreply").length < 1) {
  2534. $(".timeline-container .topic-timeline").append(
  2535. `<div class="createreply" style="margin-top:6.4rem;"></div>`
  2536. );
  2537. this.list.forEach(function(item) {
  2538. var $li = $(
  2539. '<button class="btn btn-default create reply-to-post no-text btn-icon" type="button"></button>'
  2540. ).text(item);
  2541. $(".createreply").append($li);
  2542. });
  2543. $(".createreply button").click(function() {
  2544. if ($(".timeline-footer-controls button.create").length != 0) {
  2545. $(".timeline-footer-controls button.create")[0].click();
  2546. }
  2547. if ($("#topic-footer-buttons .topic-footer-main-buttons button.create").length != 0) {
  2548. $(
  2549. "#topic-footer-buttons .topic-footer-main-buttons button.create"
  2550. )[0].click();
  2551. }
  2552. setTimeout(() => {
  2553. let $textarea = $(".d-editor-textarea-wrapper textarea");
  2554. let text = $(this).html();
  2555. $textarea.focus();
  2556. for (let i = 0; i < text.length; i++) {
  2557. let char = text[i];
  2558. $textarea.val($textarea.val() + char);
  2559. let inputEvent = new Event("input", {
  2560. bubbles: true,
  2561. cancelable: true
  2562. });
  2563. $textarea[0].dispatchEvent(inputEvent);
  2564. let keyEvent = new KeyboardEvent("keydown", {
  2565. key: char,
  2566. char,
  2567. keyCode: char.charCodeAt(0),
  2568. which: char.charCodeAt(0),
  2569. bubbles: true
  2570. });
  2571. $textarea[0].dispatchEvent(keyEvent);
  2572. }
  2573. }, 1e3);
  2574. });
  2575. }
  2576. }
  2577. },
  2578. created() {
  2579. if (this.textarea) {
  2580. setInterval(() => {
  2581. this.init();
  2582. }, 1e3);
  2583. }
  2584. }
  2585. };
  2586. const _hoisted_1$m = { class: "item" };
  2587. const _hoisted_2$b = { class: "tit" };
  2588. function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
  2589. return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
  2590. vue.createElementVNode("div", _hoisted_1$m, [
  2591. vue.createElementVNode("div", _hoisted_2$b, vue.toDisplayString($props.sort) + ". 自定义快捷回复(换行分隔)", 1)
  2592. ]),
  2593. vue.withDirectives(vue.createElementVNode("textarea", {
  2594. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.textarea = $event),
  2595. onInput: _cache[1] || (_cache[1] = (...args) => $options.handleChange && $options.handleChange(...args)),
  2596. placeholder: "前排围观支持一下\\n感谢分享大佬厉害啊\\n有点厉害支持~~"
  2597. }, " ", 544), [
  2598. [vue.vModelText, $data.textarea]
  2599. ])
  2600. ], 64);
  2601. }
  2602. const MenuCreatereply = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_render$q], ["__scopeId", "data-v-97d36adb"]]);
  2603. const _sfc_main$p = {
  2604. props: {
  2605. value: {
  2606. type: String,
  2607. default: ""
  2608. },
  2609. sort: {
  2610. type: Number,
  2611. required: true
  2612. }
  2613. },
  2614. data() {
  2615. return {
  2616. textarea: this.value
  2617. };
  2618. },
  2619. watch: {
  2620. value(newValue) {
  2621. this.textarea = newValue;
  2622. }
  2623. },
  2624. methods: {
  2625. handleChange() {
  2626. this.$emit("update:value", this.textarea);
  2627. },
  2628. init() {
  2629. this.list = this.textarea.split(",") || [];
  2630. var self = this;
  2631. $(".topic-list .topic-list-data.posters>a:nth-child(1)").filter((index, element) => {
  2632. var user = $(element).attr("data-user-card");
  2633. return self.list.indexOf(user) !== -1;
  2634. }).parents("tr.topic-list-item").hide();
  2635. $(".topic-post .full-name a").filter((index, element) => {
  2636. var user = $(element).attr("data-user-card");
  2637. return self.list.indexOf(user) !== -1;
  2638. }).parents(".topic-post").hide();
  2639. }
  2640. },
  2641. created() {
  2642. if (this.textarea) {
  2643. let pollinglength1 = 0;
  2644. let pollinglength2 = 0;
  2645. setInterval(() => {
  2646. if (pollinglength1 != $(".topic-list-body tr").length) {
  2647. pollinglength1 = $(".topic-list-body tr").length;
  2648. this.init();
  2649. }
  2650. if (pollinglength2 != $(".post-stream .topic-post").length) {
  2651. pollinglength2 = $(".post-stream .topic-post").length;
  2652. this.init();
  2653. }
  2654. }, 1e3);
  2655. }
  2656. }
  2657. };
  2658. const _hoisted_1$l = { class: "item" };
  2659. const _hoisted_2$a = { class: "tit" };
  2660. function _sfc_render$p(_ctx, _cache, $props, $setup, $data, $options) {
  2661. return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
  2662. vue.createElementVNode("div", _hoisted_1$l, [
  2663. vue.createElementVNode("div", _hoisted_2$a, vue.toDisplayString($props.sort) + ". 屏蔽指定用户(使用英文,分隔)", 1)
  2664. ]),
  2665. vue.withDirectives(vue.createElementVNode("textarea", {
  2666. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.textarea = $event),
  2667. onInput: _cache[1] || (_cache[1] = (...args) => $options.handleChange && $options.handleChange(...args)),
  2668. placeholder: "user1,user2,user3"
  2669. }, " ", 544), [
  2670. [vue.vModelText, $data.textarea]
  2671. ])
  2672. ], 64);
  2673. }
  2674. const MenuBlockuserlist = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_render$p], ["__scopeId", "data-v-7dffe7ad"]]);
  2675. const _sfc_main$o = {
  2676. props: {
  2677. value: {
  2678. type: String,
  2679. default: ""
  2680. },
  2681. sort: {
  2682. type: Number,
  2683. required: true
  2684. }
  2685. },
  2686. data() {
  2687. return {
  2688. textarea: this.value
  2689. };
  2690. },
  2691. watch: {
  2692. value(newValue) {
  2693. this.textarea = newValue;
  2694. }
  2695. },
  2696. methods: {
  2697. handleChange() {
  2698. this.$emit("update:value", this.textarea);
  2699. },
  2700. init() {
  2701. if (!this.textarea) return;
  2702. const keywords = this.textarea.split(",").map((keyword) => keyword.trim()).filter(Boolean);
  2703. if (keywords.length === 0) return;
  2704. try {
  2705. $(".topic-list .main-link .raw-topic-link>*").filter((index, element) => {
  2706. const text = $(element).text();
  2707. return keywords.some((keyword) => text.includes(keyword));
  2708. }).parents("tr.topic-list-item").hide();
  2709. $(".topic-list-item .discourse-tags a").filter((index, element) => {
  2710. const text = $(element).text();
  2711. return keywords.some((keyword) => text.includes(keyword));
  2712. }).parents("tr.topic-list-item").hide();
  2713. $(".topic-body .cooked").filter((index, element) => {
  2714. const text = $(element).text();
  2715. return keywords.some((keyword) => text.includes(keyword));
  2716. }).parents(".topic-post").hide();
  2717. } catch (error) {
  2718. console.error("init 方法出错:", error);
  2719. }
  2720. }
  2721. },
  2722. created() {
  2723. if (this.textarea) {
  2724. let previousTopicListLength = 0;
  2725. let previousPostStreamLength = 0;
  2726. this.pollingInterval = setInterval(() => {
  2727. try {
  2728. const currentTopicListLength = $(".topic-list-body tr").length || 0;
  2729. const currentPostStreamLength = $(".post-stream .topic-post").length || 0;
  2730. if (previousTopicListLength !== currentTopicListLength) {
  2731. previousTopicListLength = currentTopicListLength;
  2732. this.init();
  2733. }
  2734. if (previousPostStreamLength !== currentPostStreamLength) {
  2735. previousPostStreamLength = currentPostStreamLength;
  2736. this.init();
  2737. }
  2738. } catch (error) {
  2739. console.error("轮询逻辑出错:", error);
  2740. }
  2741. }, 1e3);
  2742. }
  2743. },
  2744. beforeDestroy() {
  2745. if (this.pollingInterval) {
  2746. clearInterval(this.pollingInterval);
  2747. }
  2748. }
  2749. };
  2750. const _hoisted_1$k = { class: "item" };
  2751. const _hoisted_2$9 = { class: "tit" };
  2752. function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) {
  2753. return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
  2754. vue.createElementVNode("div", _hoisted_1$k, [
  2755. vue.createElementVNode("div", _hoisted_2$9, vue.toDisplayString($props.sort) + ". 关键词屏蔽功能(使用英文,分隔)屏蔽包含关键字的话题标题、标签、回复 ", 1)
  2756. ]),
  2757. vue.withDirectives(vue.createElementVNode("textarea", {
  2758. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.textarea = $event),
  2759. onInput: _cache[1] || (_cache[1] = (...args) => $options.handleChange && $options.handleChange(...args))
  2760. }, " ", 544), [
  2761. [vue.vModelText, $data.textarea]
  2762. ])
  2763. ], 64);
  2764. }
  2765. const MenuBlockKeyword = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["render", _sfc_render$o], ["__scopeId", "data-v-7877f446"]]);
  2766. const _sfc_main$n = {
  2767. props: {
  2768. value: {
  2769. type: Object,
  2770. default: {
  2771. value1: false,
  2772. cate: "搞七捻三",
  2773. days: "5"
  2774. }
  2775. },
  2776. sort: {
  2777. type: Number,
  2778. required: true
  2779. }
  2780. },
  2781. data() {
  2782. return {
  2783. localChecked: this.value
  2784. };
  2785. },
  2786. watch: {
  2787. value(newValue) {
  2788. this.localChecked = newValue;
  2789. }
  2790. },
  2791. methods: {
  2792. handleChange() {
  2793. this.$emit("update:value", this.localChecked);
  2794. },
  2795. // 过滤时间格式
  2796. convertToTimestamp(dateStr) {
  2797. const cleanedDateStr = dateStr.replace(/\s+/g, "");
  2798. const datePattern = /(\d{4})年(\d{1,2})月(\d{1,2})日(\d{2}):(\d{2})/;
  2799. const dateMatch = cleanedDateStr.match(datePattern);
  2800. if (dateMatch) {
  2801. const year = parseInt(dateMatch[1], 10);
  2802. const month = parseInt(dateMatch[2], 10) - 1;
  2803. const day = parseInt(dateMatch[3], 10);
  2804. const hours = parseInt(dateMatch[4], 10);
  2805. const minutes = parseInt(dateMatch[5], 10);
  2806. const date = new Date(year, month, day, hours, minutes);
  2807. return date.getTime();
  2808. }
  2809. return null;
  2810. },
  2811. // 屏蔽指定分类、指定时间
  2812. GetTimestamp() {
  2813. if (!$(".nav-pills > li.nav-item_posted").hasClass("active") && !$(".nav-pills > li.nav-item_bookmarks").hasClass("active")) {
  2814. if (this.localChecked.cate == "") {
  2815. $(".topic-list .age").each((index, element) => {
  2816. const str = $(element).attr("title");
  2817. const match = str.match(/创建日期:([\s\S]*?)最新:/);
  2818. if (match && match[1]) {
  2819. const creationDate = match[1].trim();
  2820. const timestamp = this.convertToTimestamp(creationDate);
  2821. const days = Number(this.localChecked.days) * 864e5;
  2822. if (Date.now() - timestamp > days) {
  2823. $(element).parents("tr.topic-list-item").remove();
  2824. }
  2825. }
  2826. });
  2827. } else {
  2828. const cateArray = this.localChecked.cate.split(",").map((item) => item.trim());
  2829. $(".badge-category__wrapper .badge-category__name").each((index, element) => {
  2830. let htmlContent = $(element).html();
  2831. htmlContent = htmlContent.replace(/,\s*Lv[1-3]/g, "");
  2832. if (cateArray.includes(htmlContent.trim())) {
  2833. $(element).parents("tr.topic-list-item").find(".age").each((index2, element2) => {
  2834. const str = $(element2).attr("title");
  2835. const match = str.match(/创建日期:([\s\S]*?)最新:/);
  2836. if (match && match[1]) {
  2837. const creationDate = match[1].trim();
  2838. const timestamp = this.convertToTimestamp(creationDate);
  2839. const days = Number(this.localChecked.days) * 864e5;
  2840. if (Date.now() - timestamp > days) {
  2841. $(element2).parents("tr.topic-list-item").remove();
  2842. }
  2843. }
  2844. });
  2845. }
  2846. });
  2847. }
  2848. }
  2849. }
  2850. },
  2851. created() {
  2852. if (this.localChecked.value1) {
  2853. let pollinglength1 = 0;
  2854. setInterval(() => {
  2855. if (pollinglength1 != $(".topic-list-body tr").length) {
  2856. pollinglength1 = $(".topic-list-body tr").length;
  2857. this.GetTimestamp();
  2858. }
  2859. }, 1e3);
  2860. }
  2861. }
  2862. };
  2863. const _hoisted_1$j = {
  2864. class: "item",
  2865. style: { "border": "none" }
  2866. };
  2867. const _hoisted_2$8 = { class: "tit" };
  2868. function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
  2869. return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
  2870. vue.createElementVNode("div", _hoisted_1$j, [
  2871. vue.createElementVNode("div", _hoisted_2$8, [
  2872. vue.createTextVNode(vue.toDisplayString($props.sort) + ". 屏蔽指定天数前的帖子 ", 1),
  2873. vue.withDirectives(vue.createElementVNode("input", {
  2874. type: "text",
  2875. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.localChecked.days = $event),
  2876. placeholder: "默认天数 5"
  2877. }, null, 512), [
  2878. [vue.vModelText, $data.localChecked.days]
  2879. ])
  2880. ]),
  2881. vue.withDirectives(vue.createElementVNode("input", {
  2882. type: "checkbox",
  2883. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.localChecked.value1 = $event),
  2884. onChange: _cache[2] || (_cache[2] = (...args) => $options.handleChange && $options.handleChange(...args))
  2885. }, null, 544), [
  2886. [vue.vModelCheckbox, $data.localChecked.value1]
  2887. ])
  2888. ]),
  2889. vue.createElementVNode("div", null, [
  2890. _cache[4] || (_cache[4] = vue.createElementVNode("p", null, "针对分类:留空对全部分类生效,多个分类用英文逗号【,】进行分隔", -1)),
  2891. vue.withDirectives(vue.createElementVNode("textarea", {
  2892. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $data.localChecked.cate = $event),
  2893. placeholder: "搞七捻三"
  2894. }, null, 512), [
  2895. [vue.vModelText, $data.localChecked.cate]
  2896. ])
  2897. ])
  2898. ], 64);
  2899. }
  2900. const MenuShieldPosts = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$n], ["__scopeId", "data-v-ac149a76"]]);
  2901. const _sfc_main$m = {
  2902. props: {
  2903. value: {
  2904. type: Array,
  2905. default: []
  2906. }
  2907. },
  2908. data() {
  2909. return {
  2910. tableData: this.value
  2911. };
  2912. },
  2913. watch: {
  2914. value(newValue) {
  2915. this.tableData = newValue;
  2916. }
  2917. },
  2918. methods: {
  2919. handleChange() {
  2920. this.$emit("update:value", this.tableData);
  2921. },
  2922. // 修改标签
  2923. editTags(item) {
  2924. var tags = prompt(`对 @${item.name} 修改标签`, item.tags);
  2925. if (tags == null) {
  2926. return item.tags;
  2927. }
  2928. if (tags != item.tags) {
  2929. var existingPerson = this.tableData.find((items) => items.name === item.name);
  2930. if (existingPerson) {
  2931. existingPerson.tags = tags;
  2932. } else {
  2933. this.tableData.push({ name: person, tags });
  2934. }
  2935. let settingData1 = localStorage.getItem("linxudoscriptssetting");
  2936. settingData1 = JSON.parse(settingData1);
  2937. settingData1.usertags = this.tableData;
  2938. localStorage.setItem("linxudoscriptssetting", JSON.stringify(settingData1));
  2939. this.$emit("update:value", this.tableData);
  2940. }
  2941. },
  2942. delTags(item) {
  2943. var del = confirm("是否确认删除!");
  2944. if (del == true) {
  2945. this.tableData.splice(item, 1);
  2946. let settingData1 = localStorage.getItem("linxudoscriptssetting");
  2947. settingData1 = JSON.parse(settingData1);
  2948. settingData1.usertags = this.tableData;
  2949. localStorage.setItem("linxudoscriptssetting", JSON.stringify(settingData1));
  2950. this.$emit("update:value", this.tableData);
  2951. }
  2952. }
  2953. },
  2954. created() {
  2955. let settingData = localStorage.getItem("linxudoscriptssetting");
  2956. settingData = JSON.parse(settingData);
  2957. if (!settingData.usertags) {
  2958. settingData.usertags = [];
  2959. }
  2960. settingData.usertags = settingData.usertags.filter((user) => user.tags);
  2961. this.tableData = settingData.usertags;
  2962. setInterval(() => {
  2963. if ($(".addusertag").length < 1) {
  2964. $(".usercard-controls").append(
  2965. `<li><button class="btn addusertag" type="button">添加用户标签</button></li>`
  2966. );
  2967. $(".addusertag").click(function() {
  2968. var person2 = $(".user-card .user-profile-link").attr("href").replace("/u/", "");
  2969. var tags = prompt(`对 @${person2} 设置标签(保存后刷新页面)`, "");
  2970. if (tags == null) {
  2971. return false;
  2972. }
  2973. var lowerCasePerson = person2.toLowerCase();
  2974. var existingPerson = settingData.usertags.find(
  2975. (item) => item.name.toLowerCase() === lowerCasePerson
  2976. );
  2977. if (existingPerson) {
  2978. existingPerson.tags = tags;
  2979. } else {
  2980. settingData.usertags.push({ name: person2, tags });
  2981. }
  2982. localStorage.setItem("linxudoscriptssetting", JSON.stringify(settingData));
  2983. });
  2984. }
  2985. $(".topic-post").each(function() {
  2986. const username = $(this).find(".first a").attr("data-user-card").toLowerCase();
  2987. const userTag = settingData.usertags.find((user) => user.name === username);
  2988. if (userTag) {
  2989. if ($(this).find(".linxudoscripts-tag").length < 1) {
  2990. $(this).find(".names").append(`<span class="linxudoscripts-tag"># ${userTag.tags}</span>`);
  2991. }
  2992. }
  2993. });
  2994. }, 1e3);
  2995. }
  2996. };
  2997. const _hoisted_1$i = { class: "menu-table" };
  2998. const _hoisted_2$7 = ["onClick"];
  2999. const _hoisted_3$6 = ["onClick"];
  3000. function _sfc_render$m(_ctx, _cache, $props, $setup, $data, $options) {
  3001. return vue.openBlock(), vue.createElementBlock("div", null, [
  3002. vue.createElementVNode("table", _hoisted_1$i, [
  3003. _cache[0] || (_cache[0] = vue.createElementVNode("thead", null, [
  3004. vue.createElementVNode("tr", null, [
  3005. vue.createElementVNode("th", null, "用户名"),
  3006. vue.createElementVNode("th", null, "标签"),
  3007. vue.createElementVNode("th", null, "操作")
  3008. ])
  3009. ], -1)),
  3010. vue.createElementVNode("tbody", null, [
  3011. (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($data.tableData, (item) => {
  3012. return vue.openBlock(), vue.createElementBlock("tr", {
  3013. key: item.name
  3014. }, [
  3015. vue.createElementVNode("td", null, vue.toDisplayString(item.name), 1),
  3016. vue.createElementVNode("td", null, vue.toDisplayString(item.tags), 1),
  3017. vue.createElementVNode("td", null, [
  3018. vue.createElementVNode("span", {
  3019. class: "span",
  3020. onClick: ($event) => $options.editTags(item)
  3021. }, "修改", 8, _hoisted_2$7),
  3022. vue.createElementVNode("span", {
  3023. class: "span",
  3024. onClick: ($event) => $options.delTags(item),
  3025. style: { "color": "#e00" }
  3026. }, "删除!", 8, _hoisted_3$6)
  3027. ])
  3028. ]);
  3029. }), 128))
  3030. ])
  3031. ])
  3032. ]);
  3033. }
  3034. const UserTags = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["render", _sfc_render$m]]);
  3035. const _sfc_main$l = {
  3036. props: {
  3037. value: {
  3038. type: Object,
  3039. default: {
  3040. value1: false,
  3041. value2: false,
  3042. title: false,
  3043. btn: true,
  3044. apikey: "",
  3045. baseurl: "https://api.openai.com",
  3046. full_url: "/v1/chat/completions",
  3047. model: "gpt-4o-mini",
  3048. prompt: "根据以下帖子内容进行总结,请使用 markdown 格式返回回答,没有字数限制,但要求文字精炼,简介准确,语言要求返回简体中文,并且进行中英文混排优化。可以通过编号列表(1,2,3)列出核心要点。注意不要输出标题,例如:核心要点总结,帖子总结等,直接输出文本段落。",
  3049. prompt1: "根据以下帖子内容,帮我给作者写一条回复,简短,表明我的观点,用口语回复,不需要很正式。您可以通过讨论的方式进行回复,这将有助于引导其他用户或作者进行互动。",
  3050. prompt2: "根据以下帖子内容,生成一个合适的标题用于社交论坛发布使用,格式要求:不要书名号或其他符号,只需要一句纯文本。尽量精简到 15 字以内,如果字数不够表达主题,可以适当多生成几个字。"
  3051. }
  3052. }
  3053. },
  3054. data() {
  3055. return {
  3056. localChecked: this.value
  3057. };
  3058. },
  3059. watch: {
  3060. value(newValue) {
  3061. this.localChecked = newValue;
  3062. }
  3063. },
  3064. methods: {
  3065. handleChange() {
  3066. this.$emit("update:value", this.localChecked);
  3067. },
  3068. getTopicUrl(url) {
  3069. const regex = /^(https:\/\/linux\.do\/t\/topic\/\d+)(\/\d+)?$/;
  3070. const match = url.match(regex);
  3071. return match ? match[1] : url;
  3072. },
  3073. // 是否开启手动生成
  3074. setCreatedBtn() {
  3075. if (this.localChecked.btn) {
  3076. $("head").append("<style>.aicreated-btn{display:inline-flex!important}</style>");
  3077. }
  3078. },
  3079. // 获取帖子内容并生成总结
  3080. async getPostContent() {
  3081. $(".post-stream").before(
  3082. `<div class="gpt-summary-wrap">
  3083. <div class="gpt-summary">AI 总结:正在使用 AI 总结内容中,请稍后...</div>
  3084. </div>`
  3085. );
  3086. const config = JSON.parse(localStorage.getItem("linxudoscriptssetting")).gptdata;
  3087. return new Promise((resolve, reject) => {
  3088. const str = $("#topic-title h1 a").text() + $("#post_1 .cooked").text();
  3089. const prompt2 = `${config.prompt}
  3090. 帖子内容如下:
  3091. ${str}`;
  3092. fetch(`${config.baseurl}${config.full_url}`, {
  3093. method: "POST",
  3094. headers: {
  3095. "Content-Type": "application/json",
  3096. Authorization: `Bearer ${config.apikey}`
  3097. },
  3098. body: JSON.stringify({
  3099. model: config.model,
  3100. messages: [
  3101. {
  3102. role: "user",
  3103. content: prompt2
  3104. }
  3105. ],
  3106. temperature: 0.7
  3107. })
  3108. }).then((response) => {
  3109. if (!response.ok) {
  3110. reject(`HTTP error! status: ${response.status}`);
  3111. }
  3112. return response.json();
  3113. }).then((gptData) => {
  3114. $(".gpt-summary").html(`${marked.marked.parse(gptData.choices[0].message.content)}`);
  3115. let summaryCache = JSON.parse(localStorage.getItem("summaryCacheData")) || [];
  3116. const regex = /^(https:\/\/linux\.do\/t\/topic\/\d+)(\/\d+)?$/;
  3117. const match = window.location.href.match(regex)[1];
  3118. let existingObject = summaryCache.find((item) => item.name == match);
  3119. let newObject = {
  3120. name: match,
  3121. value: gptData.choices[0].message.content
  3122. };
  3123. if (existingObject) {
  3124. existingObject.value = newObject.value;
  3125. } else {
  3126. summaryCache.push(newObject);
  3127. }
  3128. localStorage.setItem("summaryCacheData", JSON.stringify(summaryCache));
  3129. resolve();
  3130. }).catch((error) => {
  3131. $(".gpt-summary").html(`生成失败,请检查配置是否正确并刷新重试!`);
  3132. console.log(error);
  3133. });
  3134. });
  3135. },
  3136. // 生成 AI 回复
  3137. async setAIRelpy() {
  3138. $(".aireply-popup").show();
  3139. $(".aireply-popup-text").html("AI 推荐回复正在生成中,请稍后。。。");
  3140. const config = JSON.parse(localStorage.getItem("linxudoscriptssetting")).gptdata;
  3141. return new Promise((resolve, reject) => {
  3142. const str = $("#topic-title h1 a").text() + $("#post_1 .cooked").text();
  3143. const prompt2 = `${config.prompt1}
  3144. 帖子内容如下:
  3145. ${str}`;
  3146. fetch(`${config.baseurl}${config.full_url}`, {
  3147. method: "POST",
  3148. headers: {
  3149. "Content-Type": "application/json",
  3150. Authorization: `Bearer ${config.apikey}`
  3151. },
  3152. body: JSON.stringify({
  3153. model: config.model,
  3154. messages: [
  3155. {
  3156. role: "user",
  3157. content: prompt2
  3158. }
  3159. ],
  3160. temperature: 0.7
  3161. })
  3162. }).then((response) => {
  3163. if (!response.ok) {
  3164. reject(`HTTP error! status: ${response.status}`);
  3165. }
  3166. return response.json();
  3167. }).then((gptData) => {
  3168. this.AIReplyPopup(gptData.choices[0].message.content);
  3169. resolve();
  3170. }).catch((error) => {
  3171. console.log(error);
  3172. });
  3173. });
  3174. },
  3175. // 推荐回复弹窗
  3176. AIReplyPopup(text) {
  3177. $(".aireply-popup-text").html(text);
  3178. },
  3179. // AI 根据新建话题内容生成标题
  3180. async getCreateNewTopicTitle() {
  3181. return new Promise((resolve, reject) => {
  3182. const topic_contentdata = $(".d-editor-preview").html();
  3183. const config = JSON.parse(localStorage.getItem("linxudoscriptssetting")).gptdata;
  3184. const prompt2 = `${config.prompt2}
  3185. 帖子内容如下:
  3186. ${topic_contentdata}`;
  3187. fetch(`${config.baseurl}${config.full_url}`, {
  3188. method: "POST",
  3189. headers: {
  3190. "Content-Type": "application/json",
  3191. Authorization: `Bearer ${config.apikey}`
  3192. },
  3193. body: JSON.stringify({
  3194. model: config.model,
  3195. messages: [
  3196. {
  3197. role: "user",
  3198. content: prompt2
  3199. }
  3200. ],
  3201. temperature: 0.7
  3202. })
  3203. }).then((response) => {
  3204. if (!response.ok) {
  3205. reject(`HTTP error! status: ${response.status}`);
  3206. }
  3207. return response.json();
  3208. }).then((gptData) => {
  3209. $("#reply-title").val(gptData.choices[0].message.content);
  3210. resolve();
  3211. }).catch((error) => {
  3212. console.log(error);
  3213. $("#reply-title").val(`抱歉生成失败,请检查配置或者反馈给开发者!`);
  3214. });
  3215. });
  3216. }
  3217. },
  3218. async created() {
  3219. if (this.localChecked.value2) {
  3220. $("body").append(`
  3221. <div class="aireply-popup">
  3222. <textarea class="aireply-popup-text"></textarea>
  3223. <button class="aireply-popup-close">关闭</button>
  3224. </div>
  3225. `);
  3226. setInterval(() => {
  3227. if ($(".gpt-summary-wrap").length < 1 && $(".aireplay-btn").length < 1) {
  3228. $("#topic-title").after(
  3229. `<button class="aireplay-btn" type="button">AI 回复</button>`
  3230. );
  3231. $(".aireplay-btn").click(() => {
  3232. this.setAIRelpy();
  3233. });
  3234. $(".aireply-popup-close").click(() => {
  3235. $(".aireply-popup").hide();
  3236. $(".aireply-popup-text").html("AI 推荐回复正在生成中,请稍后。。。");
  3237. });
  3238. }
  3239. }, 1e3);
  3240. }
  3241. if (this.localChecked.value1) {
  3242. setInterval(() => {
  3243. if ($(".gpt-summary-wrap").length < 1 && $(".aicreated-btn").length < 1) {
  3244. $("#topic-title").after(
  3245. `<button class="aicreated-btn" type="button">AI 总结</button>`
  3246. );
  3247. $(".aicreated-btn").click(() => {
  3248. $(".gpt-summary-wrap").remove();
  3249. this.getPostContent();
  3250. });
  3251. }
  3252. }, 1e3);
  3253. this.setCreatedBtn();
  3254. setInterval(() => {
  3255. if ($(".post-stream").length > 0) {
  3256. if ($(".gpt-summary-wrap").length < 1) {
  3257. let summaryCache = JSON.parse(localStorage.getItem("summaryCacheData")) || [];
  3258. const regex = /^(https:\/\/linux\.do\/t\/topic\/\d+)(\/\d+)?$/;
  3259. const match = window.location.href.match(regex)[1];
  3260. let existingObject = summaryCache.find((item) => item.name === match);
  3261. if (existingObject) {
  3262. $(".post-stream").before(
  3263. `<div class="gpt-summary-wrap">
  3264. <div class="gpt-summary">${marked.marked.parse(existingObject.value)}</div>
  3265. </div>`
  3266. );
  3267. }
  3268. }
  3269. if (!this.localChecked.btn) {
  3270. if ($(".gpt-summary-wrap").length < 1) {
  3271. this.getPostContent();
  3272. }
  3273. }
  3274. $(".topic-list .main-link a.title").click(() => {
  3275. $(".gpt-summary-wrap").remove();
  3276. });
  3277. }
  3278. }, 1e3);
  3279. }
  3280. if (this.localChecked.title) {
  3281. setInterval(() => {
  3282. if ($(".action-title").length > 0) {
  3283. if ($(".action-title").html().includes("创建新话题")) {
  3284. if ($(".aicreatenewtopictitle").length < 1) {
  3285. $(".action-title").append(
  3286. '<span class="aicreatenewtopictitle">AI 生成标题</span>'
  3287. );
  3288. $(".aicreatenewtopictitle").click(() => {
  3289. $("#reply-title").val("正在生成中,请稍后...");
  3290. this.getCreateNewTopicTitle();
  3291. });
  3292. }
  3293. }
  3294. }
  3295. }, 1e3);
  3296. let summaryCacheData = JSON.parse(localStorage.getItem("summaryCacheData")) || [];
  3297. if (summaryCacheData.length > 20) {
  3298. summaryCacheData = summaryCacheData.slice(-20);
  3299. }
  3300. localStorage.setItem("summaryCacheData", JSON.stringify(summaryCacheData));
  3301. }
  3302. }
  3303. };
  3304. const _hoisted_1$h = { class: "item" };
  3305. const _hoisted_2$6 = { class: "item" };
  3306. const _hoisted_3$5 = { class: "item" };
  3307. const _hoisted_4$5 = { class: "item" };
  3308. function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
  3309. return vue.openBlock(), vue.createElementBlock("div", null, [
  3310. vue.createElementVNode("div", _hoisted_1$h, [
  3311. _cache[15] || (_cache[15] = vue.createElementVNode("div", { class: "tit" }, "1. 是否开启 AI 生成话题总结", -1)),
  3312. vue.withDirectives(vue.createElementVNode("input", {
  3313. type: "checkbox",
  3314. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.localChecked.value1 = $event),
  3315. onChange: _cache[1] || (_cache[1] = (...args) => $options.handleChange && $options.handleChange(...args))
  3316. }, null, 544), [
  3317. [vue.vModelCheckbox, $data.localChecked.value1]
  3318. ])
  3319. ]),
  3320. vue.createElementVNode("div", _hoisted_2$6, [
  3321. _cache[16] || (_cache[16] = vue.createElementVNode("div", { class: "tit" }, "2. 是否显示手动总结按钮", -1)),
  3322. vue.withDirectives(vue.createElementVNode("input", {
  3323. type: "checkbox",
  3324. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $data.localChecked.btn = $event),
  3325. onChange: _cache[3] || (_cache[3] = (...args) => $options.handleChange && $options.handleChange(...args))
  3326. }, null, 544), [
  3327. [vue.vModelCheckbox, $data.localChecked.btn]
  3328. ])
  3329. ]),
  3330. vue.createElementVNode("div", _hoisted_3$5, [
  3331. _cache[17] || (_cache[17] = vue.createElementVNode("div", { class: "tit" }, "3. 是否开启 AI 生成回复推荐", -1)),
  3332. vue.withDirectives(vue.createElementVNode("input", {
  3333. type: "checkbox",
  3334. "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => $data.localChecked.value2 = $event),
  3335. onChange: _cache[5] || (_cache[5] = (...args) => $options.handleChange && $options.handleChange(...args))
  3336. }, null, 544), [
  3337. [vue.vModelCheckbox, $data.localChecked.value2]
  3338. ])
  3339. ]),
  3340. vue.createElementVNode("div", _hoisted_4$5, [
  3341. _cache[18] || (_cache[18] = vue.createElementVNode("div", { class: "tit" }, "4. 新建话题使用 AI 生成标题", -1)),
  3342. vue.withDirectives(vue.createElementVNode("input", {
  3343. type: "checkbox",
  3344. "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => $data.localChecked.title = $event),
  3345. onChange: _cache[7] || (_cache[7] = (...args) => $options.handleChange && $options.handleChange(...args))
  3346. }, null, 544), [
  3347. [vue.vModelCheckbox, $data.localChecked.title]
  3348. ])
  3349. ]),
  3350. _cache[19] || (_cache[19] = vue.createElementVNode("div", { class: "item" }, [
  3351. vue.createElementVNode("div", { class: "tit" }, "5. 配置信息")
  3352. ], -1)),
  3353. vue.withDirectives(vue.createElementVNode("input", {
  3354. type: "text",
  3355. "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => $data.localChecked.apikey = $event),
  3356. placeholder: "sk-xxxxxxxx"
  3357. }, null, 512), [
  3358. [vue.vModelText, $data.localChecked.apikey]
  3359. ]),
  3360. vue.withDirectives(vue.createElementVNode("input", {
  3361. style: { "width": "49%" },
  3362. type: "text",
  3363. "onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => $data.localChecked.baseurl = $event),
  3364. placeholder: "https://api.openai.com"
  3365. }, null, 512), [
  3366. [vue.vModelText, $data.localChecked.baseurl]
  3367. ]),
  3368. vue.withDirectives(vue.createElementVNode("input", {
  3369. style: { "width": "49%", "margin-left": "2%" },
  3370. type: "text",
  3371. "onUpdate:modelValue": _cache[10] || (_cache[10] = ($event) => $data.localChecked.full_url = $event),
  3372. placeholder: "/v1/chat/completions"
  3373. }, null, 512), [
  3374. [vue.vModelText, $data.localChecked.full_url]
  3375. ]),
  3376. vue.withDirectives(vue.createElementVNode("input", {
  3377. type: "text",
  3378. "onUpdate:modelValue": _cache[11] || (_cache[11] = ($event) => $data.localChecked.model = $event),
  3379. placeholder: "模型,如:gpt-4o-mini"
  3380. }, null, 512), [
  3381. [vue.vModelText, $data.localChecked.model]
  3382. ]),
  3383. _cache[20] || (_cache[20] = vue.createElementVNode("div", null, "6. AI 总结帖子 prompt:", -1)),
  3384. vue.withDirectives(vue.createElementVNode("textarea", {
  3385. "onUpdate:modelValue": _cache[12] || (_cache[12] = ($event) => $data.localChecked.prompt = $event)
  3386. }, null, 512), [
  3387. [vue.vModelText, $data.localChecked.prompt]
  3388. ]),
  3389. _cache[21] || (_cache[21] = vue.createElementVNode("div", null, "7. AI 生成回复 prompt:", -1)),
  3390. vue.withDirectives(vue.createElementVNode("textarea", {
  3391. "onUpdate:modelValue": _cache[13] || (_cache[13] = ($event) => $data.localChecked.prompt1 = $event)
  3392. }, null, 512), [
  3393. [vue.vModelText, $data.localChecked.prompt1]
  3394. ]),
  3395. _cache[22] || (_cache[22] = vue.createElementVNode("div", null, "8. AI 生成标题 prompt:", -1)),
  3396. vue.withDirectives(vue.createElementVNode("textarea", {
  3397. "onUpdate:modelValue": _cache[14] || (_cache[14] = ($event) => $data.localChecked.prompt2 = $event)
  3398. }, null, 512), [
  3399. [vue.vModelText, $data.localChecked.prompt2]
  3400. ]),
  3401. _cache[23] || (_cache[23] = vue.createElementVNode("div", { style: { "margin-top": "10px" } }, " 注意:请按照指定格式填写参数;不支持 http,请使用 https。 ", -1))
  3402. ]);
  3403. }
  3404. const GPTconfig = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render$l], ["__scopeId", "data-v-d1d5d03b"]]);
  3405. const _sfc_main$k = {
  3406. props: ["modelValue"],
  3407. emits: ["update:modelValue"],
  3408. data() {
  3409. return {
  3410. radio: this.modelValue,
  3411. // 初始化 radio
  3412. list: [
  3413. {
  3414. id: 0,
  3415. name: "ls-themes0",
  3416. imgurl: ""
  3417. },
  3418. {
  3419. id: 6,
  3420. name: "ls-themes6",
  3421. imgurl: "https://linux.do/uploads/default/original/3X/d/9/d935995d90221b7acdde23df142ba7bbe3c38bf0.png"
  3422. },
  3423. {
  3424. id: 5,
  3425. name: "ls-themes5",
  3426. imgurl: "https://linux.do/uploads/default/optimized/3X/3/a/3a9cfbddfd2385ec4c638a10b15055220332e65c_2_1035x565.png"
  3427. },
  3428. {
  3429. id: 4,
  3430. name: "ls-themes4",
  3431. imgurl: "https://linux.do/uploads/default/optimized/3X/8/f/8fb7fe2251b44a6ea1831055bf5ac3ef2c12b4ea_2_1035x544.jpeg"
  3432. },
  3433. {
  3434. id: 3,
  3435. name: "ls-themes3",
  3436. imgurl: "https://linux.do/uploads/default/optimized/3X/2/5/25f83e28507a9ec9fe8ad41874ed578c2e007ff6_2_1035x544.jpeg"
  3437. },
  3438. {
  3439. id: 2,
  3440. name: "ls-themes2",
  3441. imgurl: "https://linux.do/uploads/default/optimized/3X/b/b/bbaa57335e0eab7e4db7ddb5944b613ce0cb5b89_2_1035x544.jpeg"
  3442. },
  3443. {
  3444. id: 1,
  3445. name: "ls-themes1",
  3446. imgurl: "https://linux.do/uploads/default/optimized/3X/2/f/2f1a0d87acb496eb544e17a72022c58ccfd72104_2_1035x544.jpeg"
  3447. }
  3448. ],
  3449. jsonData: [
  3450. {
  3451. id: 1,
  3452. content: "<link href='https://forum.godotengine.org/stylesheets/color_definitions_godot-light_14_5_bfb37f9ae1fb41e9775aafca6e20cddcf38a5ef5.css' media='all' rel='stylesheet' class='light-scheme'><link href='https://forum.godotengine.org/stylesheets/color_definitions_godot-dark_15_5_5ddd0db082f3ae82a3ba77b0ccd1e9a549731798.css' media='(prefers-color-scheme:dark)' rel='stylesheet' class='dark-scheme'><link href='https://forum.godotengine.org/stylesheets/desktop_6551c8b35c64f23dde7a58f9883f833dcb41d6c2.css' media='all' rel='stylesheet' data-target='desktop'><link href='https://forum.godotengine.org/stylesheets/checklist_6551c8b35c64f23dde7a58f9883f833dcb41d6c2.css' media='all' rel='stylesheet' data-target='checklist'><link href='https://forum.godotengine.org/stylesheets/discourse-details_6551c8b35c64f23dde7a58f9883f833dcb41d6c2.css' media='all' rel='stylesheet' data-target='discourse-details'><link href='https://forum.godotengine.org/stylesheets/discourse-lazy-videos_6551c8b35c64f23dde7a58f9883f833dcb41d6c2.css' media='all' rel='stylesheet' data-target='discourse-lazy-videos'><link href='https://forum.godotengine.org/stylesheets/discourse-local-dates_6551c8b35c64f23dde7a58f9883f833dcb41d6c2.css' media='all' rel='stylesheet' data-target='discourse-local-dates'><link href='https://forum.godotengine.org/stylesheets/discourse-narrative-bot_6551c8b35c64f23dde7a58f9883f833dcb41d6c2.css' media='all' rel='stylesheet' data-target='discourse-narrative-bot'><link href='https://forum.godotengine.org/stylesheets/discourse-presence_6551c8b35c64f23dde7a58f9883f833dcb41d6c2.css' media='all' rel='stylesheet' data-target='discourse-presence'><link href='https://forum.godotengine.org/stylesheets/discourse-solved_6551c8b35c64f23dde7a58f9883f833dcb41d6c2.css' media='all' rel='stylesheet' data-target='discourse-solved'><link href='https://forum.godotengine.org/stylesheets/docker_manager_6551c8b35c64f23dde7a58f9883f833dcb41d6c2.css' media='all' rel='stylesheet' data-target='docker_manager'><link href='https://forum.godotengine.org/stylesheets/footnote_6551c8b35c64f23dde7a58f9883f833dcb41d6c2.css' media='all' rel='stylesheet' data-target='footnote'><link href='https://forum.godotengine.org/stylesheets/poll_6551c8b35c64f23dde7a58f9883f833dcb41d6c2.css' media='all' rel='stylesheet' data-target='poll'><link href='https://forum.godotengine.org/stylesheets/spoiler-alert_6551c8b35c64f23dde7a58f9883f833dcb41d6c2.css' media='all' rel='stylesheet' data-target='spoiler-alert'><link href='https://forum.godotengine.org/stylesheets/poll_desktop_6551c8b35c64f23dde7a58f9883f833dcb41d6c2.css' media='all' rel='stylesheet' data-target='poll_desktop'><link href='https://forum.godotengine.org/stylesheets/desktop_theme_9_818c40f50955dc75b8ee82ebc6b63677c57bad1a.css' media='all' rel='stylesheet' data-target='desktop_theme' data-theme-id='9' data-theme-name='custom header links'><link href='https://forum.godotengine.org/stylesheets/desktop_theme_3_da63025974d890f429338f0221ce160e14b07fc7.css' media='all' rel='stylesheet' data-target='desktop_theme' data-theme-id='3' data-theme-name='godot tweaks'><link href='https://forum.godotengine.org/stylesheets/desktop_theme_12_279dc32ddce5227f4513713baa0e0caf3dc6f846.css' media='all' rel='stylesheet' data-target='desktop_theme' data-theme-id='12' data-theme-name='post badges'><link href='https://forum.godotengine.org/stylesheets/desktop_theme_7_b736b09c69b69b5359282426c2559c196e5d619e.css' media='all' rel='stylesheet' data-target='desktop_theme' data-theme-id='7' data-theme-name='search banner'><link href='https://forum.godotengine.org/stylesheets/desktop_theme_5_73982ca8b55af63e007c66d4bd9ddc7af40f0b7f.css' media='all' rel='stylesheet' data-target='desktop_theme' data-theme-id='5' data-theme-name='godot theme'>"
  3453. },
  3454. {
  3455. id: 2,
  3456. content: "<link href='https://sea2.discourse-cdn.com/hellohellohello/stylesheets/color_definitions_hf-light_3_4_e9f0e3d0b716595aad22a8443d01cdbaf9dff610.css' media='all' rel='stylesheet' class='light-scheme'><link href='https://sea2.discourse-cdn.com/hellohellohello/stylesheets/color_definitions_hf-dark_4_4_a909a408a44c8e15765a6792c5aa2abab3fbfdfc.css' media='(prefers-color-scheme:dark)' rel='stylesheet' class='dark-scheme'><link href='https://sea2.discourse-cdn.com/hellohellohello/stylesheets/desktop_9690da8ac361c476ab1b25cc9aaade81b0eb2977.css' media='all' rel='stylesheet' data-target='desktop'><link href='https://sea2.discourse-cdn.com/hellohellohello/stylesheets/checklist_9690da8ac361c476ab1b25cc9aaade81b0eb2977.css' media='all' rel='stylesheet' data-target='checklist'><link href='https://sea2.discourse-cdn.com/hellohellohello/stylesheets/discourse-adplugin_9690da8ac361c476ab1b25cc9aaade81b0eb2977.css' media='all' rel='stylesheet' data-target='discourse-adplugin'><link href='https://sea2.discourse-cdn.com/hellohellohello/stylesheets/discourse-ai_9690da8ac361c476ab1b25cc9aaade81b0eb2977.css' media='all' rel='stylesheet' data-target='discourse-ai'><link href='https://sea2.discourse-cdn.com/hellohellohello/stylesheets/discourse-akismet_9690da8ac361c476ab1b25cc9aaade81b0eb2977.css' media='all' rel='stylesheet' data-target='discourse-akismet'><link href='https://sea2.discourse-cdn.com/hellohellohello/stylesheets/discourse-cakeday_9690da8ac361c476ab1b25cc9aaade81b0eb2977.css' media='all' rel='stylesheet' data-target='discourse-cakeday'><link href='https://sea2.discourse-cdn.com/hellohellohello/stylesheets/discourse-details_9690da8ac361c476ab1b25cc9aaade81b0eb2977.css' media='all' rel='stylesheet' data-target='discourse-details'><link href='https://sea2.discourse-cdn.com/hellohellohello/stylesheets/discourse-lazy-videos_9690da8ac361c476ab1b25cc9aaade81b0eb2977.css' media='all' rel='stylesheet' data-target='discourse-lazy-videos'><link href='https://sea2.discourse-cdn.com/hellohellohello/stylesheets/discourse-local-dates_9690da8ac361c476ab1b25cc9aaade81b0eb2977.css' media='all' rel='stylesheet' data-target='discourse-local-dates'><link href='https://sea2.discourse-cdn.com/hellohellohello/stylesheets/discourse-math_9690da8ac361c476ab1b25cc9aaade81b0eb2977.css' media='all' rel='stylesheet' data-target='discourse-math'><link href='https://sea2.discourse-cdn.com/hellohellohello/stylesheets/discourse-narrative-bot_9690da8ac361c476ab1b25cc9aaade81b0eb2977.css' media='all' rel='stylesheet' data-target='discourse-narrative-bot'><link href='https://sea2.discourse-cdn.com/hellohellohello/stylesheets/discourse-policy_9690da8ac361c476ab1b25cc9aaade81b0eb2977.css' media='all' rel='stylesheet' data-target='discourse-policy'><link href='https://sea2.discourse-cdn.com/hellohellohello/stylesheets/discourse-presence_9690da8ac361c476ab1b25cc9aaade81b0eb2977.css' media='all' rel='stylesheet' data-target='discourse-presence'><link href='https://sea2.discourse-cdn.com/hellohellohello/stylesheets/discourse-reactions_9690da8ac361c476ab1b25cc9aaade81b0eb2977.css' media='all' rel='stylesheet' data-target='discourse-reactions'><link href='https://sea2.discourse-cdn.com/hellohellohello/stylesheets/discourse-solved_9690da8ac361c476ab1b25cc9aaade81b0eb2977.css' media='all' rel='stylesheet' data-target='discourse-solved'><link href='https://sea2.discourse-cdn.com/hellohellohello/stylesheets/discourse-templates_9690da8ac361c476ab1b25cc9aaade81b0eb2977.css' media='all' rel='stylesheet' data-target='discourse-templates'><link href='https://sea2.discourse-cdn.com/hellohellohello/stylesheets/discourse-topic-voting_9690da8ac361c476ab1b25cc9aaade81b0eb2977.css' media='all' rel='stylesheet' data-target='discourse-topic-voting'><link href='https://sea2.discourse-cdn.com/hellohellohello/stylesheets/footnote_9690da8ac361c476ab1b25cc9aaade81b0eb2977.css' media='all' rel='stylesheet' data-target='footnote'><link href='https://sea2.discourse-cdn.com/hellohellohello/stylesheets/hosted-site_9690da8ac361c476ab1b25cc9aaade81b0eb2977.css' media='all' rel='stylesheet' data-target='hosted-site'><link href='https://sea2.discourse-cdn.com/hellohellohello/stylesheets/poll_9690da8ac361c476ab1b25cc9aaade81b0eb2977.css' media='all' rel='stylesheet' data-target='poll'><link href='https://sea2.discourse-cdn.com/hellohellohello/stylesheets/spoiler-alert_9690da8ac361c476ab1b25cc9aaade81b0eb2977.css' media='all' rel='stylesheet' data-target='spoiler-alert'><link href='https://sea2.discourse-cdn.com/hellohellohello/stylesheets/discourse-ai_desktop_9690da8ac361c476ab1b25cc9aaade81b0eb2977.css' media='all' rel='stylesheet' data-target='discourse-ai_desktop'><link href='https://sea2.discourse-cdn.com/hellohellohello/stylesheets/discourse-reactions_desktop_9690da8ac361c476ab1b25cc9aaade81b0eb2977.css' media='all' rel='stylesheet' data-target='discourse-reactions_desktop'><link href='https://sea2.discourse-cdn.com/hellohellohello/stylesheets/discourse-topic-voting_desktop_9690da8ac361c476ab1b25cc9aaade81b0eb2977.css' media='all' rel='stylesheet' data-target='discourse-topic-voting_desktop'><link href='https://sea2.discourse-cdn.com/hellohellohello/stylesheets/poll_desktop_9690da8ac361c476ab1b25cc9aaade81b0eb2977.css' media='all' rel='stylesheet' data-target='poll_desktop'><link href='https://sea2.discourse-cdn.com/hellohellohello/stylesheets/desktop_theme_4_dc1402c93670f70f3de138ee4819934dae9704d0.css' media='all' rel='stylesheet' data-target='desktop_theme' data-theme-id='4' data-theme-name='discourse-huggingface-theme'>"
  3457. },
  3458. {
  3459. id: 3,
  3460. content: "<link href='https://dub2.discourse-cdn.com/unity/stylesheets/desktop_cfd252fc4676c9752a6eddc24d305200f1bae9d3.css' media='all' rel='stylesheet' data-target='desktop'><link href='https://dub2.discourse-cdn.com/unity/stylesheets/checklist_cfd252fc4676c9752a6eddc24d305200f1bae9d3.css' media='all' rel='stylesheet' data-target='checklist'><link href='https://dub2.discourse-cdn.com/unity/stylesheets/discourse-akismet_cfd252fc4676c9752a6eddc24d305200f1bae9d3.css' media='all' rel='stylesheet' data-target='discourse-akismet'><link href='https://dub2.discourse-cdn.com/unity/stylesheets/discourse-cakeday_cfd252fc4676c9752a6eddc24d305200f1bae9d3.css' media='all' rel='stylesheet' data-target='discourse-cakeday'><link href='https://dub2.discourse-cdn.com/unity/stylesheets/discourse-custom-topic-lists_cfd252fc4676c9752a6eddc24d305200f1bae9d3.css' media='all' rel='stylesheet' data-target='discourse-custom-topic-lists'><link href='https://dub2.discourse-cdn.com/unity/stylesheets/discourse-data-explorer_cfd252fc4676c9752a6eddc24d305200f1bae9d3.css' media='all' rel='stylesheet' data-target='discourse-data-explorer'><link href='https://dub2.discourse-cdn.com/unity/stylesheets/discourse-details_cfd252fc4676c9752a6eddc24d305200f1bae9d3.css' media='all' rel='stylesheet' data-target='discourse-details'><link href='https://dub2.discourse-cdn.com/unity/stylesheets/discourse-lazy-videos_cfd252fc4676c9752a6eddc24d305200f1bae9d3.css' media='all' rel='stylesheet' data-target='discourse-lazy-videos'><link href='https://dub2.discourse-cdn.com/unity/stylesheets/discourse-local-dates_cfd252fc4676c9752a6eddc24d305200f1bae9d3.css' media='all' rel='stylesheet' data-target='discourse-local-dates'><link href='https://dub2.discourse-cdn.com/unity/stylesheets/discourse-math_cfd252fc4676c9752a6eddc24d305200f1bae9d3.css' media='all' rel='stylesheet' data-target='discourse-math'><link href='https://dub2.discourse-cdn.com/unity/stylesheets/discourse-narrative-bot_cfd252fc4676c9752a6eddc24d305200f1bae9d3.css' media='all' rel='stylesheet' data-target='discourse-narrative-bot'><link href='https://dub2.discourse-cdn.com/unity/stylesheets/discourse-policy_cfd252fc4676c9752a6eddc24d305200f1bae9d3.css' media='all' rel='stylesheet' data-target='discourse-policy'><link href='https://dub2.discourse-cdn.com/unity/stylesheets/discourse-post-voting_cfd252fc4676c9752a6eddc24d305200f1bae9d3.css' media='all' rel='stylesheet' data-target='discourse-post-voting'><link href='https://dub2.discourse-cdn.com/unity/stylesheets/discourse-presence_cfd252fc4676c9752a6eddc24d305200f1bae9d3.css' media='all' rel='stylesheet' data-target='discourse-presence'><link href='https://dub2.discourse-cdn.com/unity/stylesheets/discourse-preset-topic-composer_cfd252fc4676c9752a6eddc24d305200f1bae9d3.css' media='all' rel='stylesheet' data-target='discourse-preset-topic-composer'><link href='https://dub2.discourse-cdn.com/unity/stylesheets/discourse-reactions_cfd252fc4676c9752a6eddc24d305200f1bae9d3.css' media='all' rel='stylesheet' data-target='discourse-reactions'><link href='https://dub2.discourse-cdn.com/unity/stylesheets/discourse-rss-polling_cfd252fc4676c9752a6eddc24d305200f1bae9d3.css' media='all' rel='stylesheet' data-target='discourse-rss-polling'><link href='https://dub2.discourse-cdn.com/unity/stylesheets/discourse-signatures_cfd252fc4676c9752a6eddc24d305200f1bae9d3.css' media='all' rel='stylesheet' data-target='discourse-signatures'><link href='https://dub2.discourse-cdn.com/unity/stylesheets/discourse-solved_cfd252fc4676c9752a6eddc24d305200f1bae9d3.css' media='all' rel='stylesheet' data-target='discourse-solved'><link href='https://dub2.discourse-cdn.com/unity/stylesheets/discourse-templates_cfd252fc4676c9752a6eddc24d305200f1bae9d3.css' media='all' rel='stylesheet' data-target='discourse-templates'><link href='https://dub2.discourse-cdn.com/unity/stylesheets/discourse-user-notes_cfd252fc4676c9752a6eddc24d305200f1bae9d3.css' media='all' rel='stylesheet' data-target='discourse-user-notes'><link href='https://dub2.discourse-cdn.com/unity/stylesheets/footnote_cfd252fc4676c9752a6eddc24d305200f1bae9d3.css' media='all' rel='stylesheet' data-target='footnote'><link href='https://dub2.discourse-cdn.com/unity/stylesheets/hosted-site_cfd252fc4676c9752a6eddc24d305200f1bae9d3.css' media='all' rel='stylesheet' data-target='hosted-site'><link href='https://dub2.discourse-cdn.com/unity/stylesheets/poll_cfd252fc4676c9752a6eddc24d305200f1bae9d3.css' media='all' rel='stylesheet' data-target='poll'><link href='https://dub2.discourse-cdn.com/unity/stylesheets/spoiler-alert_cfd252fc4676c9752a6eddc24d305200f1bae9d3.css' media='all' rel='stylesheet' data-target='spoiler-alert'><link href='https://dub2.discourse-cdn.com/unity/stylesheets/discourse-post-voting_desktop_cfd252fc4676c9752a6eddc24d305200f1bae9d3.css' media='all' rel='stylesheet' data-target='discourse-post-voting_desktop'><link href='https://dub2.discourse-cdn.com/unity/stylesheets/discourse-reactions_desktop_cfd252fc4676c9752a6eddc24d305200f1bae9d3.css' media='all' rel='stylesheet' data-target='discourse-reactions_desktop'><link href='https://dub2.discourse-cdn.com/unity/stylesheets/poll_desktop_cfd252fc4676c9752a6eddc24d305200f1bae9d3.css' media='all' rel='stylesheet' data-target='poll_desktop'><link href='https://dub2.discourse-cdn.com/unity/stylesheets/desktop_theme_21_7ad18baff84d86d2854bef0ea3531d2b132f80e7.css' media='all' rel='stylesheet' data-target='desktop_theme' data-theme-id='21' data-theme-name='category badge styles'><link href='https://dub2.discourse-cdn.com/unity/stylesheets/desktop_theme_43_3f15e2f66fc3e5c3aebf2b816db682ffddd62aec.css' media='all' rel='stylesheet' data-target='desktop_theme' data-theme-id='43' data-theme-name='category banners'><link href='https://dub2.discourse-cdn.com/unity/stylesheets/desktop_theme_44_76340a944941297c187ed34184cc60417a9431da.css' media='all' rel='stylesheet' data-target='desktop_theme' data-theme-id='44' data-theme-name='category icons'><link href='https://dub2.discourse-cdn.com/unity/stylesheets/desktop_theme_41_5dae38cddbdae9477debd421890ea804b79ec6bb.css' media='all' rel='stylesheet' data-target='desktop_theme' data-theme-id='41' data-theme-name='collapsible category groups'><link href='https://dub2.discourse-cdn.com/unity/stylesheets/desktop_theme_2_7e9be53a9033f4321fe3ff84ac7ac5916c6f7422.css' media='all' rel='stylesheet' data-target='desktop_theme' data-theme-id='2' data-theme-name='dark-light toggle'><link href='https://dub2.discourse-cdn.com/unity/stylesheets/desktop_theme_14_11cc9920871247240c539d33b999ff8565c0528e.css' media='all' rel='stylesheet' data-target='desktop_theme' data-theme-id='14' data-theme-name='discotoc'><link href='https://dub2.discourse-cdn.com/unity/stylesheets/desktop_theme_22_60ced06ad2f59e47b7897d05ee076d301232f5fd.css' media='all' rel='stylesheet' data-target='desktop_theme' data-theme-id='22' data-theme-name='discourse-icon'><link href='https://dub2.discourse-cdn.com/unity/stylesheets/desktop_theme_13_56d83ffa5ca70edecf74b36d321e04576f4ef1b8.css' media='all' rel='stylesheet' data-target='desktop_theme' data-theme-id='13' data-theme-name='discourse-mermaid-theme-component'><link href='https://dub2.discourse-cdn.com/unity/stylesheets/desktop_theme_6_953aa87e9ac9cc51e20305e98e782fbec1b0decd.css' media='all' rel='stylesheet' data-target='desktop_theme' data-theme-id='6' data-theme-name='discourse-search-banner'><link href='https://dub2.discourse-cdn.com/unity/stylesheets/desktop_theme_45_726192e6534fe4d91047ee004c17310f78672e52.css' media='all' rel='stylesheet' data-target='desktop_theme' data-theme-id='45' data-theme-name='experimental filter component'><link href='https://dub2.discourse-cdn.com/unity/stylesheets/desktop_theme_46_07c0c0f168d9030b56037a94a177640f8e52ed4a.css' media='all' rel='stylesheet' data-target='desktop_theme' data-theme-id='46' data-theme-name='full width'><link href='https://dub2.discourse-cdn.com/unity/stylesheets/desktop_theme_15_f7eb451c3ff264d93f495b3d6fac50216f49e72d.css' media='all' rel='stylesheet' data-target='desktop_theme' data-theme-id='15' data-theme-name='image comparison slider'><link href='https://dub2.discourse-cdn.com/unity/stylesheets/desktop_theme_16_5b0101e1835bb5a0e53726e669f272edb9d23bbd.css' media='all' rel='stylesheet' data-target='desktop_theme' data-theme-id='16' data-theme-name='pdf previews'><link href='https://dub2.discourse-cdn.com/unity/stylesheets/desktop_theme_48_e048fdfd4a9755e059453bb30952ad45bf05e097.css' media='all' rel='stylesheet' data-target='desktop_theme' data-theme-id='48' data-theme-name='tag icons'><link href='https://dub2.discourse-cdn.com/unity/stylesheets/desktop_theme_17_91ca32199f3209aafcae04ddf03498ed470c69f1.css' media='all' rel='stylesheet' data-target='desktop_theme' data-theme-id='17' data-theme-name='tiles - gallery component'><link href='https://dub2.discourse-cdn.com/unity/stylesheets/desktop_theme_18_0559ffde96204857d0ebc8c686798e0873b0c584.css' media='all' rel='stylesheet' data-target='desktop_theme' data-theme-id='18' data-theme-name='topic thumbnails'><link href='https://dub2.discourse-cdn.com/unity/stylesheets/desktop_theme_28_1fc38880197870acc63fb0a16acf5aced129415b.css' media='all' rel='stylesheet' data-target='desktop_theme' data-theme-id='28' data-theme-name='unformatted code detector'><link href='https://dub2.discourse-cdn.com/unity/stylesheets/desktop_theme_49_b140cc9a50e4dd4d7f5154a7adfd1c85c59e3b63.css' media='all' rel='stylesheet' data-target='desktop_theme' data-theme-id='49' data-theme-name='unity: brand identity'><link href='https://dub2.discourse-cdn.com/unity/stylesheets/desktop_theme_25_30313f97df8e6b00d3ee8693aa3671cce7c9919a.css' media='all' rel='stylesheet' data-target='desktop_theme' data-theme-id='25' data-theme-name='unity: dsa'><link href='https://dub2.discourse-cdn.com/unity/stylesheets/desktop_theme_12_132a4fbaac41ffa5dd9101b35885f1a153acdbc5.css' media='all' rel='stylesheet' data-target='desktop_theme' data-theme-id='12' data-theme-name='unity: onetrust'><link href='https://dub2.discourse-cdn.com/unity/stylesheets/desktop_theme_50_cb48ef097d7269de9b930e7a46b126ce5b9df9e4.css' media='all' rel='stylesheet' data-target='desktop_theme' data-theme-id='50' data-theme-name='unity: theme extras'><link href='https://dub2.discourse-cdn.com/unity/stylesheets/desktop_theme_10_36ca6f6783651cde9551aca71e209742439766d4.css' media='all' rel='stylesheet' data-target='desktop_theme' data-theme-id='10' data-theme-name='unity'><link href='https://dub2.discourse-cdn.com/unity/stylesheets/desktop_theme_51_285c9656e620803a07e356ce8cb738d955d8ad2d.css' media='all' rel='stylesheet' data-target='desktop_theme' data-theme-id='51' data-theme-name='hotfix: restyle experimental topic summary'><link href='https://dub2.discourse-cdn.com/unity/stylesheets/desktop_theme_24_5c1029e2582d7c1b73ef31e86f4ea0f297bd8a06.css' media='all' rel='stylesheet' data-target='desktop_theme' data-theme-id='24' data-theme-name='override-mermaid-styles'>"
  3461. },
  3462. {
  3463. id: 4,
  3464. content: "<link href='https://yyz1.discourse-cdn.com/googleaitrial/stylesheets/color_definitions_google-ai-for-developers_8_2_a146065001d103c6f508d0aecd9795e2b85e0231.css' media='all' rel='stylesheet' class='light-scheme'><link href='https://yyz1.discourse-cdn.com/googleaitrial/stylesheets/desktop_512b34b3c789d4724f7cb6afc7f9dbb5bdcf63bc.css' media='all' rel='stylesheet' data-target='desktop'><link href='https://yyz1.discourse-cdn.com/googleaitrial/stylesheets/checklist_512b34b3c789d4724f7cb6afc7f9dbb5bdcf63bc.css' media='all' rel='stylesheet' data-target='checklist'><link href='https://yyz1.discourse-cdn.com/googleaitrial/stylesheets/discourse-ai_512b34b3c789d4724f7cb6afc7f9dbb5bdcf63bc.css' media='all' rel='stylesheet' data-target='discourse-ai'><link href='https://yyz1.discourse-cdn.com/googleaitrial/stylesheets/discourse-akismet_512b34b3c789d4724f7cb6afc7f9dbb5bdcf63bc.css' media='all' rel='stylesheet' data-target='discourse-akismet'><link href='https://yyz1.discourse-cdn.com/googleaitrial/stylesheets/discourse-cakeday_512b34b3c789d4724f7cb6afc7f9dbb5bdcf63bc.css' media='all' rel='stylesheet' data-target='discourse-cakeday'><link href='https://yyz1.discourse-cdn.com/googleaitrial/stylesheets/discourse-data-explorer_512b34b3c789d4724f7cb6afc7f9dbb5bdcf63bc.css' media='all' rel='stylesheet' data-target='discourse-data-explorer'><link href='https://yyz1.discourse-cdn.com/googleaitrial/stylesheets/discourse-details_512b34b3c789d4724f7cb6afc7f9dbb5bdcf63bc.css' media='all' rel='stylesheet' data-target='discourse-details'><link href='https://yyz1.discourse-cdn.com/googleaitrial/stylesheets/discourse-lazy-videos_512b34b3c789d4724f7cb6afc7f9dbb5bdcf63bc.css' media='all' rel='stylesheet' data-target='discourse-lazy-videos'><link href='https://yyz1.discourse-cdn.com/googleaitrial/stylesheets/discourse-local-dates_512b34b3c789d4724f7cb6afc7f9dbb5bdcf63bc.css' media='all' rel='stylesheet' data-target='discourse-local-dates'><link href='https://yyz1.discourse-cdn.com/googleaitrial/stylesheets/discourse-narrative-bot_512b34b3c789d4724f7cb6afc7f9dbb5bdcf63bc.css' media='all' rel='stylesheet' data-target='discourse-narrative-bot'><link href='https://yyz1.discourse-cdn.com/googleaitrial/stylesheets/discourse-policy_512b34b3c789d4724f7cb6afc7f9dbb5bdcf63bc.css' media='all' rel='stylesheet' data-target='discourse-policy'><link href='https://yyz1.discourse-cdn.com/googleaitrial/stylesheets/discourse-presence_512b34b3c789d4724f7cb6afc7f9dbb5bdcf63bc.css' media='all' rel='stylesheet' data-target='discourse-presence'><link href='https://yyz1.discourse-cdn.com/googleaitrial/stylesheets/discourse-reactions_512b34b3c789d4724f7cb6afc7f9dbb5bdcf63bc.css' media='all' rel='stylesheet' data-target='discourse-reactions'><link href='https://yyz1.discourse-cdn.com/googleaitrial/stylesheets/discourse-solved_512b34b3c789d4724f7cb6afc7f9dbb5bdcf63bc.css' media='all' rel='stylesheet' data-target='discourse-solved'><link href='https://yyz1.discourse-cdn.com/googleaitrial/stylesheets/discourse-templates_512b34b3c789d4724f7cb6afc7f9dbb5bdcf63bc.css' media='all' rel='stylesheet' data-target='discourse-templates'><link href='https://yyz1.discourse-cdn.com/googleaitrial/stylesheets/discourse-topic-voting_512b34b3c789d4724f7cb6afc7f9dbb5bdcf63bc.css' media='all' rel='stylesheet' data-target='discourse-topic-voting'><link href='https://yyz1.discourse-cdn.com/googleaitrial/stylesheets/footnote_512b34b3c789d4724f7cb6afc7f9dbb5bdcf63bc.css' media='all' rel='stylesheet' data-target='footnote'><link href='https://yyz1.discourse-cdn.com/googleaitrial/stylesheets/hosted-site_512b34b3c789d4724f7cb6afc7f9dbb5bdcf63bc.css' media='all' rel='stylesheet' data-target='hosted-site'><link href='https://yyz1.discourse-cdn.com/googleaitrial/stylesheets/poll_512b34b3c789d4724f7cb6afc7f9dbb5bdcf63bc.css' media='all' rel='stylesheet' data-target='poll'><link href='https://yyz1.discourse-cdn.com/googleaitrial/stylesheets/spoiler-alert_512b34b3c789d4724f7cb6afc7f9dbb5bdcf63bc.css' media='all' rel='stylesheet' data-target='spoiler-alert'><link href='https://yyz1.discourse-cdn.com/googleaitrial/stylesheets/discourse-ai_desktop_512b34b3c789d4724f7cb6afc7f9dbb5bdcf63bc.css' media='all' rel='stylesheet' data-target='discourse-ai_desktop'><link href='https://yyz1.discourse-cdn.com/googleaitrial/stylesheets/discourse-reactions_desktop_512b34b3c789d4724f7cb6afc7f9dbb5bdcf63bc.css' media='all' rel='stylesheet' data-target='discourse-reactions_desktop'><link href='https://yyz1.discourse-cdn.com/googleaitrial/stylesheets/discourse-topic-voting_desktop_512b34b3c789d4724f7cb6afc7f9dbb5bdcf63bc.css' media='all' rel='stylesheet' data-target='discourse-topic-voting_desktop'><link href='https://yyz1.discourse-cdn.com/googleaitrial/stylesheets/poll_desktop_512b34b3c789d4724f7cb6afc7f9dbb5bdcf63bc.css' media='all' rel='stylesheet' data-target='poll_desktop'><link href='https://yyz1.discourse-cdn.com/googleaitrial/stylesheets/desktop_theme_4_89b44c1aa4a914829f5dab76be36f050017112fd.css' media='all' rel='stylesheet' data-target='desktop_theme' data-theme-id='4' data-theme-name='discourse header search'><link href='https://yyz1.discourse-cdn.com/googleaitrial/stylesheets/desktop_theme_3_a8a980bc06c18d3fc858c318921f96f6581459cf.css' media='all' rel='stylesheet' data-target='desktop_theme' data-theme-id='3' data-theme-name='discourse-material-icons'><link href='https://yyz1.discourse-cdn.com/googleaitrial/stylesheets/desktop_theme_9_ad782db09c6a21e86f43e7f9fbbaa30324037bf5.css' media='all' rel='stylesheet' data-target='desktop_theme' data-theme-id='9' data-theme-name='global notice custom css'><link href='https://yyz1.discourse-cdn.com/googleaitrial/stylesheets/desktop_theme_8_878e84961d78833adf9238d6eda91eb9292d7ed3.css' media='all' rel='stylesheet' data-target='desktop_theme' data-theme-id='8' data-theme-name='temp nav fixes'><link href='https://yyz1.discourse-cdn.com/googleaitrial/stylesheets/desktop_theme_2_c35f48dbd27cfaac6e78670aa85b8a0bd9a462fa.css' media='all' rel='stylesheet' data-target='desktop_theme' data-theme-id='2' data-theme-name='google ai'>"
  3465. },
  3466. {
  3467. id: 5,
  3468. content: "<link href='https://forum.ksec.co.uk/stylesheets/color_definitions_light_7_2_5186d2d3066aedb3bfcac1027d47b8b0b5350afb.css' media='all' rel='stylesheet' class='light-scheme'><link href='https://forum.ksec.co.uk/stylesheets/color_definitions_dark_1_2_a0603164c6b779ba925871d7963187c6a6dfa8d0.css' media='(prefers-color-scheme:dark)' rel='stylesheet' class='dark-scheme'><link href='https://forum.ksec.co.uk/stylesheets/desktop_1f2801adf122e33ac71771f0a0d92bf223707572.css' media='all' rel='stylesheet' data-target='desktop'><link href='https://forum.ksec.co.uk/stylesheets/checklist_1f2801adf122e33ac71771f0a0d92bf223707572.css' media='all' rel='stylesheet' data-target='checklist'><link href='https://forum.ksec.co.uk/stylesheets/discourse-ai_1f2801adf122e33ac71771f0a0d92bf223707572.css' media='all' rel='stylesheet' data-target='discourse-ai'><link href='https://forum.ksec.co.uk/stylesheets/discourse-akismet_1f2801adf122e33ac71771f0a0d92bf223707572.css' media='all' rel='stylesheet' data-target='discourse-akismet'><link href='https://forum.ksec.co.uk/stylesheets/discourse-cakeday_1f2801adf122e33ac71771f0a0d92bf223707572.css' media='all' rel='stylesheet' data-target='discourse-cakeday'><link href='https://forum.ksec.co.uk/stylesheets/discourse-details_1f2801adf122e33ac71771f0a0d92bf223707572.css' media='all' rel='stylesheet' data-target='discourse-details'><link href='https://forum.ksec.co.uk/stylesheets/discourse-gamification_1f2801adf122e33ac71771f0a0d92bf223707572.css' media='all' rel='stylesheet' data-target='discourse-gamification'><link href='https://forum.ksec.co.uk/stylesheets/discourse-lazy-videos_1f2801adf122e33ac71771f0a0d92bf223707572.css' media='all' rel='stylesheet' data-target='discourse-lazy-videos'><link href='https://forum.ksec.co.uk/stylesheets/discourse-local-dates_1f2801adf122e33ac71771f0a0d92bf223707572.css' media='all' rel='stylesheet' data-target='discourse-local-dates'><link href='https://forum.ksec.co.uk/stylesheets/discourse-narrative-bot_1f2801adf122e33ac71771f0a0d92bf223707572.css' media='all' rel='stylesheet' data-target='discourse-narrative-bot'><link href='https://forum.ksec.co.uk/stylesheets/discourse-presence_1f2801adf122e33ac71771f0a0d92bf223707572.css' media='all' rel='stylesheet' data-target='discourse-presence'><link href='https://forum.ksec.co.uk/stylesheets/discourse-reactions_1f2801adf122e33ac71771f0a0d92bf223707572.css' media='all' rel='stylesheet' data-target='discourse-reactions'><link href='https://forum.ksec.co.uk/stylesheets/discourse-rss-polling_1f2801adf122e33ac71771f0a0d92bf223707572.css' media='all' rel='stylesheet' data-target='discourse-rss-polling'><link href='https://forum.ksec.co.uk/stylesheets/docker_manager_1f2801adf122e33ac71771f0a0d92bf223707572.css' media='all' rel='stylesheet' data-target='docker_manager'><link href='https://forum.ksec.co.uk/stylesheets/footnote_1f2801adf122e33ac71771f0a0d92bf223707572.css' media='all' rel='stylesheet' data-target='footnote'><link href='https://forum.ksec.co.uk/stylesheets/poll_1f2801adf122e33ac71771f0a0d92bf223707572.css' media='all' rel='stylesheet' data-target='poll'><link href='https://forum.ksec.co.uk/stylesheets/spoiler-alert_1f2801adf122e33ac71771f0a0d92bf223707572.css' media='all' rel='stylesheet' data-target='spoiler-alert'><link href='https://forum.ksec.co.uk/stylesheets/discourse-ai_desktop_1f2801adf122e33ac71771f0a0d92bf223707572.css' media='all' rel='stylesheet' data-target='discourse-ai_desktop'><link href='https://forum.ksec.co.uk/stylesheets/discourse-gamification_desktop_1f2801adf122e33ac71771f0a0d92bf223707572.css' media='all' rel='stylesheet' data-target='discourse-gamification_desktop'><link href='https://forum.ksec.co.uk/stylesheets/discourse-reactions_desktop_1f2801adf122e33ac71771f0a0d92bf223707572.css' media='all' rel='stylesheet' data-target='discourse-reactions_desktop'><link href='https://forum.ksec.co.uk/stylesheets/poll_desktop_1f2801adf122e33ac71771f0a0d92bf223707572.css' media='all' rel='stylesheet' data-target='poll_desktop'><link href='https://forum.ksec.co.uk/stylesheets/desktop_theme_4_51fe4f92f85e2ddf8cb2ac39b3f18429f14452c8.css' media='all' rel='stylesheet' data-target='desktop_theme' data-theme-id='4' data-theme-name='discourse clickable topic'><link href='https://forum.ksec.co.uk/stylesheets/desktop_theme_6_003073d7e039da7d37eb1e79b3772306ac8657f4.css' media='all' rel='stylesheet' data-target='desktop_theme' data-theme-id='6' data-theme-name='discourse-gifs'><link href='https://forum.ksec.co.uk/stylesheets/desktop_theme_5_ce3252be82b7db613c78ea4f283dcf17abe51741.css' media='all' rel='stylesheet' data-target='desktop_theme' data-theme-id='5' data-theme-name='discourse-search-banner'><link href='https://forum.ksec.co.uk/stylesheets/desktop_theme_9_12b3533905718e859faa16d62a11c119e4d64875.css' media='all' rel='stylesheet' data-target='desktop_theme' data-theme-id='9' data-theme-name='icon header links'><link href='https://forum.ksec.co.uk/stylesheets/desktop_theme_3_28ffee2ef9ff10c2ad27c49227f68bb1da72a779.css' media='all' rel='stylesheet' data-target='desktop_theme' data-theme-id='3' data-theme-name='modern category + group boxes'><link href='https://forum.ksec.co.uk/stylesheets/desktop_theme_2_dd1b36aa59bc2c658ff7a7825007d31f580dab8b.css' media='all' rel='stylesheet' data-target='desktop_theme' data-theme-id='2' data-theme-name='air theme'><link href='https://forum.ksec.co.uk/stylesheets/desktop_theme_11_f4cc23465e9e5bf8d991504b6106825edc03c16a.css' media='all' rel='stylesheet' data-target='desktop_theme' data-theme-id='11' data-theme-name='custom css &amp; html'>"
  3469. },
  3470. {
  3471. id: 6,
  3472. content: "<link href='https://thepros.get.it/stylesheets/color_definitions_get-it-light_11_2_ee762a2dd28c63827357489083590cecd6db9323.css' media='all' rel='stylesheet' class='light-scheme'><link href='https://thepros.get.it/stylesheets/color_definitions_dark_1_2_09865b07ec4b67b9401e67edb03a78a33aadf245.css' media='(prefers-color-scheme:dark)' rel='stylesheet' class='dark-scheme'><link href='https://thepros.get.it/stylesheets/desktop_7c3d1efacb3c0d0d50e7279609b75879527a37ad.css' media='all' rel='stylesheet' data-target='desktop'><link href='https://thepros.get.it/stylesheets/chat_7c3d1efacb3c0d0d50e7279609b75879527a37ad.css' media='all' rel='stylesheet' data-target='chat'><link href='https://thepros.get.it/stylesheets/checklist_7c3d1efacb3c0d0d50e7279609b75879527a37ad.css' media='all' rel='stylesheet' data-target='checklist'><link href='https://thepros.get.it/stylesheets/discourse-details_7c3d1efacb3c0d0d50e7279609b75879527a37ad.css' media='all' rel='stylesheet' data-target='discourse-details'><link href='https://thepros.get.it/stylesheets/discourse-lazy-videos_7c3d1efacb3c0d0d50e7279609b75879527a37ad.css' media='all' rel='stylesheet' data-target='discourse-lazy-videos'><link href='https://thepros.get.it/stylesheets/discourse-local-dates_7c3d1efacb3c0d0d50e7279609b75879527a37ad.css' media='all' rel='stylesheet' data-target='discourse-local-dates'><link href='https://thepros.get.it/stylesheets/discourse-narrative-bot_7c3d1efacb3c0d0d50e7279609b75879527a37ad.css' media='all' rel='stylesheet' data-target='discourse-narrative-bot'><link href='https://thepros.get.it/stylesheets/discourse-presence_7c3d1efacb3c0d0d50e7279609b75879527a37ad.css' media='all' rel='stylesheet' data-target='discourse-presence'><link href='https://thepros.get.it/stylesheets/docker_manager_7c3d1efacb3c0d0d50e7279609b75879527a37ad.css' media='all' rel='stylesheet' data-target='docker_manager'><link href='https://thepros.get.it/stylesheets/footnote_7c3d1efacb3c0d0d50e7279609b75879527a37ad.css' media='all' rel='stylesheet' data-target='footnote'><link href='https://thepros.get.it/stylesheets/poll_7c3d1efacb3c0d0d50e7279609b75879527a37ad.css' media='all' rel='stylesheet' data-target='poll'><link href='https://thepros.get.it/stylesheets/spoiler-alert_7c3d1efacb3c0d0d50e7279609b75879527a37ad.css' media='all' rel='stylesheet' data-target='spoiler-alert'><link href='https://thepros.get.it/stylesheets/chat_desktop_7c3d1efacb3c0d0d50e7279609b75879527a37ad.css' media='all' rel='stylesheet' data-target='chat_desktop'><link href='https://thepros.get.it/stylesheets/poll_desktop_7c3d1efacb3c0d0d50e7279609b75879527a37ad.css' media='all' rel='stylesheet' data-target='poll_desktop'><link href='https://thepros.get.it/stylesheets/desktop_theme_4_b593f6a33945d84e8923041356dbae20f78de862.css' media='all' rel='stylesheet' data-target='desktop_theme' data-theme-id='4' data-theme-name='clickable topic'><link href='https://thepros.get.it/stylesheets/desktop_theme_3_d0247eb7936be09a3ee02299f743974ceebc1031.css' media='all' rel='stylesheet' data-target='desktop_theme' data-theme-id='3' data-theme-name='modern category + group boxes'><link href='https://thepros.get.it/stylesheets/desktop_theme_5_7bc2214caaf0db1a71f3fd05dc0fb629f55ac150.css' media='all' rel='stylesheet' data-target='desktop_theme' data-theme-id='5' data-theme-name='search banner'><link href='https://thepros.get.it/stylesheets/desktop_theme_2_381e73ac5235cf49a7c855137e4af4cc4d4a80ef.css' media='all' rel='stylesheet' data-target='desktop_theme' data-theme-id='2' data-theme-name='air theme'>"
  3473. }
  3474. ]
  3475. };
  3476. },
  3477. watch: {
  3478. modelValue(newValue) {
  3479. this.radio = newValue;
  3480. }
  3481. },
  3482. created() {
  3483. if (this.modelValue && this.modelValue !== 0) {
  3484. let r###lt = this.jsonData.find((item) => item.id === this.modelValue);
  3485. if (r###lt) {
  3486. $("body").append(r###lt.content);
  3487. }
  3488. }
  3489. }
  3490. };
  3491. const _hoisted_1$g = { class: "item" };
  3492. const _hoisted_2$5 = { class: "ls-flex" };
  3493. const _hoisted_3$4 = ["id", "value", "onChange"];
  3494. const _hoisted_4$4 = ["for"];
  3495. const _hoisted_5$2 = ["for"];
  3496. const _hoisted_6$2 = ["for"];
  3497. const _hoisted_7$1 = ["src", "alt"];
  3498. function _sfc_render$k(_ctx, _cache, $props, $setup, $data, $options) {
  3499. return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$g, [
  3500. _cache[1] || (_cache[1] = vue.createElementVNode("p", null, "切换论坛主题:", -1)),
  3501. _cache[2] || (_cache[2] = vue.createElementVNode("p", null, "无法修改,如果有样式问题无法解决,因为是直接 copy 别的论坛样式文件。", -1)),
  3502. _cache[3] || (_cache[3] = vue.createElementVNode("p", null, [
  3503. vue.createElementVNode("a", {
  3504. href: "https://github.com/dlzmoe/linuxdo-scripts/tree/main/themes",
  3505. target: "_blank"
  3506. }, " 如何单独使用,不依托于增强插件? ")
  3507. ], -1)),
  3508. _cache[4] || (_cache[4] = vue.createElementVNode("hr", null, null, -1)),
  3509. vue.createElementVNode("ul", null, [
  3510. (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($data.list, (item) => {
  3511. return vue.openBlock(), vue.createElementBlock("li", {
  3512. key: item.id
  3513. }, [
  3514. vue.createElementVNode("div", _hoisted_2$5, [
  3515. vue.withDirectives(vue.createElementVNode("input", {
  3516. type: "radio",
  3517. id: item.name,
  3518. name: "ls-themes",
  3519. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.radio = $event),
  3520. value: item.id,
  3521. onChange: ($event) => _ctx.$emit("update:modelValue", item.id)
  3522. }, null, 40, _hoisted_3$4), [
  3523. [vue.vModelRadio, $data.radio]
  3524. ]),
  3525. item.id !== 0 ? (vue.openBlock(), vue.createElementBlock("label", {
  3526. key: 0,
  3527. for: item.name
  3528. }, "风格 " + vue.toDisplayString(item.id), 9, _hoisted_4$4)) : (vue.openBlock(), vue.createElementBlock("label", {
  3529. key: 1,
  3530. for: item.name
  3531. }, "关闭", 8, _hoisted_5$2))
  3532. ]),
  3533. vue.createElementVNode("label", {
  3534. for: item.name
  3535. }, [
  3536. item.id !== 0 ? (vue.openBlock(), vue.createElementBlock("img", {
  3537. key: 0,
  3538. src: item.imgurl,
  3539. alt: item.name
  3540. }, null, 8, _hoisted_7$1)) : vue.createCommentVNode("", true)
  3541. ], 8, _hoisted_6$2)
  3542. ]);
  3543. }), 128))
  3544. ])
  3545. ]);
  3546. }
  3547. const Themes = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["render", _sfc_render$k], ["__scopeId", "data-v-b5335091"]]);
  3548. const _sfc_main$j = {
  3549. data() {
  3550. return {};
  3551. },
  3552. methods: {
  3553. // 导入数据
  3554. triggerFileInput() {
  3555. this.$refs.fileInput.click();
  3556. },
  3557. handleFileUpload(event) {
  3558. const file = event.target.files[0];
  3559. if (file && file.type === "application/json") {
  3560. const reader = new FileReader();
  3561. reader.onload = (e) => {
  3562. try {
  3563. const jsonData = JSON.parse(e.target.r###lt);
  3564. this.importData(jsonData);
  3565. } catch (error) {
  3566. console.error("Error parsing JSON:", error);
  3567. }
  3568. };
  3569. reader.readAsText(file);
  3570. } else {
  3571. console.error("Please select a valid JSON file.");
  3572. }
  3573. },
  3574. // 处理导入的数据
  3575. importData(data) {
  3576. localStorage.setItem("linxudoscriptssetting", data);
  3577. this.$messageToast("导入成功,即将刷新页面!");
  3578. setTimeout(() => {
  3579. location.reload();
  3580. }, 1500);
  3581. },
  3582. // 导出数据
  3583. exportData() {
  3584. const today = /* @__PURE__ */ new Date();
  3585. const year = today.getFullYear();
  3586. const month = String(today.getMonth() + 1).padStart(2, "0");
  3587. const day = String(today.getDate()).padStart(2, "0");
  3588. const formattedDate = year + month + day;
  3589. const data = localStorage.getItem("linxudoscriptssetting");
  3590. const dataStr = JSON.stringify(data, null, 2);
  3591. const blob = new Blob([dataStr], { type: "application/json" });
  3592. const url = URL.createObjectURL(blob);
  3593. const link = document.createElement("a");
  3594. link.href = url;
  3595. link.download = `linuxdo-script-data-${formattedDate}.json`;
  3596. document.body.appendChild(link);
  3597. link.click();
  3598. document.body.removeChild(link);
  3599. URL.revokeObjectURL(url);
  3600. this.$messageToast("导出成功!");
  3601. }
  3602. }
  3603. };
  3604. function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) {
  3605. return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
  3606. vue.createElementVNode("input", {
  3607. type: "file",
  3608. id: "fileInput",
  3609. ref: "fileInput",
  3610. style: { "display": "none" },
  3611. accept: ".json",
  3612. onChange: _cache[0] || (_cache[0] = (...args) => $options.handleFileUpload && $options.handleFileUpload(...args))
  3613. }, null, 544),
  3614. vue.createElementVNode("button", {
  3615. class: "btn import",
  3616. onClick: _cache[1] || (_cache[1] = (...args) => $options.triggerFileInput && $options.triggerFileInput(...args))
  3617. }, "导入"),
  3618. vue.createElementVNode("button", {
  3619. class: "btn export",
  3620. onClick: _cache[2] || (_cache[2] = (...args) => $options.exportData && $options.exportData(...args))
  3621. }, "导出")
  3622. ], 64);
  3623. }
  3624. const ManualBackup = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$j]]);
  3625. const _sfc_main$i = {
  3626. props: {
  3627. value: {
  3628. type: Object,
  3629. default: {
  3630. webdavUrl: "",
  3631. webdavUsername: "",
  3632. webdavPassword: ""
  3633. }
  3634. }
  3635. },
  3636. components: {
  3637. ManualBackup
  3638. },
  3639. watch: {
  3640. value(newValue) {
  3641. this.tableData = newValue;
  3642. }
  3643. },
  3644. data() {
  3645. return {
  3646. tableData: this.value
  3647. // webdavUrl: "",
  3648. // webdavUsername: "",
  3649. // webdavPassword: "",
  3650. };
  3651. },
  3652. methods: {
  3653. handleChange() {
  3654. $(".lxwebdavpassword").removeClass("act");
  3655. this.$emit("update:value", this.tableData);
  3656. let linxudoscriptssetting = JSON.parse(
  3657. localStorage.getItem("linxudoscriptssetting")
  3658. );
  3659. let data = {
  3660. webdavUrl: this.tableData.webdavUrl,
  3661. webdavUsername: this.tableData.webdavUsername,
  3662. webdavPassword: this.tableData.webdavPassword
  3663. };
  3664. linxudoscriptssetting.syncbackup = data;
  3665. localStorage.setItem(
  3666. "linxudoscriptssetting",
  3667. JSON.stringify(linxudoscriptssetting)
  3668. );
  3669. },
  3670. // 检查文件夹是否存在
  3671. checkFolderExists(folderUrl) {
  3672. return new Promise((resolve, reject) => {
  3673. GM_xmlhttpRequest({
  3674. method: "PROPFIND",
  3675. url: folderUrl,
  3676. headers: {
  3677. Authorization: "Basic " + btoa(`${this.tableData.webdavUsername}:${this.tableData.webdavPassword}`),
  3678. Depth: "1"
  3679. // 只检查一层
  3680. },
  3681. onload: function(response) {
  3682. if (response.status === 207) {
  3683. resolve(true);
  3684. } else if (response.status === 404) {
  3685. resolve(false);
  3686. } else {
  3687. reject(new Error(`Error checking folder: ${response.statusText}`));
  3688. }
  3689. },
  3690. onerror: function(error) {
  3691. reject(error);
  3692. }
  3693. });
  3694. });
  3695. },
  3696. // 创建文件夹
  3697. createFolder(folderUrl) {
  3698. return new Promise((resolve, reject) => {
  3699. GM_xmlhttpRequest({
  3700. method: "MKCOL",
  3701. url: folderUrl,
  3702. headers: {
  3703. Authorization: "Basic " + btoa(`${this.tableData.webdavUsername}:${this.tableData.webdavPassword}`)
  3704. },
  3705. onload: function(response) {
  3706. if (response.status === 201) {
  3707. resolve(true);
  3708. } else {
  3709. reject(new Error(`Error creating folder: ${response.statusText}`));
  3710. }
  3711. },
  3712. onerror: function(error) {
  3713. reject(error);
  3714. }
  3715. });
  3716. });
  3717. },
  3718. // 检查并创建文件夹
  3719. async checkAndCreateFolder() {
  3720. const folderUrl = `${this.tableData.webdavUrl}linuxdo-scripts-backup/`;
  3721. try {
  3722. const exists = await this.checkFolderExists(folderUrl);
  3723. if (!exists) {
  3724. await this.createFolder(folderUrl);
  3725. console.log("Folder 'linuxdo-scripts-backup' created successfully.");
  3726. } else {
  3727. console.log("Folder 'linuxdo-scripts-backup' already exists.");
  3728. }
  3729. const data = localStorage.getItem("linxudoscriptssetting");
  3730. let fileData;
  3731. try {
  3732. fileData = JSON.stringify(JSON.parse(data));
  3733. } catch (error) {
  3734. console.error("Error parsing localStorage data:", error);
  3735. return;
  3736. }
  3737. const uploadUrl = `${this.tableData.webdavUrl}linuxdo-scripts-backup/data.json`;
  3738. try {
  3739. const uploadResponse = await this.uploadFile(uploadUrl, fileData);
  3740. this.$messageToast("同步到云端成功!");
  3741. } catch (error) {
  3742. console.error("Upload failed:", error);
  3743. this.$messageToast("同步失败!");
  3744. }
  3745. } catch (error) {
  3746. console.error(error);
  3747. }
  3748. },
  3749. uploadFile(url, fileData) {
  3750. return new Promise((resolve, reject) => {
  3751. GM_xmlhttpRequest({
  3752. method: "PUT",
  3753. url,
  3754. data: fileData,
  3755. headers: {
  3756. "Content-Type": "text/plain",
  3757. Authorization: "Basic " + btoa(`${this.tableData.webdavUsername}:${this.tableData.webdavPassword}`)
  3758. },
  3759. onload: function(response) {
  3760. if (response.status >= 200 && response.status < 300) {
  3761. resolve(response);
  3762. } else {
  3763. reject(new Error(`Upload failed: ${response.statusText}`));
  3764. }
  3765. },
  3766. onerror: function(error) {
  3767. reject(error);
  3768. }
  3769. });
  3770. });
  3771. },
  3772. downloadFile(url) {
  3773. return new Promise((resolve, reject) => {
  3774. GM_xmlhttpRequest({
  3775. method: "GET",
  3776. url,
  3777. headers: {
  3778. Authorization: "Basic " + btoa(`${this.tableData.webdavUsername}:${this.tableData.webdavPassword}`)
  3779. },
  3780. onload: function(response) {
  3781. if (response.status >= 200 && response.status < 300) {
  3782. resolve(response.responseText);
  3783. } else {
  3784. reject(new Error(`Download failed: ${response.statusText}`));
  3785. }
  3786. },
  3787. onerror: function(error) {
  3788. reject(error);
  3789. }
  3790. });
  3791. });
  3792. },
  3793. // 上传
  3794. async uploadSampleFile() {
  3795. this.checkAndCreateFolder();
  3796. },
  3797. // 下载
  3798. async downloadSampleFile() {
  3799. const downloadUrl = `${this.tableData.webdavUrl}linuxdo-scripts-backup/data.json`;
  3800. try {
  3801. const downloadResponse = await this.downloadFile(downloadUrl);
  3802. localStorage.setItem("linxudoscriptssetting", downloadResponse);
  3803. this.$messageToast("下载成功,即将刷新页面!");
  3804. setTimeout(() => {
  3805. location.reload();
  3806. }, 1500);
  3807. } catch (error) {
  3808. console.error(error);
  3809. this.$messageToast("下载失败,请检查是否存在备份!");
  3810. }
  3811. },
  3812. // 显示/隐藏密码
  3813. showpsw() {
  3814. $(".lxwebdavpassword").addClass("act");
  3815. }
  3816. },
  3817. created() {
  3818. let linxudoscriptssetting = {};
  3819. try {
  3820. const storedData = localStorage.getItem("linxudoscriptssetting");
  3821. if (storedData) {
  3822. linxudoscriptssetting = JSON.parse(storedData);
  3823. }
  3824. } catch (error) {
  3825. console.error("Error parsing localStorage data:", error);
  3826. }
  3827. const syncbackup = linxudoscriptssetting.syncbackup || {};
  3828. this.tableData.webdavUrl = (syncbackup == null ? void 0 : syncbackup.webdavUrl) || "";
  3829. this.tableData.webdavUsername = (syncbackup == null ? void 0 : syncbackup.webdavUsername) || "";
  3830. this.tableData.webdavPassword = (syncbackup == null ? void 0 : syncbackup.webdavPassword) || "";
  3831. }
  3832. };
  3833. const _hoisted_1$f = { class: "item" };
  3834. const _hoisted_2$4 = { class: "item" };
  3835. const _hoisted_3$3 = { class: "item" };
  3836. const _hoisted_4$3 = { class: "btnwrapper" };
  3837. function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
  3838. const _component_ManualBackup = vue.resolveComponent("ManualBackup");
  3839. return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
  3840. _cache[12] || (_cache[12] = vue.createElementVNode("div", { class: "item" }, "用于在云端同步设置数据,无需手动导入导出。(同步前先保存设置)", -1)),
  3841. vue.createElementVNode("div", _hoisted_1$f, [
  3842. _cache[9] || (_cache[9] = vue.createElementVNode("div", { class: "tit" }, "WebDav 地址:", -1)),
  3843. vue.withDirectives(vue.createElementVNode("input", {
  3844. type: "text",
  3845. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.tableData.webdavUrl = $event),
  3846. onBlur: _cache[1] || (_cache[1] = (...args) => $options.handleChange && $options.handleChange(...args)),
  3847. placeholder: "https://dav.xxxx.com/dav/"
  3848. }, null, 544), [
  3849. [vue.vModelText, $data.tableData.webdavUrl]
  3850. ])
  3851. ]),
  3852. vue.createElementVNode("div", _hoisted_2$4, [
  3853. _cache[10] || (_cache[10] = vue.createElementVNode("div", { class: "tit" }, "WebDav 用户名:", -1)),
  3854. vue.withDirectives(vue.createElementVNode("input", {
  3855. type: "text",
  3856. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $data.tableData.webdavUsername = $event),
  3857. onBlur: _cache[3] || (_cache[3] = (...args) => $options.handleChange && $options.handleChange(...args))
  3858. }, null, 544), [
  3859. [vue.vModelText, $data.tableData.webdavUsername]
  3860. ])
  3861. ]),
  3862. vue.createElementVNode("div", _hoisted_3$3, [
  3863. _cache[11] || (_cache[11] = vue.createElementVNode("div", { class: "tit" }, "WebDav 密码:", -1)),
  3864. vue.withDirectives(vue.createElementVNode("input", {
  3865. type: "text",
  3866. class: "lxwebdavpassword",
  3867. "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => $data.tableData.webdavPassword = $event),
  3868. onBlur: _cache[5] || (_cache[5] = (...args) => $options.handleChange && $options.handleChange(...args)),
  3869. onFocus: _cache[6] || (_cache[6] = (...args) => $options.showpsw && $options.showpsw(...args))
  3870. }, null, 544), [
  3871. [vue.vModelText, $data.tableData.webdavPassword]
  3872. ])
  3873. ]),
  3874. vue.createElementVNode("div", _hoisted_4$3, [
  3875. vue.createElementVNode("button", {
  3876. onClick: _cache[7] || (_cache[7] = (...args) => $options.uploadSampleFile && $options.uploadSampleFile(...args))
  3877. }, "同步到云端"),
  3878. vue.createElementVNode("button", {
  3879. onClick: _cache[8] || (_cache[8] = (...args) => $options.downloadSampleFile && $options.downloadSampleFile(...args))
  3880. }, "下载到本地")
  3881. ]),
  3882. _cache[13] || (_cache[13] = vue.createElementVNode("hr", null, null, -1)),
  3883. _cache[14] || (_cache[14] = vue.createElementVNode("div", { style: { "margin": "10px 0" } }, "手动导入导出数据:", -1)),
  3884. vue.createVNode(_component_ManualBackup)
  3885. ], 64);
  3886. }
  3887. const SyncBackup = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_render$i], ["__scopeId", "data-v-11333de1"]]);
  3888. const _sfc_main$h = {
  3889. data() {
  3890. return {
  3891. status: false
  3892. };
  3893. },
  3894. methods: {
  3895. lookop() {
  3896. this.status = !this.status;
  3897. $(".post-stream").toggleClass("lookopwrapactive");
  3898. }
  3899. }
  3900. };
  3901. const _hoisted_1$e = { class: "lookopbtn" };
  3902. function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) {
  3903. return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$e, [
  3904. vue.createElementVNode("div", {
  3905. class: vue.normalizeClass(["el-button", { act: $data.status }]),
  3906. onClick: _cache[0] || (_cache[0] = (...args) => $options.lookop && $options.lookop(...args)),
  3907. title: "只看楼主"
  3908. }, " 楼主 ", 2)
  3909. ]);
  3910. }
  3911. const LookOP = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$h], ["__scopeId", "data-v-6520db1a"]]);
  3912. const _sfc_main$g = {
  3913. data() {
  3914. return {
  3915. isMinimized: true,
  3916. content: "输入用户名查询等级信息",
  3917. username: "",
  3918. levelDescriptions: {
  3919. 0: "游客",
  3920. 1: "基本用户",
  3921. 2: "成员",
  3922. 3: "活跃用户",
  3923. 4: "领导者"
  3924. },
  3925. levelRequirements: {
  3926. 0: { topics_entered: 5, posts_read_count: 30, time_read: 600 },
  3927. 1: {
  3928. days_visited: 15,
  3929. likes_given: 1,
  3930. likes_received: 1,
  3931. post_count: 3,
  3932. topics_entered: 20,
  3933. posts_read_count: 100,
  3934. time_read: 3600
  3935. },
  3936. 2: {
  3937. days_visited: 50,
  3938. likes_given: 30,
  3939. likes_received: 20,
  3940. post_count: 10,
  3941. topics_entered: 0,
  3942. posts_read_count: 0
  3943. }
  3944. }
  3945. };
  3946. },
  3947. methods: {
  3948. async fetchAboutData() {
  3949. try {
  3950. const response = await fetch("/about.json", {
  3951. headers: {
  3952. Accept: "application/json",
  3953. "User-Agent": "Mozilla/5.0"
  3954. },
  3955. method: "GET"
  3956. });
  3957. if (!response.ok)
  3958. throw new Error(`HTTP 错误!状态:${response.status}`);
  3959. return await response.json();
  3960. } catch (error) {
  3961. console.error("获取关于页面数据失败:", error);
  3962. this.displayError("获取关于页面数据失败");
  3963. return null;
  3964. }
  3965. },
  3966. async fetchUserData(username) {
  3967. try {
  3968. const response = await fetch(`/u/${username}/summary.json`, {
  3969. headers: {
  3970. Accept: "application/json",
  3971. "User-Agent": "Mozilla/5.0"
  3972. },
  3973. method: "GET"
  3974. });
  3975. if (!response.ok)
  3976. throw new Error(`HTTP 错误!状态:${response.status}`);
  3977. return await response.json();
  3978. } catch (error) {
  3979. console.error("获取用户数据失败:", error);
  3980. this.displayError("获取用户数据失败");
  3981. return null;
  3982. }
  3983. },
  3984. async handleSearch() {
  3985. if (this.username == "") {
  3986. return false;
  3987. }
  3988. this.content = "正在查询中,请稍后...";
  3989. const username = this.username.trim();
  3990. if (username) {
  3991. const aboutData = await this.fetchAboutData();
  3992. const userData = await this.fetchUserData(username);
  3993. if (userData && aboutData) {
  3994. const userSummary = userData.user_summary;
  3995. const user = userData.users[0];
  3996. const status = aboutData.about.stats;
  3997. this.updatePopupContent(userSummary, user, status);
  3998. }
  3999. }
  4000. },
  4001. updatePopupContent(userSummary, user, status) {
  4002. if (userSummary && user) {
  4003. let content = `<strong>信任等级:</strong>${this.levelDescriptions[user.trust_level]}<br><strong>升级进度:</strong><br>`;
  4004. if (user.trust_level === 3) {
  4005. content += `联系管理员以升级到领导者<br>`;
  4006. } else if (user.trust_level === 4) {
  4007. content += `您已是最高信任等级<br>`;
  4008. } else {
  4009. const requirements = this.levelRequirements[user.trust_level];
  4010. if (user.trust_level === 2) {
  4011. requirements.posts_read_count = Math.min(
  4012. Math.floor(status.posts_30_days / 4),
  4013. 2e4
  4014. );
  4015. requirements.topics_entered = Math.min(
  4016. Math.floor(status.topics_30_days / 4),
  4017. 500
  4018. );
  4019. }
  4020. Object.entries(requirements).forEach(([key, val]) => {
  4021. const currentVal = userSummary[key] || 0;
  4022. const color = currentVal >= val ? "green" : "red";
  4023. content += `${this.translateStat(
  4024. key
  4025. )}: <span style="color: ${color};">${currentVal} / ${val}</span><br>`;
  4026. });
  4027. }
  4028. this.content = content;
  4029. }
  4030. },
  4031. togglePopupSize() {
  4032. this.isMinimized = !this.isMinimized;
  4033. },
  4034. displayError(message) {
  4035. this.content = `<strong>错误:</strong>${message}`;
  4036. },
  4037. translateStat(stat) {
  4038. const translations = {
  4039. days_visited: "访问天数",
  4040. likes_given: "给出的赞",
  4041. likes_received: "收到的赞",
  4042. post_count: "帖子数量",
  4043. posts_read_count: "阅读的帖子数",
  4044. topics_entered: "进入的主题数",
  4045. time_read: "阅读时间"
  4046. };
  4047. return translations[stat] || stat;
  4048. }
  4049. },
  4050. created() {
  4051. setInterval(() => {
  4052. if (!this.username) {
  4053. const avatarImg = $("#toggle-current-user img.avatar");
  4054. const src = avatarImg.length ? avatarImg.attr("src") : null;
  4055. if (src) {
  4056. const match = src.match(/\/user_avatar\/linux\.do\/([^\/]+)/);
  4057. if (match && match[1]) {
  4058. this.username = match[1];
  4059. }
  4060. }
  4061. }
  4062. }, 1e3);
  4063. }
  4064. };
  4065. const _hoisted_1$d = {
  4066. key: 0,
  4067. id: "linuxDoLevelPopupContent"
  4068. };
  4069. const _hoisted_2$3 = ["innerHTML"];
  4070. function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
  4071. return vue.openBlock(), vue.createElementBlock("div", null, [
  4072. vue.createElementVNode("div", {
  4073. class: vue.normalizeClass(["el-button", ["linuxDoLevelPopup", $data.isMinimized ? "minimized" : ""]]),
  4074. onClick: _cache[0] || (_cache[0] = (...args) => $options.togglePopupSize && $options.togglePopupSize(...args)),
  4075. title: "等级查询"
  4076. }, _cache[3] || (_cache[3] = [
  4077. vue.createElementVNode("span", null, "等级", -1)
  4078. ]), 2),
  4079. !$data.isMinimized ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$d, [
  4080. vue.createElementVNode("div", { innerHTML: $data.content }, null, 8, _hoisted_2$3),
  4081. vue.withDirectives(vue.createElementVNode("input", {
  4082. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.username = $event),
  4083. autocomplete: "off",
  4084. type: "text",
  4085. placeholder: "请输入用户名...",
  4086. id: "linuxDoUserSearch"
  4087. }, null, 512), [
  4088. [vue.vModelText, $data.username]
  4089. ]),
  4090. vue.createElementVNode("button", {
  4091. onClick: _cache[2] || (_cache[2] = (...args) => $options.handleSearch && $options.handleSearch(...args)),
  4092. class: "btn btn-icon-text",
  4093. type: "button"
  4094. }, _cache[4] || (_cache[4] = [
  4095. vue.createElementVNode("span", { class: "d-button-label" }, "搜索", -1)
  4096. ]))
  4097. ])) : vue.createCommentVNode("", true)
  4098. ]);
  4099. }
  4100. const LevelDiglog = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$g], ["__scopeId", "data-v-82d039ba"]]);
  4101. const _sfc_main$f = {
  4102. methods: {
  4103. openai() {
  4104. window.open("https://shared.oaifree.com/?temporary-chat=true", "_blank");
  4105. }
  4106. }
  4107. };
  4108. function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
  4109. return vue.openBlock(), vue.createElementBlock("div", {
  4110. class: "el-button",
  4111. style: { "font-size": "18px" },
  4112. onClick: _cache[0] || (_cache[0] = (...args) => $options.openai && $options.openai(...args)),
  4113. type: "primary",
  4114. title: "AI对话"
  4115. }, " AI ");
  4116. }
  4117. const AIDialog = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render$f]]);
  4118. const _sfc_main$e = {
  4119. methods: {
  4120. replaybtn() {
  4121. $('button[title="开始撰写此话题的回复"]')[0].click();
  4122. }
  4123. }
  4124. };
  4125. const _hoisted_1$c = { class: "replaybtn" };
  4126. function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
  4127. return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$c, [
  4128. vue.createElementVNode("div", {
  4129. class: "el-button",
  4130. style: { "font-size": "18px" },
  4131. onClick: _cache[0] || (_cache[0] = (...args) => $options.replaybtn && $options.replaybtn(...args)),
  4132. type: "primary",
  4133. title: "回复"
  4134. }, _cache[1] || (_cache[1] = [
  4135. vue.createElementVNode("svg", {
  4136. class: "fa d-icon d-icon-reply svg-icon svg-string",
  4137. xmlns: "http://www.w3.org/2000/svg"
  4138. }, [
  4139. vue.createElementVNode("use", { href: "#reply" })
  4140. ], -1)
  4141. ]))
  4142. ]);
  4143. }
  4144. const ReplyBtn = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render$e]]);
  4145. const _sfc_main$d = {
  4146. data() {
  4147. return {
  4148. show: false,
  4149. list: []
  4150. };
  4151. },
  4152. methods: {
  4153. hotranking() {
  4154. this.show = !this.show;
  4155. },
  4156. query() {
  4157. this.list = [];
  4158. this.init();
  4159. this.$messageToast("刷新成功!");
  4160. },
  4161. init() {
  4162. fetch("/top.json").then((response) => response.json()).then((data) => {
  4163. this.list = data.topic_list.topics.slice(0, 10);
  4164. }).catch((error) => {
  4165. });
  4166. },
  4167. handleClickOutside(event) {
  4168. if (!event.target.closest(".hotranking") && !event.target.closest(".hotranking-container")) {
  4169. this.show = false;
  4170. }
  4171. }
  4172. },
  4173. mounted() {
  4174. document.addEventListener("click", this.handleClickOutside);
  4175. },
  4176. beforeDestroy() {
  4177. document.removeEventListener("click", this.handleClickOutside);
  4178. },
  4179. created() {
  4180. this.init();
  4181. }
  4182. };
  4183. const _hoisted_1$b = { class: "hotranking" };
  4184. const _hoisted_2$2 = { class: "hotranking-container" };
  4185. const _hoisted_3$2 = { class: "flex" };
  4186. const _hoisted_4$2 = ["href"];
  4187. function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
  4188. return vue.openBlock(), vue.createElementBlock("div", null, [
  4189. vue.createElementVNode("div", _hoisted_1$b, [
  4190. vue.createElementVNode("div", {
  4191. class: "el-button",
  4192. onClick: _cache[0] || (_cache[0] = (...args) => $options.hotranking && $options.hotranking(...args)),
  4193. title: "只看楼主"
  4194. }, "热门")
  4195. ]),
  4196. vue.withDirectives(vue.createElementVNode("div", _hoisted_2$2, [
  4197. vue.createElementVNode("div", _hoisted_3$2, [
  4198. _cache[2] || (_cache[2] = vue.createElementVNode("div", { class: "title" }, "今日最热帖子", -1)),
  4199. vue.createElementVNode("button", {
  4200. onClick: _cache[1] || (_cache[1] = (...args) => $options.query && $options.query(...args))
  4201. }, "刷新")
  4202. ]),
  4203. vue.createElementVNode("ol", null, [
  4204. (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($data.list, (item) => {
  4205. return vue.openBlock(), vue.createElementBlock("li", {
  4206. key: item.id
  4207. }, [
  4208. vue.createElementVNode("a", {
  4209. href: "https://linux.do/t/topic/" + item.id,
  4210. target: "_blank"
  4211. }, vue.toDisplayString(item.title), 9, _hoisted_4$2)
  4212. ]);
  4213. }), 128))
  4214. ])
  4215. ], 512), [
  4216. [vue.vShow, $data.show]
  4217. ])
  4218. ]);
  4219. }
  4220. const HotRankingList = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$d]]);
  4221. const _sfc_main$c = {
  4222. methods: {
  4223. scrollToTop() {
  4224. window.scrollTo({
  4225. top: 0,
  4226. behavior: "smooth"
  4227. });
  4228. }
  4229. }
  4230. };
  4231. const _hoisted_1$a = { class: "backtotop" };
  4232. function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
  4233. return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$a, [
  4234. vue.createElementVNode("div", {
  4235. class: "el-button",
  4236. style: { "font-size": "18px" },
  4237. onClick: _cache[0] || (_cache[0] = (...args) => $options.scrollToTop && $options.scrollToTop(...args)),
  4238. type: "primary",
  4239. title: "返回顶部"
  4240. }, _cache[1] || (_cache[1] = [
  4241. vue.createElementVNode("svg", {
  4242. class: "fa d-icon d-icon-arrow-up svg-icon svg-string",
  4243. xmlns: "http://www.w3.org/2000/svg"
  4244. }, [
  4245. vue.createElementVNode("use", { href: "#arrow-up" })
  4246. ], -1)
  4247. ]))
  4248. ]);
  4249. }
  4250. const BackToTop = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$c]]);
  4251. const _sfc_main$b = {
  4252. data() {
  4253. return {
  4254. version: packageJson.version
  4255. };
  4256. }
  4257. };
  4258. const _hoisted_1$9 = { class: "item-foot" };
  4259. function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
  4260. return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$9, [
  4261. _cache[0] || (_cache[0] = vue.createElementVNode("span", null, [
  4262. vue.createElementVNode("a", {
  4263. href: "https://github.com/dlzmoe/linuxdo-scripts",
  4264. target: "_blank"
  4265. }, [
  4266. vue.createElementVNode("img", {
  4267. alt: "GitHub Repo stars",
  4268. src: "https://img.shields.io/github/stars/dlzmoe/linuxdo-scripts?style=flat-square&label=Github%20Stars"
  4269. })
  4270. ])
  4271. ], -1)),
  4272. _cache[1] || (_cache[1] = vue.createElementVNode("span", null, [
  4273. vue.createElementVNode("a", {
  4274. href: "https://greasyfork.org/scripts/501827",
  4275. target: "_blank"
  4276. }, [
  4277. vue.createElementVNode("img", {
  4278. alt: "Greasy Fork Downloads",
  4279. src: "https://img.shields.io/greasyfork/dt/501827?style=flat-square&label=Greasy%20Fork"
  4280. })
  4281. ])
  4282. ], -1)),
  4283. vue.createElementVNode("span", null, "当前版本:" + vue.toDisplayString($data.version), 1)
  4284. ]);
  4285. }
  4286. const Updates = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render$b], ["__scopeId", "data-v-17d52b22"]]);
  4287. const _sfc_main$a = {
  4288. created() {
  4289. setTimeout(() => {
  4290. const isShowplugininstallationprompts = localStorage.getItem(
  4291. "isShowplugininstallationprompts"
  4292. );
  4293. if (isShowplugininstallationprompts == "true") ;
  4294. else {
  4295. if ($(".UsageTip").length < 1) {
  4296. $(".sidebar-footer-container").before(`
  4297. <dialog open class="UsageTip">
  4298. <div class="title">友情提示</div>
  4299. <div>
  4300. 佬友你好,你已经成功安装 linuxdo 增强插件啦!<a
  4301. href="https://linuxdo-scripts-docs.netlify.app/"
  4302. target="_blank">
  4303. 使用文档
  4304. </a>
  4305. </div>
  4306. <div style="color:#e00">
  4307. 设置按钮在下方切换主题的旁边哦~ 有个小齿轮,点击它开始配置插件!
  4308. </div>
  4309. <div>如果可以的话欢迎点个 star 支持一下~</div>
  4310. <div>
  4311. <a href="https://github.com/dlzmoe/linuxdo-scripts/" target="_blank">
  4312. <img
  4313. src="https://img.shields.io/github/stars/dlzmoe%2Flinuxdo-scripts?style=for-the-badge&labelColor=%235D5D5D&color=%23E97435"
  4314. alt="icon"
  4315. />
  4316. </a>
  4317. </div>
  4318. <button class="clicktohide">点击我,该提示永远不会出现啦</button>
  4319. </dialog>
  4320. `);
  4321. $(".clicktohide").click(function() {
  4322. localStorage.setItem("isShowplugininstallationprompts", true);
  4323. $(".UsageTip").remove();
  4324. });
  4325. }
  4326. }
  4327. }, 100);
  4328. }
  4329. };
  4330. function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
  4331. return null;
  4332. }
  4333. const UsageTip = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", _sfc_render$a]]);
  4334. const _sfc_main$9 = {
  4335. methods: {
  4336. init() {
  4337. $(".signature-img").each(function() {
  4338. var self1 = $(this);
  4339. var url1 = self1.attr("src");
  4340. var img1 = new Image();
  4341. img1.src = url1;
  4342. img1.onerror = function() {
  4343. if (self1.siblings(".signature-p").length < 1) {
  4344. self1.after(
  4345. `<p class="signature-p">${url1}(该用户签名不可访问,已自动转文字)</p>`
  4346. );
  4347. self1.hide();
  4348. }
  4349. };
  4350. });
  4351. }
  4352. },
  4353. created() {
  4354. let pollinglength2 = 0;
  4355. setInterval(() => {
  4356. if (pollinglength2 != $(".post-stream .topic-post").length) {
  4357. pollinglength2 = $(".post-stream .topic-post").length;
  4358. this.init();
  4359. }
  4360. }, 1e3);
  4361. }
  4362. };
  4363. function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
  4364. return null;
  4365. }
  4366. const Signature = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$9]]);
  4367. const _sfc_main$8 = {
  4368. data() {
  4369. return {
  4370. floorlotteryval1: "",
  4371. floorlotteryval2: "",
  4372. floorlotterloading: false,
  4373. floorlotterr###lt: ""
  4374. };
  4375. },
  4376. methods: {
  4377. // 开始抽奖
  4378. drawRandomNumbers() {
  4379. if (this.floorlotteryval1 === "" || this.floorlotteryval2 === "") {
  4380. this.$messageToast("请输入有效的数字");
  4381. return false;
  4382. }
  4383. const total = parseInt(this.floorlotteryval1);
  4384. const count = parseInt(this.floorlotteryval2);
  4385. if (isNaN(total) || isNaN(count) || total <= 0 || count <= 0 || count > total) {
  4386. this.$messageToast("请输入有效的数字");
  4387. return false;
  4388. }
  4389. this.floorlotterloading = true;
  4390. this.floorlotterr###lt = "";
  4391. setTimeout(() => {
  4392. const r###lt = this.getRandomNumbers(total, count);
  4393. this.floorlotterr###lt = r###lt.join(", ");
  4394. this.floorlotterloading = false;
  4395. }, 1e3);
  4396. },
  4397. getRandomNumbers(total, count) {
  4398. const numbers = Array.from({ length: total }, (_, i) => i + 1);
  4399. const r###lt = [];
  4400. for (let i = 0; i < count; i++) {
  4401. const randomIndex = Math.floor(Math.random() * numbers.length);
  4402. r###lt.push(numbers[randomIndex]);
  4403. numbers.splice(randomIndex, 1);
  4404. }
  4405. return r###lt;
  4406. },
  4407. closelotter() {
  4408. $("#floorlotteryDialog").hide();
  4409. $(".linuxdoscripts-opacity").hide();
  4410. }
  4411. }
  4412. };
  4413. const _hoisted_1$8 = { id: "floorlotteryDialog" };
  4414. const _hoisted_2$1 = {
  4415. class: "menu-body",
  4416. style: { "margin-top": "10px" }
  4417. };
  4418. const _hoisted_3$1 = { class: "inner" };
  4419. const _hoisted_4$1 = { class: "inner" };
  4420. const _hoisted_5$1 = { key: 0 };
  4421. const _hoisted_6$1 = {
  4422. key: 1,
  4423. title: "抽奖结果",
  4424. type: "success"
  4425. };
  4426. function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
  4427. return vue.openBlock(), vue.createElementBlock("dialog", _hoisted_1$8, [
  4428. _cache[7] || (_cache[7] = vue.createElementVNode("div", { class: "menu-header" }, [
  4429. vue.createElementVNode("div", { class: "title" }, "楼层抽奖")
  4430. ], -1)),
  4431. vue.createElementVNode("div", _hoisted_2$1, [
  4432. vue.createElementVNode("div", _hoisted_3$1, [
  4433. _cache[4] || (_cache[4] = vue.createElementVNode("label", null, "总楼层数:", -1)),
  4434. vue.withDirectives(vue.createElementVNode("input", {
  4435. type: "text",
  4436. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.floorlotteryval1 = $event)
  4437. }, null, 512), [
  4438. [vue.vModelText, $data.floorlotteryval1]
  4439. ])
  4440. ]),
  4441. vue.createElementVNode("div", _hoisted_4$1, [
  4442. _cache[5] || (_cache[5] = vue.createElementVNode("label", null, "抽奖数量:", -1)),
  4443. vue.withDirectives(vue.createElementVNode("input", {
  4444. type: "text",
  4445. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.floorlotteryval2 = $event)
  4446. }, null, 512), [
  4447. [vue.vModelText, $data.floorlotteryval2]
  4448. ])
  4449. ]),
  4450. vue.createElementVNode("button", {
  4451. class: "btn save",
  4452. onClick: _cache[2] || (_cache[2] = (...args) => $options.drawRandomNumbers && $options.drawRandomNumbers(...args))
  4453. }, "开始抽奖"),
  4454. vue.createElementVNode("button", {
  4455. class: "btn",
  4456. style: { "background": "#979797" },
  4457. plain: "",
  4458. onClick: _cache[3] || (_cache[3] = (...args) => $options.closelotter && $options.closelotter(...args))
  4459. }, " 关闭弹窗 "),
  4460. _cache[6] || (_cache[6] = vue.createElementVNode("div", { style: { "height": "20px" } }, null, -1)),
  4461. $data.floorlotterloading ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5$1, "正在抽奖...")) : vue.createCommentVNode("", true),
  4462. $data.floorlotterr###lt ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6$1, " 抽奖结果:恭喜 " + vue.toDisplayString($data.floorlotterr###lt) + " 楼中奖! ", 1)) : vue.createCommentVNode("", true)
  4463. ])
  4464. ]);
  4465. }
  4466. const FloorLottery = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$8], ["__scopeId", "data-v-9114409e"]]);
  4467. const _sfc_main$7 = {};
  4468. const _hoisted_1$7 = {
  4469. xmlns: "http://www.w3.org/2000/svg",
  4470. width: "24",
  4471. height: "24",
  4472. fill: "none",
  4473. viewBox: "0 0 24 24",
  4474. class: "icon-sm"
  4475. };
  4476. function _sfc_render$7(_ctx, _cache) {
  4477. return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$7, _cache[0] || (_cache[0] = [
  4478. vue.createElementVNode("path", {
  4479. fill: "currentColor",
  4480. "fill-rule": "evenodd",
  4481. d: "M11.568 3.5a1 1 0 0 0-.863.494l-.811 1.381A3 3 0 0 1 7.33 6.856l-1.596.013a1 1 0 0 0-.858.501l-.44.761a1 1 0 0 0-.003.992l.792 1.4a3 3 0 0 1 0 2.954l-.792 1.4a1 1 0 0 0 .004.992l.439.76a1 1 0 0 0 .858.502l1.596.013a3 3 0 0 1 2.564 1.48l.811 1.382a1 1 0 0 0 .863.494h.87a1 1 0 0 0 .862-.494l.812-1.381a3 3 0 0 1 2.563-1.481l1.596-.013a1 1 0 0 0 .859-.501l.439-.761a1 1 0 0 0 .004-.992l-.793-1.4a3 3 0 0 1 0-2.953l.793-1.401a1 1 0 0 0-.004-.992l-.439-.76a1 1 0 0 0-.859-.502l-1.596-.013a3 3 0 0 1-2.563-1.48L13.3 3.993a1 1 0 0 0-.862-.494zM8.98 2.981A3 3 0 0 1 11.568 1.5h.87a3 3 0 0 1 2.588 1.481l.81 1.382a1 1 0 0 0 .855.494l1.597.013a3 3 0 0 1 2.575 1.502l.44.76a3 3 0 0 1 .011 2.975l-.792 1.4a1 1 0 0 0 0 .985l.792 1.401a3 3 0 0 1-.012 2.974l-.439.761a3 3 0 0 1-2.575 1.503l-1.597.012a1 1 0 0 0-.854.494l-.811 1.382a3 3 0 0 1-2.588 1.481h-.87a3 3 0 0 1-2.588-1.481l-.811-1.382a1 1 0 0 0-.855-.494l-1.596-.012a3 3 0 0 1-2.576-1.503l-.439-.76a3 3 0 0 1-.012-2.975l.793-1.4a1 1 0 0 0 0-.985l-.793-1.4a3 3 0 0 1 .012-2.975l.44-.761A3 3 0 0 1 5.717 4.87l1.596-.013a1 1 0 0 0 .855-.494z",
  4482. "clip-rule": "evenodd"
  4483. }, null, -1),
  4484. vue.createElementVNode("path", {
  4485. fill: "currentColor",
  4486. "fill-rule": "evenodd",
  4487. d: "M12.003 10.5a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3M8.502 12a3.5 3.5 0 1 1 7 .001 3.5 3.5 0 0 1-7-.001",
  4488. "clip-rule": "evenodd"
  4489. }, null, -1)
  4490. ]));
  4491. }
  4492. const Setting1 = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$7]]);
  4493. const _sfc_main$6 = {};
  4494. const _hoisted_1$6 = {
  4495. xmlns: "http://www.w3.org/2000/svg",
  4496. width: "24",
  4497. height: "24",
  4498. fill: "none",
  4499. viewBox: "0 0 24 24",
  4500. class: "icon-sm"
  4501. };
  4502. function _sfc_render$6(_ctx, _cache) {
  4503. return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$6, _cache[0] || (_cache[0] = [
  4504. vue.createElementVNode("path", {
  4505. fill: "currentColor",
  4506. "fill-rule": "evenodd",
  4507. d: "M12 4a3 3 0 1 0 0 6 3 3 0 0 0 0-6M7 7a5 5 0 1 1 10 0A5 5 0 0 1 7 7m12.028 8.626c-.342-.061-.834.027-1.346.557a1 1 0 0 1-1.438 0c-.512-.53-1.003-.618-1.345-.557-.36.064-.681.312-.837.702-.257.643-.16 2.334 2.901 4.134 3.062-1.8 3.159-3.49 2.901-4.134a1.11 1.11 0 0 0-.836-.702m2.693-.041c.854 2.134-.456 4.844-4.284 6.904a1 1 0 0 1-.948 0c-3.828-2.06-5.137-4.77-4.284-6.904a3.11 3.11 0 0 1 2.343-1.929c.809-.144 1.655.035 2.415.536.76-.5 1.607-.68 2.415-.536a3.11 3.11 0 0 1 2.343 1.929m-11.795-1.38a1 1 0 0 1-.548 1.303C7.06 16.453 5.5 18.581 5.5 21a1 1 0 1 1-2 0c0-3.322 2.141-6.128 5.122-7.344a1 1 0 0 1 1.304.549",
  4508. "clip-rule": "evenodd"
  4509. }, null, -1)
  4510. ]));
  4511. }
  4512. const Setting2 = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$6]]);
  4513. const _sfc_main$5 = {};
  4514. const _hoisted_1$5 = {
  4515. xmlns: "http://www.w3.org/2000/svg",
  4516. width: "24",
  4517. height: "24",
  4518. fill: "none",
  4519. viewBox: "0 0 24 24",
  4520. class: "icon-sm"
  4521. };
  4522. function _sfc_render$5(_ctx, _cache) {
  4523. return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$5, _cache[0] || (_cache[0] = [
  4524. vue.createElementVNode("path", {
  4525. fill: "currentColor",
  4526. "fill-rule": "evenodd",
  4527. d: "M12.4 3.767a1 1 0 0 0-.8 0l-6 2.625a1 1 0 0 0-.6.916V13c0 1.714.616 3.283 1.638 4.5A6.99 6.99 0 0 1 12 15c2.153 0 4.078.972 5.362 2.5A6.97 6.97 0 0 0 19 13V7.308a1 1 0 0 0-.6-.916zm3.47 15.067A4.99 4.99 0 0 0 12 17a4.99 4.99 0 0 0-3.87 1.834A6.97 6.97 0 0 0 12 20c1.43 0 2.762-.43 3.87-1.166m-5.072-16.9a3 3 0 0 1 2.405 0l6 2.626A3 3 0 0 1 21 7.308V13a9 9 0 1 1-18 0V7.308A3 3 0 0 1 4.798 4.56zM12 8.5a1.75 1.75 0 1 0 0 3.5 1.75 1.75 0 0 0 0-3.5m-3.75 1.75a3.75 3.75 0 1 1 7.5 0 3.75 3.75 0 0 1-7.5 0",
  4528. "clip-rule": "evenodd"
  4529. }, null, -1)
  4530. ]));
  4531. }
  4532. const Setting3 = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$5]]);
  4533. const _sfc_main$4 = {};
  4534. const _hoisted_1$4 = {
  4535. xmlns: "http://www.w3.org/2000/svg",
  4536. width: "24",
  4537. height: "24",
  4538. viewBox: "0 0 24 24",
  4539. fill: "none",
  4540. stroke: "currentColor",
  4541. "stroke-width": "2",
  4542. "stroke-linecap": "round",
  4543. "stroke-linejoin": "round",
  4544. class: "icon icon-tabler icons-tabler-outline icon-tabler-brand-openai"
  4545. };
  4546. function _sfc_render$4(_ctx, _cache) {
  4547. return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$4, _cache[0] || (_cache[0] = [
  4548. vue.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M11.217 19.384a3.501 3.501 0 0 0 6.783 -1.217v-5.167l-6 -3.35"></path><path d="M5.214 15.014a3.501 3.501 0 0 0 4.446 5.266l4.34 -2.534v-6.946"></path><path d="M6 7.63c-1.391 -.236 -2.787 .395 -3.534 1.689a3.474 3.474 0 0 0 1.271 4.745l4.263 2.514l6 -3.348"></path><path d="M12.783 4.616a3.501 3.501 0 0 0 -6.783 1.217v5.067l6 3.45"></path><path d="M18.786 8.986a3.501 3.501 0 0 0 -4.446 -5.266l-4.34 2.534v6.946"></path><path d="M18 16.302c1.391 .236 2.787 -.395 3.534 -1.689a3.474 3.474 0 0 0 -1.271 -4.745l-4.308 -2.514l-5.955 3.42"></path>', 7)
  4549. ]));
  4550. }
  4551. const Setting4 = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$4]]);
  4552. const _sfc_main$3 = {};
  4553. const _hoisted_1$3 = {
  4554. xmlns: "http://www.w3.org/2000/svg",
  4555. width: "24",
  4556. height: "24",
  4557. viewBox: "0 0 24 24",
  4558. fill: "none",
  4559. stroke: "currentColor",
  4560. "stroke-width": "2",
  4561. "stroke-linecap": "round",
  4562. "stroke-linejoin": "round",
  4563. class: "icon icon-tabler icons-tabler-outline icon-tabler-cheese"
  4564. };
  4565. function _sfc_render$3(_ctx, _cache) {
  4566. return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$3, _cache[0] || (_cache[0] = [
  4567. vue.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M4.519 20.008l16.481 -.008v-3.5a2 2 0 1 1 0 -4v-3.5h-16.722"></path><path d="M21 9l-9.385 -4.992c-2.512 .12 -4.758 1.42 -6.327 3.425c-1.423 1.82 -2.288 4.221 -2.288 6.854c0 2.117 .56 4.085 1.519 5.721"></path><path d="M15 13v.01"></path><path d="M8 13v.01"></path><path d="M11 16v.01"></path>', 6)
  4568. ]));
  4569. }
  4570. const Setting5 = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$3]]);
  4571. const _sfc_main$2 = {};
  4572. const _hoisted_1$2 = {
  4573. xmlns: "http://www.w3.org/2000/svg",
  4574. width: "24",
  4575. height: "24",
  4576. viewBox: "0 0 24 24",
  4577. fill: "none",
  4578. stroke: "currentColor",
  4579. "stroke-width": "2",
  4580. "stroke-linecap": "round",
  4581. "stroke-linejoin": "round",
  4582. class: "icon icon-tabler icons-tabler-outline icon-tabler-refresh"
  4583. };
  4584. function _sfc_render$2(_ctx, _cache) {
  4585. return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$2, _cache[0] || (_cache[0] = [
  4586. vue.createElementVNode("path", {
  4587. stroke: "none",
  4588. d: "M0 0h24v24H0z",
  4589. fill: "none"
  4590. }, null, -1),
  4591. vue.createElementVNode("path", { d: "M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4" }, null, -1),
  4592. vue.createElementVNode("path", { d: "M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4" }, null, -1)
  4593. ]));
  4594. }
  4595. const Setting6 = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2]]);
  4596. const _sfc_main$1 = {};
  4597. const _hoisted_1$1 = {
  4598. xmlns: "http://www.w3.org/2000/svg",
  4599. width: "24",
  4600. height: "24",
  4601. viewBox: "0 0 24 24",
  4602. fill: "none",
  4603. stroke: "currentColor",
  4604. "stroke-width": "2",
  4605. "stroke-linecap": "round",
  4606. "stroke-linejoin": "round",
  4607. class: "icon icon-tabler icons-tabler-outline icon-tabler-language-hiragana"
  4608. };
  4609. function _sfc_render$1(_ctx, _cache) {
  4610. return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$1, _cache[0] || (_cache[0] = [
  4611. vue.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M4 5h7"></path><path d="M7 4c0 4.846 0 7 .5 8"></path><path d="M10 8.5c0 2.286 -2 4.5 -3.5 4.5s-2.5 -1.135 -2.5 -2c0 -2 1 -3 3 -3s5 .57 5 2.857c0 1.524 -.667 2.571 -2 3.143"></path><path d="M12 20l4 -9l4 9"></path><path d="M19.1 18h-6.2"></path>', 6)
  4612. ]));
  4613. }
  4614. const Setting7 = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1]]);
  4615. const _sfc_main = {
  4616. components: {
  4617. Setting1,
  4618. Setting2,
  4619. Setting3,
  4620. Setting4,
  4621. Setting5,
  4622. Setting6,
  4623. Setting7,
  4624. MenuOpenpostblank,
  4625. MenuNewtopicreminder,
  4626. MenuAutoexpandreply,
  4627. MenuAutoexpandreply1,
  4628. MenuShowcreatetime,
  4629. MenuShowcreatetime1,
  4630. MenuShowfloors,
  4631. MenuHidetopicdetailtitle,
  4632. MenuTopicpreview,
  4633. MenuCreatereply,
  4634. MenuBlockuserlist,
  4635. Updates,
  4636. MenuLookOP,
  4637. LookOP,
  4638. LevelDiglog,
  4639. UsageTip,
  4640. MenuFloorHeight,
  4641. UserTags,
  4642. MenuOtherCss,
  4643. MenuLogoUrl,
  4644. ReplyTBEnjoy,
  4645. MenuPangu,
  4646. MenuLevelSearch,
  4647. MenuShowUnread,
  4648. MenuFilterText,
  4649. MenuLookmeSign,
  4650. MenuQuickAccess,
  4651. MenureplaceEmojiStyle,
  4652. MenuShowAI,
  4653. AIDialog,
  4654. MenuEditorJa,
  4655. MenuCreatedOrder,
  4656. GPTconfig,
  4657. MenuStickyNav,
  4658. MenuBlockKeyword,
  4659. SyncBackup,
  4660. MenuShieldPosts,
  4661. Themes,
  4662. Signature,
  4663. MenuNextPosts,
  4664. MenuSelectedShare,
  4665. MenuDisableAutoplay,
  4666. MenuShowRepltBtn,
  4667. ReplyBtn,
  4668. FloorLottery,
  4669. MenuDonotTopic,
  4670. MenuAutoDark,
  4671. MenuHiddenPlaceholder,
  4672. MenuDisableReplaceState,
  4673. MenuRemovePostAvatar,
  4674. MenuHotRankingList,
  4675. HotRankingList,
  4676. MenuBackToTop,
  4677. BackToTop,
  4678. MenuQuickLikeTopic,
  4679. MenuHideNewBluedot,
  4680. MenuGifToPng,
  4681. MenuHideHomeBanner
  4682. },
  4683. data() {
  4684. return {
  4685. version: packageJson.version,
  4686. opacity: false,
  4687. open: false,
  4688. // 设置数据
  4689. settingData: {
  4690. checked1: false,
  4691. checked2: false,
  4692. checked3: false,
  4693. checked31: false,
  4694. checked4: false,
  4695. checked41: true,
  4696. checked5: true,
  4697. checked6: false,
  4698. checked7: false,
  4699. checked9: true,
  4700. QuickReply: "",
  4701. blockList: "",
  4702. blockkeywrod: "",
  4703. checked10: false,
  4704. othercss: "",
  4705. logourl: "",
  4706. checked11: true,
  4707. checked12: true,
  4708. checked13: false,
  4709. checked14: false,
  4710. checked15: false,
  4711. checked16: false,
  4712. checked17: {
  4713. value1: true,
  4714. value2: "twitter"
  4715. },
  4716. checked18: false,
  4717. checked19: false,
  4718. checked20: true,
  4719. checked21: {
  4720. value1: false,
  4721. cate: "搞七捻三",
  4722. days: "5"
  4723. },
  4724. checked22: true,
  4725. checked23: false,
  4726. checked24: true,
  4727. checked25: true,
  4728. checked26: true,
  4729. checked27: false,
  4730. checked28: false,
  4731. checked29: false,
  4732. checked33: false,
  4733. checked34: false,
  4734. checked35: false,
  4735. checked37: false,
  4736. checked38: false,
  4737. checked39: false,
  4738. removePostavatarData: {
  4739. enable: false,
  4740. showAuthor: false
  4741. },
  4742. usertags: [],
  4743. gptdata: {
  4744. value1: false,
  4745. value2: false,
  4746. title: false,
  4747. btn: true,
  4748. apikey: "",
  4749. baseurl: "https://api.openai.com",
  4750. full_url: "/v1/chat/completions",
  4751. model: "gpt-4o-mini",
  4752. prompt: "根据以下帖子内容进行总结,请使用 markdown 格式返回回答,没有字数限制,但要求文字精炼,简介准确,语言要求返回简体中文,并且进行中英文混排优化。可以通过编号列表(1,2,3)列出核心要点。注意不要输出标题,例如:核心要点总结,帖子总结等,直接输出文本段落。",
  4753. prompt1: "根据以下帖子内容,帮我给作者写一条回复,简短,表明我的观点,用口语回复,不需要很正式。您可以通过讨论的方式进行回复,这将有助于引导其他用户或作者进行互动。",
  4754. prompt2: "根据以下帖子内容,生成一个合适的标题用于社交论坛发布使用,格式要求:不要书名号或其他符号,只需要一句纯文本。尽量精简到 15 字以内,如果字数不够表达主题,可以适当多生成几个字。"
  4755. },
  4756. syncbackup: {
  4757. webdavUrl: "",
  4758. webdavUsername: "",
  4759. webdavPassword: ""
  4760. },
  4761. themes: 0
  4762. },
  4763. showlookop: false,
  4764. showlevelsearch: false,
  4765. showaidialog: false,
  4766. showreplybtn: false,
  4767. showhotranking: false,
  4768. showbacktotop: false
  4769. };
  4770. },
  4771. methods: {
  4772. // 检测新版本
  4773. checkversion() {
  4774. this.$messageToast("正在检测新版本...");
  4775. fetch("https://api.github.com/repos/dlzmoe/linuxdo-scripts/releases/latest").then((response) => response.json()).then((data) => {
  4776. if (this.version != data.tag_name) {
  4777. this.$messageToast("有新版本可用,即将前往更新!");
  4778. setTimeout(() => {
  4779. window.open("https://greasyfork.org/scripts/501827", "_blank");
  4780. }, 1e3);
  4781. } else {
  4782. this.$messageToast("当前已是最新版本!");
  4783. }
  4784. }).catch((error) => {
  4785. this.$messageToast("检测出错,请刷新后重试!");
  4786. });
  4787. },
  4788. // 关闭弹窗
  4789. closedialog() {
  4790. $(".linuxdoscripts-opacity").hide();
  4791. $("#menu_suspendedball").hide();
  4792. },
  4793. // 保存设置
  4794. save() {
  4795. localStorage.setItem("linxudoscriptssetting", JSON.stringify(this.settingData));
  4796. this.$messageToast("保存成功!");
  4797. $(".linuxdoscripts-opacity").hide();
  4798. $("#menu_suspendedball").hide();
  4799. },
  4800. // 保存并刷新
  4801. saveload() {
  4802. this.save();
  4803. location.reload();
  4804. },
  4805. // 打开抽奖弹窗
  4806. openFloorlottery() {
  4807. $("#menu_suspendedball").hide();
  4808. $("#floorlotteryDialog").show();
  4809. },
  4810. // 默认运行脚本
  4811. runscripts() {
  4812. $(".linuxdoscripts-setting").click(function() {
  4813. $(".linuxdoscripts-opacity").show();
  4814. $("#menu_suspendedball").show();
  4815. });
  4816. if ($(".menu-nav").length > 0) {
  4817. $(".menu-nav li").each(function() {
  4818. $(this).click(function() {
  4819. const num = $(this).index();
  4820. $(".menu-nav li").removeClass("act");
  4821. $(this).addClass("act");
  4822. $(".menu-body-item").removeClass("act");
  4823. $(".menu-body-item").eq(num).addClass("act");
  4824. });
  4825. });
  4826. }
  4827. },
  4828. // 初始化设置
  4829. initialization() {
  4830. localStorage.removeItem("linxudoscriptssetting");
  4831. this.$messageToast("初始化设置成功,即将自动刷新!");
  4832. setTimeout(() => {
  4833. location.reload();
  4834. }, 1e3);
  4835. }
  4836. },
  4837. created() {
  4838. console.log(
  4839. `%c linuxdo 增强插件 %c 已开启 `,
  4840. "padding: 2px 1px; color: #fff; background: #606060;",
  4841. "padding: 2px 1px; color: #fff; background: #42c02e;"
  4842. );
  4843. setInterval(() => {
  4844. if ($(".linuxdoscripts-setting").length < 1) {
  4845. $(".sidebar-footer-actions").prepend(`
  4846. <button class="btn no-text btn-icon color-scheme-toggler btn-flat linuxdoscripts-setting" title="设置" type="button">
  4847. <svg class="fa d-icon d-icon-gear svg-icon svg-string" xmlns="http://www.w3.org/2000/svg"><use href="#gear"></use></svg></button>`);
  4848. }
  4849. }, 1e3);
  4850. const linxudoscriptssetting = localStorage.getItem("linxudoscriptssetting");
  4851. if (linxudoscriptssetting) {
  4852. let deepMerge = function(target, source) {
  4853. for (const key in source) {
  4854. if (source[key] instanceof Object && key in target) {
  4855. target[key] = deepMerge(target[key], source[key]);
  4856. } else {
  4857. target[key] = source[key];
  4858. }
  4859. }
  4860. return target;
  4861. };
  4862. let existingData = JSON.parse(localStorage.getItem("linxudoscriptssetting"));
  4863. this.settingData = deepMerge(this.settingData, existingData);
  4864. localStorage.setItem("linxudoscriptssetting", JSON.stringify(this.settingData));
  4865. this.showlookop = this.settingData.checked9;
  4866. this.showlevelsearch = this.settingData.checked12;
  4867. this.showaidialog = this.settingData.checked18;
  4868. this.showreplybtn = this.settingData.checked25;
  4869. this.showhotranking = this.settingData.checked33;
  4870. this.showbacktotop = this.settingData.checked34;
  4871. if (this.showreplybtn) {
  4872. setInterval(() => {
  4873. if (window.location.href.includes("/topic/")) {
  4874. $(".replaybtn").show();
  4875. $(".lookopbtn").show();
  4876. } else {
  4877. $(".replaybtn").hide();
  4878. $(".lookopbtn").hide();
  4879. }
  4880. }, 1e3);
  4881. }
  4882. } else {
  4883. localStorage.setItem("linxudoscriptssetting", JSON.stringify(this.settingData));
  4884. }
  4885. setInterval(() => {
  4886. this.runscripts();
  4887. }, 1e3);
  4888. }
  4889. };
  4890. const _hoisted_1 = { id: "linuxdoscripts" };
  4891. const _hoisted_2 = { class: "setting-btn" };
  4892. const _hoisted_3 = {
  4893. open: "",
  4894. id: "menu_suspendedball"
  4895. };
  4896. const _hoisted_4 = { class: "menu-header" };
  4897. const _hoisted_5 = { class: "menu-flex" };
  4898. const _hoisted_6 = { class: "menu-nav" };
  4899. const _hoisted_7 = { class: "act" };
  4900. const _hoisted_8 = { class: "menu-body" };
  4901. const _hoisted_9 = { class: "menu-body-item act" };
  4902. const _hoisted_10 = { class: "menu-about" };
  4903. const _hoisted_11 = { class: "hint" };
  4904. const _hoisted_12 = { class: "menu-body-item" };
  4905. const _hoisted_13 = { class: "menu-body-item" };
  4906. const _hoisted_14 = { class: "menu-body-item" };
  4907. const _hoisted_15 = { class: "menu-body-item" };
  4908. const _hoisted_16 = { class: "menu-body-item" };
  4909. const _hoisted_17 = { class: "menu-footer" };
  4910. function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
  4911. const _component_BackToTop = vue.resolveComponent("BackToTop");
  4912. const _component_ReplyBtn = vue.resolveComponent("ReplyBtn");
  4913. const _component_LookOP = vue.resolveComponent("LookOP");
  4914. const _component_AIDialog = vue.resolveComponent("AIDialog");
  4915. const _component_LevelDiglog = vue.resolveComponent("LevelDiglog");
  4916. const _component_HotRankingList = vue.resolveComponent("HotRankingList");
  4917. const _component_Setting1 = vue.resolveComponent("Setting1");
  4918. const _component_Setting2 = vue.resolveComponent("Setting2");
  4919. const _component_Setting3 = vue.resolveComponent("Setting3");
  4920. const _component_Setting4 = vue.resolveComponent("Setting4");
  4921. const _component_Setting5 = vue.resolveComponent("Setting5");
  4922. const _component_Setting6 = vue.resolveComponent("Setting6");
  4923. const _component_Updates = vue.resolveComponent("Updates");
  4924. const _component_MenuOpenpostblank = vue.resolveComponent("MenuOpenpostblank");
  4925. const _component_MenuNewtopicreminder = vue.resolveComponent("MenuNewtopicreminder");
  4926. const _component_MenuAutoexpandreply = vue.resolveComponent("MenuAutoexpandreply");
  4927. const _component_MenuShowcreatetime = vue.resolveComponent("MenuShowcreatetime");
  4928. const _component_MenuShowcreatetime1 = vue.resolveComponent("MenuShowcreatetime1");
  4929. const _component_MenuShowfloors = vue.resolveComponent("MenuShowfloors");
  4930. const _component_MenuHidetopicdetailtitle = vue.resolveComponent("MenuHidetopicdetailtitle");
  4931. const _component_MenuTopicpreview = vue.resolveComponent("MenuTopicpreview");
  4932. const _component_MenuLookOP = vue.resolveComponent("MenuLookOP");
  4933. const _component_MenuFloorHeight = vue.resolveComponent("MenuFloorHeight");
  4934. const _component_MenuPangu = vue.resolveComponent("MenuPangu");
  4935. const _component_MenuLevelSearch = vue.resolveComponent("MenuLevelSearch");
  4936. const _component_MenuShowUnread = vue.resolveComponent("MenuShowUnread");
  4937. const _component_MenuFilterText = vue.resolveComponent("MenuFilterText");
  4938. const _component_MenuLookmeSign = vue.resolveComponent("MenuLookmeSign");
  4939. const _component_MenuQuickAccess = vue.resolveComponent("MenuQuickAccess");
  4940. const _component_MenureplaceEmojiStyle = vue.resolveComponent("MenureplaceEmojiStyle");
  4941. const _component_MenuShowAI = vue.resolveComponent("MenuShowAI");
  4942. const _component_MenuEditorJa = vue.resolveComponent("MenuEditorJa");
  4943. const _component_MenuStickyNav = vue.resolveComponent("MenuStickyNav");
  4944. const _component_MenuNextPosts = vue.resolveComponent("MenuNextPosts");
  4945. const _component_MenuSelectedShare = vue.resolveComponent("MenuSelectedShare");
  4946. const _component_MenuDisableAutoplay = vue.resolveComponent("MenuDisableAutoplay");
  4947. const _component_MenuShowRepltBtn = vue.resolveComponent("MenuShowRepltBtn");
  4948. const _component_MenuDonotTopic = vue.resolveComponent("MenuDonotTopic");
  4949. const _component_MenuAutoDark = vue.resolveComponent("MenuAutoDark");
  4950. const _component_MenuHiddenPlaceholder = vue.resolveComponent("MenuHiddenPlaceholder");
  4951. const _component_MenuDisableReplaceState = vue.resolveComponent("MenuDisableReplaceState");
  4952. const _component_MenuRemovePostAvatar = vue.resolveComponent("MenuRemovePostAvatar");
  4953. const _component_MenuHotRankingList = vue.resolveComponent("MenuHotRankingList");
  4954. const _component_MenuBackToTop = vue.resolveComponent("MenuBackToTop");
  4955. const _component_MenuQuickLikeTopic = vue.resolveComponent("MenuQuickLikeTopic");
  4956. const _component_MenuHideNewBluedot = vue.resolveComponent("MenuHideNewBluedot");
  4957. const _component_MenuGifToPng = vue.resolveComponent("MenuGifToPng");
  4958. const _component_MenuHideHomeBanner = vue.resolveComponent("MenuHideHomeBanner");
  4959. const _component_MenuLogoUrl = vue.resolveComponent("MenuLogoUrl");
  4960. const _component_MenuCreatereply = vue.resolveComponent("MenuCreatereply");
  4961. const _component_MenuBlockKeyword = vue.resolveComponent("MenuBlockKeyword");
  4962. const _component_MenuBlockuserlist = vue.resolveComponent("MenuBlockuserlist");
  4963. const _component_MenuShieldPosts = vue.resolveComponent("MenuShieldPosts");
  4964. const _component_MenuOtherCss = vue.resolveComponent("MenuOtherCss");
  4965. const _component_UserTags = vue.resolveComponent("UserTags");
  4966. const _component_GPTconfig = vue.resolveComponent("GPTconfig");
  4967. const _component_Themes = vue.resolveComponent("Themes");
  4968. const _component_SyncBackup = vue.resolveComponent("SyncBackup");
  4969. const _component_FloorLottery = vue.resolveComponent("FloorLottery");
  4970. const _component_UsageTip = vue.resolveComponent("UsageTip");
  4971. const _component_ReplyTBEnjoy = vue.resolveComponent("ReplyTBEnjoy");
  4972. const _component_Signature = vue.resolveComponent("Signature");
  4973. return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
  4974. _cache[61] || (_cache[61] = vue.createElementVNode("div", { class: "linuxdoscripts-opacity" }, null, -1)),
  4975. vue.createElementVNode("div", _hoisted_2, [
  4976. vue.withDirectives(vue.createVNode(_component_BackToTop, null, null, 512), [
  4977. [vue.vShow, $data.showbacktotop]
  4978. ]),
  4979. vue.withDirectives(vue.createVNode(_component_ReplyBtn, null, null, 512), [
  4980. [vue.vShow, $data.showreplybtn]
  4981. ]),
  4982. vue.withDirectives(vue.createVNode(_component_LookOP, null, null, 512), [
  4983. [vue.vShow, $data.showlookop]
  4984. ]),
  4985. vue.withDirectives(vue.createVNode(_component_AIDialog, null, null, 512), [
  4986. [vue.vShow, $data.showaidialog]
  4987. ]),
  4988. vue.withDirectives(vue.createVNode(_component_LevelDiglog, null, null, 512), [
  4989. [vue.vShow, $data.showlevelsearch]
  4990. ]),
  4991. vue.withDirectives(vue.createVNode(_component_HotRankingList, null, null, 512), [
  4992. [vue.vShow, $data.showhotranking]
  4993. ])
  4994. ]),
  4995. vue.createElementVNode("dialog", _hoisted_3, [
  4996. vue.createElementVNode("div", _hoisted_4, [
  4997. _cache[51] || (_cache[51] = vue.createElementVNode("div", { class: "title" }, "linuxdo 增强插件设置", -1)),
  4998. vue.createElementVNode("div", {
  4999. class: "close",
  5000. onClick: _cache[0] || (_cache[0] = (...args) => $options.closedialog && $options.closedialog(...args))
  5001. }, "+")
  5002. ]),
  5003. vue.createElementVNode("div", _hoisted_5, [
  5004. vue.createElementVNode("ul", _hoisted_6, [
  5005. vue.createElementVNode("li", _hoisted_7, [
  5006. vue.createVNode(_component_Setting1),
  5007. _cache[52] || (_cache[52] = vue.createTextVNode("通用设置"))
  5008. ]),
  5009. vue.createElementVNode("li", null, [
  5010. vue.createVNode(_component_Setting2),
  5011. _cache[53] || (_cache[53] = vue.createTextVNode("自定义"))
  5012. ]),
  5013. vue.createElementVNode("li", null, [
  5014. vue.createVNode(_component_Setting3),
  5015. _cache[54] || (_cache[54] = vue.createTextVNode("用户标签"))
  5016. ]),
  5017. vue.createElementVNode("li", null, [
  5018. vue.createVNode(_component_Setting4),
  5019. _cache[55] || (_cache[55] = vue.createTextVNode("AI 配置"))
  5020. ]),
  5021. vue.createElementVNode("li", null, [
  5022. vue.createVNode(_component_Setting5),
  5023. _cache[56] || (_cache[56] = vue.createTextVNode("主题风格"))
  5024. ]),
  5025. vue.createElementVNode("li", null, [
  5026. vue.createVNode(_component_Setting6),
  5027. _cache[57] || (_cache[57] = vue.createTextVNode("数据同步"))
  5028. ]),
  5029. vue.createVNode(_component_Updates)
  5030. ]),
  5031. vue.createElementVNode("div", _hoisted_8, [
  5032. vue.createElementVNode("div", _hoisted_9, [
  5033. vue.createElementVNode("div", _hoisted_10, [
  5034. _cache[60] || (_cache[60] = vue.createElementVNode("p", null, "请注意,该设置面板数据全部保存在本地浏览器缓存中,注意备份。", -1)),
  5035. vue.createElementVNode("p", _hoisted_11, [
  5036. _cache[58] || (_cache[58] = vue.createTextVNode(" 如果感觉哪里不太对劲,点我 ")),
  5037. vue.createElementVNode("span", {
  5038. class: "initialization",
  5039. onClick: _cache[1] || (_cache[1] = (...args) => $options.initialization && $options.initialization(...args))
  5040. }, "初始化设置"),
  5041. _cache[59] || (_cache[59] = vue.createTextVNode(" ,会清除所有的设置数据并初始化!! "))
  5042. ])
  5043. ]),
  5044. vue.createVNode(_component_MenuOpenpostblank, {
  5045. sort: 1,
  5046. modelValue: $data.settingData.checked1,
  5047. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $data.settingData.checked1 = $event)
  5048. }, null, 8, ["modelValue"]),
  5049. vue.createVNode(_component_MenuNewtopicreminder, {
  5050. sort: 2,
  5051. modelValue: $data.settingData.checked2,
  5052. "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $data.settingData.checked2 = $event)
  5053. }, null, 8, ["modelValue"]),
  5054. vue.createVNode(_component_MenuAutoexpandreply, {
  5055. sort: 3,
  5056. modelValue: $data.settingData.checked3,
  5057. "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => $data.settingData.checked3 = $event)
  5058. }, null, 8, ["modelValue"]),
  5059. vue.createVNode(_component_MenuShowcreatetime, {
  5060. sort: 4,
  5061. modelValue: $data.settingData.checked4,
  5062. "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => $data.settingData.checked4 = $event)
  5063. }, null, 8, ["modelValue"]),
  5064. vue.createVNode(_component_MenuShowcreatetime1, {
  5065. sort: 4.1,
  5066. modelValue: $data.settingData.checked41,
  5067. "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => $data.settingData.checked41 = $event)
  5068. }, null, 8, ["modelValue"]),
  5069. vue.createVNode(_component_MenuShowfloors, {
  5070. sort: 5,
  5071. modelValue: $data.settingData.checked5,
  5072. "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => $data.settingData.checked5 = $event)
  5073. }, null, 8, ["modelValue"]),
  5074. vue.createVNode(_component_MenuHidetopicdetailtitle, {
  5075. sort: 6,
  5076. modelValue: $data.settingData.checked6,
  5077. "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => $data.settingData.checked6 = $event)
  5078. }, null, 8, ["modelValue"]),
  5079. vue.createVNode(_component_MenuTopicpreview, {
  5080. sort: 7,
  5081. modelValue: $data.settingData.checked7,
  5082. "onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => $data.settingData.checked7 = $event)
  5083. }, null, 8, ["modelValue"]),
  5084. vue.createVNode(_component_MenuLookOP, {
  5085. sort: 9,
  5086. modelValue: $data.settingData.checked9,
  5087. "onUpdate:modelValue": _cache[10] || (_cache[10] = ($event) => $data.settingData.checked9 = $event)
  5088. }, null, 8, ["modelValue"]),
  5089. vue.createVNode(_component_MenuFloorHeight, {
  5090. sort: 10,
  5091. modelValue: $data.settingData.checked10,
  5092. "onUpdate:modelValue": _cache[11] || (_cache[11] = ($event) => $data.settingData.checked10 = $event)
  5093. }, null, 8, ["modelValue"]),
  5094. vue.createVNode(_component_MenuPangu, {
  5095. sort: 11,
  5096. modelValue: $data.settingData.checked11,
  5097. "onUpdate:modelValue": _cache[12] || (_cache[12] = ($event) => $data.settingData.checked11 = $event)
  5098. }, null, 8, ["modelValue"]),
  5099. vue.createVNode(_component_MenuLevelSearch, {
  5100. sort: 12,
  5101. modelValue: $data.settingData.checked12,
  5102. "onUpdate:modelValue": _cache[13] || (_cache[13] = ($event) => $data.settingData.checked12 = $event)
  5103. }, null, 8, ["modelValue"]),
  5104. vue.createVNode(_component_MenuShowUnread, {
  5105. sort: 13,
  5106. modelValue: $data.settingData.checked13,
  5107. "onUpdate:modelValue": _cache[14] || (_cache[14] = ($event) => $data.settingData.checked13 = $event)
  5108. }, null, 8, ["modelValue"]),
  5109. vue.createVNode(_component_MenuFilterText, {
  5110. sort: 14,
  5111. modelValue: $data.settingData.checked14,
  5112. "onUpdate:modelValue": _cache[15] || (_cache[15] = ($event) => $data.settingData.checked14 = $event)
  5113. }, null, 8, ["modelValue"]),
  5114. vue.createVNode(_component_MenuLookmeSign, {
  5115. sort: 15,
  5116. modelValue: $data.settingData.checked15,
  5117. "onUpdate:modelValue": _cache[16] || (_cache[16] = ($event) => $data.settingData.checked15 = $event)
  5118. }, null, 8, ["modelValue"]),
  5119. vue.createVNode(_component_MenuQuickAccess, {
  5120. sort: 16,
  5121. modelValue: $data.settingData.checked16,
  5122. "onUpdate:modelValue": _cache[17] || (_cache[17] = ($event) => $data.settingData.checked16 = $event)
  5123. }, null, 8, ["modelValue"]),
  5124. vue.createVNode(_component_MenureplaceEmojiStyle, {
  5125. sort: 17,
  5126. modelValue: $data.settingData.checked17,
  5127. "onUpdate:modelValue": _cache[18] || (_cache[18] = ($event) => $data.settingData.checked17 = $event)
  5128. }, null, 8, ["modelValue"]),
  5129. vue.createVNode(_component_MenuShowAI, {
  5130. sort: 18,
  5131. modelValue: $data.settingData.checked18,
  5132. "onUpdate:modelValue": _cache[19] || (_cache[19] = ($event) => $data.settingData.checked18 = $event)
  5133. }, null, 8, ["modelValue"]),
  5134. vue.createVNode(_component_MenuEditorJa, {
  5135. sort: 19,
  5136. modelValue: $data.settingData.checked19,
  5137. "onUpdate:modelValue": _cache[20] || (_cache[20] = ($event) => $data.settingData.checked19 = $event)
  5138. }, null, 8, ["modelValue"]),
  5139. vue.createVNode(_component_MenuStickyNav, {
  5140. sort: 20,
  5141. modelValue: $data.settingData.checked20,
  5142. "onUpdate:modelValue": _cache[21] || (_cache[21] = ($event) => $data.settingData.checked20 = $event)
  5143. }, null, 8, ["modelValue"]),
  5144. vue.createVNode(_component_MenuNextPosts, {
  5145. sort: 21,
  5146. modelValue: $data.settingData.checked22,
  5147. "onUpdate:modelValue": _cache[22] || (_cache[22] = ($event) => $data.settingData.checked22 = $event)
  5148. }, null, 8, ["modelValue"]),
  5149. vue.createVNode(_component_MenuSelectedShare, {
  5150. sort: 22,
  5151. modelValue: $data.settingData.checked23,
  5152. "onUpdate:modelValue": _cache[23] || (_cache[23] = ($event) => $data.settingData.checked23 = $event)
  5153. }, null, 8, ["modelValue"]),
  5154. vue.createVNode(_component_MenuDisableAutoplay, {
  5155. sort: 23,
  5156. modelValue: $data.settingData.checked24,
  5157. "onUpdate:modelValue": _cache[24] || (_cache[24] = ($event) => $data.settingData.checked24 = $event)
  5158. }, null, 8, ["modelValue"]),
  5159. vue.createVNode(_component_MenuShowRepltBtn, {
  5160. sort: 24,
  5161. modelValue: $data.settingData.checked25,
  5162. "onUpdate:modelValue": _cache[25] || (_cache[25] = ($event) => $data.settingData.checked25 = $event)
  5163. }, null, 8, ["modelValue"]),
  5164. vue.createVNode(_component_MenuDonotTopic, {
  5165. sort: 25,
  5166. modelValue: $data.settingData.checked26,
  5167. "onUpdate:modelValue": _cache[26] || (_cache[26] = ($event) => $data.settingData.checked26 = $event)
  5168. }, null, 8, ["modelValue"]),
  5169. vue.createVNode(_component_MenuAutoDark, {
  5170. sort: 26,
  5171. modelValue: $data.settingData.checked27,
  5172. "onUpdate:modelValue": _cache[27] || (_cache[27] = ($event) => $data.settingData.checked27 = $event)
  5173. }, null, 8, ["modelValue"]),
  5174. vue.createVNode(_component_MenuHiddenPlaceholder, {
  5175. sort: 27,
  5176. modelValue: $data.settingData.checked28,
  5177. "onUpdate:modelValue": _cache[28] || (_cache[28] = ($event) => $data.settingData.checked28 = $event)
  5178. }, null, 8, ["modelValue"]),
  5179. vue.createVNode(_component_MenuDisableReplaceState, {
  5180. sort: 28,
  5181. modelValue: $data.settingData.checked29,
  5182. "onUpdate:modelValue": _cache[29] || (_cache[29] = ($event) => $data.settingData.checked29 = $event)
  5183. }, null, 8, ["modelValue"]),
  5184. vue.createVNode(_component_MenuRemovePostAvatar, {
  5185. sort: 29,
  5186. modelValue: $data.settingData.removePostavatarData,
  5187. "onUpdate:modelValue": _cache[30] || (_cache[30] = ($event) => $data.settingData.removePostavatarData = $event)
  5188. }, null, 8, ["modelValue"]),
  5189. vue.createVNode(_component_MenuHotRankingList, {
  5190. sort: 30,
  5191. modelValue: $data.settingData.checked33,
  5192. "onUpdate:modelValue": _cache[31] || (_cache[31] = ($event) => $data.settingData.checked33 = $event)
  5193. }, null, 8, ["modelValue"]),
  5194. vue.createVNode(_component_MenuBackToTop, {
  5195. sort: 31,
  5196. modelValue: $data.settingData.checked34,
  5197. "onUpdate:modelValue": _cache[32] || (_cache[32] = ($event) => $data.settingData.checked34 = $event)
  5198. }, null, 8, ["modelValue"]),
  5199. vue.createVNode(_component_MenuQuickLikeTopic, {
  5200. sort: 32,
  5201. modelValue: $data.settingData.checked35,
  5202. "onUpdate:modelValue": _cache[33] || (_cache[33] = ($event) => $data.settingData.checked35 = $event)
  5203. }, null, 8, ["modelValue"]),
  5204. vue.createVNode(_component_MenuHideNewBluedot, {
  5205. sort: 34,
  5206. modelValue: $data.settingData.checked37,
  5207. "onUpdate:modelValue": _cache[34] || (_cache[34] = ($event) => $data.settingData.checked37 = $event)
  5208. }, null, 8, ["modelValue"]),
  5209. vue.createVNode(_component_MenuGifToPng, {
  5210. sort: 35,
  5211. modelValue: $data.settingData.checked38,
  5212. "onUpdate:modelValue": _cache[35] || (_cache[35] = ($event) => $data.settingData.checked38 = $event)
  5213. }, null, 8, ["modelValue"]),
  5214. vue.createVNode(_component_MenuHideHomeBanner, {
  5215. sort: 36,
  5216. modelValue: $data.settingData.checked39,
  5217. "onUpdate:modelValue": _cache[36] || (_cache[36] = ($event) => $data.settingData.checked39 = $event)
  5218. }, null, 8, ["modelValue"])
  5219. ]),
  5220. vue.createElementVNode("div", _hoisted_12, [
  5221. vue.createVNode(_component_MenuLogoUrl, {
  5222. sort: 1,
  5223. value: $data.settingData.logourl,
  5224. "onUpdate:value": _cache[37] || (_cache[37] = ($event) => $data.settingData.logourl = $event)
  5225. }, null, 8, ["value"]),
  5226. vue.createVNode(_component_MenuCreatereply, {
  5227. sort: 2,
  5228. value: $data.settingData.QuickReply,
  5229. "onUpdate:value": _cache[38] || (_cache[38] = ($event) => $data.settingData.QuickReply = $event)
  5230. }, null, 8, ["value"]),
  5231. vue.createVNode(_component_MenuBlockKeyword, {
  5232. sort: 3,
  5233. value: $data.settingData.blockkeywrod,
  5234. "onUpdate:value": _cache[39] || (_cache[39] = ($event) => $data.settingData.blockkeywrod = $event)
  5235. }, null, 8, ["value"]),
  5236. vue.createVNode(_component_MenuBlockuserlist, {
  5237. sort: 4,
  5238. value: $data.settingData.blockList,
  5239. "onUpdate:value": _cache[40] || (_cache[40] = ($event) => $data.settingData.blockList = $event)
  5240. }, null, 8, ["value"]),
  5241. vue.createVNode(_component_MenuShieldPosts, {
  5242. sort: 5,
  5243. value: $data.settingData.checked21,
  5244. "onUpdate:value": _cache[41] || (_cache[41] = ($event) => $data.settingData.checked21 = $event)
  5245. }, null, 8, ["value"]),
  5246. vue.createVNode(_component_MenuOtherCss, {
  5247. sort: 6,
  5248. value: $data.settingData.othercss,
  5249. "onUpdate:value": _cache[42] || (_cache[42] = ($event) => $data.settingData.othercss = $event)
  5250. }, null, 8, ["value"])
  5251. ]),
  5252. vue.createElementVNode("div", _hoisted_13, [
  5253. vue.createVNode(_component_UserTags, {
  5254. value: $data.settingData.usertags,
  5255. "onUpdate:value": _cache[43] || (_cache[43] = ($event) => $data.settingData.usertags = $event)
  5256. }, null, 8, ["value"])
  5257. ]),
  5258. vue.createElementVNode("div", _hoisted_14, [
  5259. vue.createVNode(_component_GPTconfig, {
  5260. value: $data.settingData.gptdata,
  5261. "onUpdate:value": _cache[44] || (_cache[44] = ($event) => $data.settingData.gptdata = $event)
  5262. }, null, 8, ["value"])
  5263. ]),
  5264. vue.createElementVNode("div", _hoisted_15, [
  5265. vue.createVNode(_component_Themes, {
  5266. modelValue: $data.settingData.themes,
  5267. "onUpdate:modelValue": _cache[45] || (_cache[45] = ($event) => $data.settingData.themes = $event)
  5268. }, null, 8, ["modelValue"])
  5269. ]),
  5270. vue.createElementVNode("div", _hoisted_16, [
  5271. vue.createVNode(_component_SyncBackup, {
  5272. value: $data.settingData.syncbackup,
  5273. "onUpdate:value": _cache[46] || (_cache[46] = ($event) => $data.settingData.syncbackup = $event)
  5274. }, null, 8, ["value"])
  5275. ])
  5276. ])
  5277. ]),
  5278. vue.createElementVNode("div", _hoisted_17, [
  5279. vue.createElementVNode("button", {
  5280. class: "save",
  5281. onClick: _cache[47] || (_cache[47] = (...args) => $options.save && $options.save(...args))
  5282. }, "保存"),
  5283. vue.createElementVNode("button", {
  5284. class: "saveload",
  5285. onClick: _cache[48] || (_cache[48] = (...args) => $options.saveload && $options.saveload(...args))
  5286. }, "保存并刷新"),
  5287. vue.createElementVNode("button", {
  5288. class: "floorlottery",
  5289. onClick: _cache[49] || (_cache[49] = (...args) => $options.openFloorlottery && $options.openFloorlottery(...args))
  5290. }, "楼层抽奖"),
  5291. vue.createElementVNode("button", {
  5292. style: { "margin-left": "8px" },
  5293. class: "detection",
  5294. onClick: _cache[50] || (_cache[50] = (...args) => $options.checkversion && $options.checkversion(...args))
  5295. }, " 检测新版本 ")
  5296. ])
  5297. ]),
  5298. vue.createVNode(_component_FloorLottery),
  5299. vue.createVNode(_component_UsageTip),
  5300. vue.createVNode(_component_ReplyTBEnjoy),
  5301. vue.createVNode(_component_Signature)
  5302. ]);
  5303. }
  5304. const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
  5305. const app = vue.createApp(App);
  5306. $$1("body").append('<div id="messageToast"></div>');
  5307. app.config.globalProperties.$messageToast = function(message) {
  5308. const messageElement = document.createElement("div");
  5309. messageElement.className = "messageToast-text";
  5310. messageElement.innerText = message;
  5311. document.getElementById("messageToast").appendChild(messageElement);
  5312. setTimeout(() => {
  5313. messageElement.remove();
  5314. }, 3e3);
  5315. };
  5316. app.mount(
  5317. (() => {
  5318. const appDiv = document.createElement("div");
  5319. document.body.append(appDiv);
  5320. return appDiv;
  5321. })()
  5322. );
  5323. })(Vue, pangu, marked, jQuery);