linuxdo 增强插件

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

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

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