linuxdo 增强插件

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

当前为 2024-09-13 提交的版本,查看 最新版本

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