Skip to content

Commit

Permalink
🐛 fix: 修复了部分错误
Browse files Browse the repository at this point in the history
  • Loading branch information
dlzmoe committed Sep 14, 2024
1 parent 3346988 commit b50d67d
Show file tree
Hide file tree
Showing 8 changed files with 204 additions and 153 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
- 新增:回复悬浮按钮
- 修复:回复按钮只有在帖子内才显示
- 修复:屏蔽关键词优化
159 changes: 86 additions & 73 deletions dist/linuxdo-scripts.user.js

Large diffs are not rendered by default.

159 changes: 86 additions & 73 deletions linuxdo-scripts.user.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "linuxdo-scripts",
"version": "0.3.35",
"version": "0.3.36",
"author": "dlzmoe",
"description": "An enhanced script for the linux.do forum",
"type": "module",
Expand Down
15 changes: 14 additions & 1 deletion src/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div class="linuxdoscripts-opacity"></div>
<div class="setting-btn">
<ReplyBtn v-show="showreplybtn" />
<!-- 显示 AI 对话网站 -->
<!-- 显示回复按钮 -->
<AIDialog v-show="showaidialog" />
<!-- 显示 AI 对话网站 -->
<LevelDiglog v-show="showlevelsearch" />
Expand Down Expand Up @@ -475,6 +475,11 @@ export default {
},
},
created() {
console.log(
`%c linuxdo 增强插件 %c 已开启 `,
"padding: 2px 1px; color: #fff; background: #606060;",
"padding: 2px 1px; color: #fff; background: #42c02e;"
);
setInterval(() => {
if ($(".linuxdoscripts-setting").length < 1) {
$(".sidebar-footer-actions").prepend(`
Expand All @@ -496,6 +501,14 @@ export default {
this.showlevelsearch = this.settingData.checked12;
this.showaidialog = this.settingData.checked18;
this.showreplybtn = this.settingData.checked25;
setInterval(() => {
if (window.location.href.includes("/topic/")) {
$(".replaybtn").show();
} else {
$(".replaybtn").hide();
}
}, 1000);
} else {
localStorage.setItem("linxudoscriptssetting", JSON.stringify(this.settingData));
}
Expand Down
9 changes: 7 additions & 2 deletions src/components/Button/ReplyBtn.vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
<template>
<div>
<div class="replaybtn">
<div
class="el-button"
style="font-size: 18px"
@click="replaybtn"
type="primary"
title="回复"
>
<svg class="fa d-icon d-icon-reply svg-icon svg-string" xmlns="http://www.w3.org/2000/svg"><use href="#reply"></use></svg>
<svg
class="fa d-icon d-icon-reply svg-icon svg-string"
xmlns="http://www.w3.org/2000/svg"
>
<use href="#reply"></use>
</svg>
</div>
</div>
</template>
Expand Down
5 changes: 3 additions & 2 deletions src/components/CustomText/MenuBlockKeyword.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export default {
// 检查话题标题
$(".topic-list .main-link .raw-topic-link>*")
.filter((index, element) => {
var text = $(element).html();
var text = $(element).text();
return self.list.some((item) => text.includes(item));
})
.parents("tr.topic-list-item")
Expand All @@ -49,7 +49,8 @@ export default {
// 检测评论回复
$(".topic-body .cooked")
.filter((index, element) => {
var text = $(element).html();
var text = $(element).text();
return self.list.some((item) => text.includes(item));
})
.parents(".topic-post")
Expand Down
5 changes: 5 additions & 0 deletions version-log.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 0.3.36

- 修复:回复按钮只有在帖子内才显示
- 修复:屏蔽关键词优化

## 0.3.35

- 新增:回复悬浮按钮
Expand Down

0 comments on commit b50d67d

Please sign in to comment.