Haoming 2024-12-27 17:34:47 +08:00
parent f01838eb9b
commit 539d6fea00
3 changed files with 4 additions and 4 deletions

View File

@ -65,7 +65,7 @@ Sometimes, when you type too fast or copy prompts from all over the places, you
<summary><b>Booru</b></summary>
- [x] Automatically clean up unwanted texts
- Structure is based on [gelbooru](https://gelbooru.com/)
- Currently supports [gelbooru](https://gelbooru.com/) and [danbooru](https://safebooru.donmai.us/)
<p align="center"><img src="booru.png" width=512></p>

View File

@ -65,7 +65,7 @@
<summary><b>Booru</b></summary>
- [x] 自動清除多餘字詞
- 文字結構基於 [gelbooru](https://gelbooru.com/)
- 目前支援 [gelbooru](https://gelbooru.com/) 及 [danbooru](https://safebooru.donmai.us/)
<p align="center"><img src="booru.png" width=512></p>

View File

@ -221,8 +221,8 @@ onUiLoaded(() => {
let paste = (event.clipboardData || window.clipboardData).getData('text');
if (config.booru) {
paste = paste.replace(/\s\d+|\?\s+/g, ", ");
for (const excl of ["Artist", "Character", "Copyright", "Tag"])
paste = paste.replace(/\s[\d.]+[kM]?|\?\s+/g, ", ");
for (const excl of ["Artist", "Characters", "Character", "Copyright", "Tags", "Tag", "General"])
paste = paste.replace(excl, "");
paste = paste.replaceAll("(", "\\(");