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