From 539d6fea0022e223ee2904d001c61fe976f702ce Mon Sep 17 00:00:00 2001 From: Haoming Date: Fri, 27 Dec 2024 17:34:47 +0800 Subject: [PATCH] dan --- README.md | 2 +- README_ZH.md | 2 +- javascript/prompt_format.js | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 77c054e..9eccfb4 100644 --- a/README.md +++ b/README.md @@ -65,7 +65,7 @@ Sometimes, when you type too fast or copy prompts from all over the places, you Booru - [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/)

diff --git a/README_ZH.md b/README_ZH.md index 18a3f20..20476ec 100644 --- a/README_ZH.md +++ b/README_ZH.md @@ -65,7 +65,7 @@ Booru - [x] 自動清除多餘字詞 - - 文字結構基於 [gelbooru](https://gelbooru.com/) + - 目前支援 [gelbooru](https://gelbooru.com/) 及 [danbooru](https://safebooru.donmai.us/)

diff --git a/javascript/prompt_format.js b/javascript/prompt_format.js index 0e57cb7..564116e 100644 --- a/javascript/prompt_format.js +++ b/javascript/prompt_format.js @@ -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("(", "\\(");