Skip to content

Commit

Permalink
chore: 0.3.25 编辑器支持手动中英文混排优化
Browse files Browse the repository at this point in the history
  • Loading branch information
dlzmoe committed Sep 5, 2024
1 parent 854cbb8 commit d8c2d52
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 8 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
- 修复:同步配置 bug
- 优化;编辑器支持手动中英文混排优化
14 changes: 11 additions & 3 deletions dist/linuxdo-scripts.user.js

Large diffs are not rendered by default.

14 changes: 11 additions & 3 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.24",
"version": "0.3.25",
"author": "dlzmoe",
"description": "An enhanced script for the linux.do forum",
"type": "module",
Expand Down
9 changes: 9 additions & 0 deletions src/assets/app.less
Original file line number Diff line number Diff line change
Expand Up @@ -688,6 +688,15 @@ body.body-preview #main-outlet-wrapper {
}
}

.pangutext {
cursor: pointer;
margin-left: 20px;

&:hover {
color: #279a36;
}
}

// dark theme
.dark-theme {
#linuxdoscripts .menu-nav li.act {
Expand Down
9 changes: 9 additions & 0 deletions src/components/BasicSettings/MenuPangu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,15 @@ export default {
document.addEventListener("DOMContentLoaded", () => {
pangu.autoSpacingPage();
});
if ($(".pangutext").length < 1) {
$(".save-or-cancel .cancel").before(`<span class="pangutext">混排优化</span>`);
$(".pangutext").click(function () {
const editorstr = $(".d-editor-input").val();
const text = pangu.spacing(editorstr);
$(".d-editor-input").val(text);
});
}
}, 1000);
}
},
Expand Down
4 changes: 4 additions & 0 deletions version-log.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.3.25

- 优化;编辑器支持手动中英文混排优化

## 0.3.24

- 修复:同步配置 bug
Expand Down

0 comments on commit d8c2d52

Please sign in to comment.