From 52071334a8e0bf64ebc5c159c22ac1e483ce8543 Mon Sep 17 00:00:00 2001 From: onesome Date: Sun, 16 Oct 2022 23:10:01 -0500 Subject: [PATCH 01/10] Remove tooltip on target remove --- static/koboldai.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/static/koboldai.js b/static/koboldai.js index 144aed7e..694abe2a 100644 --- a/static/koboldai.js +++ b/static/koboldai.js @@ -5125,11 +5125,11 @@ let load_substitutions; /* -- Tooltips -- */ function initalizeTooltips() { const tooltip = $e("span", document.body, {id: "tooltip-text", "style.display": "none"}); - let tooltipActive = false; + let tooltipTarget = null; - function alterTooltipState(enabled, specialClass=null) { - tooltipActive = enabled; - tooltip.style.display = enabled ? "block" : "none"; + function alterTooltipState(target, specialClass=null) { + tooltipTarget = target; + tooltip.style.display = target ? "block" : "none"; tooltip.className = specialClass || ""; } @@ -5144,11 +5144,11 @@ function initalizeTooltips() { // Kinda lame if (this.classList.contains("context-token")) specialClass = "tooltip-context-token"; - alterTooltipState(true, specialClass); + alterTooltipState(el, specialClass); }); el.addEventListener("mouseleave", function(event) { - alterTooltipState(false); + alterTooltipState(null); }); } @@ -5156,7 +5156,7 @@ function initalizeTooltips() { const yOffset = 15; document.addEventListener("mousemove", function(event) { - if (!tooltipActive) return; + if (!tooltipTarget) return; let [x, y] = [event.x, event.y]; @@ -5193,6 +5193,9 @@ function initalizeTooltips() { registerElement(record.target); continue; } + + // If we remove the tooltip target, stop showing the tooltip. Maybe a little ineffecient. + if (!document.body.contains(tooltipTarget)) alterTooltipState(null); for (const node of record.addedNodes) { if (node.nodeType !== 1) continue; From 310b8caef43e6d292d13bf76265b01cc679ad3f8 Mon Sep 17 00:00:00 2001 From: LightSaveUs <108632621+LightSaveUs@users.noreply.github.com> Date: Tue, 18 Oct 2022 02:49:41 +0300 Subject: [PATCH 02/10] Update Monochrome.css --- themes/Monochrome.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/themes/Monochrome.css b/themes/Monochrome.css index fe17da6b..1ce6eca9 100644 --- a/themes/Monochrome.css +++ b/themes/Monochrome.css @@ -1,7 +1,7 @@ /* Name: Monochrome Author: LightSaveUs - Version: 0.7 + Version: 0.7.1 Description: A theme inspired by the NovelAI interface. */ @@ -108,7 +108,7 @@ /*World Info*/ --wi_card_border_color: #334552; - --wi_card_border_color_to_ai: #334552; + --wi_card_border_color_to_ai: #eedcb880; --wi_card_bg_color: #223040; --wi_card_text_color: #e0e0e0; From d1aabd15fce426795b77fd7d96423c604bff785d Mon Sep 17 00:00:00 2001 From: LightSaveUs <108632621+LightSaveUs@users.noreply.github.com> Date: Tue, 18 Oct 2022 02:50:13 +0300 Subject: [PATCH 03/10] Update Darkness.css --- themes/Darkness.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/Darkness.css b/themes/Darkness.css index 6b84ba0a..527f57b2 100644 --- a/themes/Darkness.css +++ b/themes/Darkness.css @@ -108,7 +108,7 @@ /*World Info*/ --wi_card_border_color: #333333; - --wi_card_border_color_to_ai: #333333; + --wi_card_border_color_to_ai: #1e6d6aa1; --wi_card_bg_color: #242424; --wi_card_text_color: #e0e0e0; From 0379e2219a2f0804927b89df467f654e73ec4157 Mon Sep 17 00:00:00 2001 From: LightSaveUs <108632621+LightSaveUs@users.noreply.github.com> Date: Tue, 18 Oct 2022 02:50:39 +0300 Subject: [PATCH 04/10] Update Unicorn.css --- themes/Unicorn.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/Unicorn.css b/themes/Unicorn.css index 80da55b4..1b2cb2b6 100644 --- a/themes/Unicorn.css +++ b/themes/Unicorn.css @@ -113,7 +113,7 @@ /*World Info*/ --wi_card_border_color: #acacac; - --wi_card_border_color_to_ai: #acacac; + --wi_card_border_color_to_ai: #e2677180; --wi_card_bg_color: #ebebeb; --wi_card_text_color: #5c5c5c; From 3ab0583eb6d38e01c5fa91a137c99f9cfb6a49ff Mon Sep 17 00:00:00 2001 From: LightSaveUs <108632621+LightSaveUs@users.noreply.github.com> Date: Tue, 18 Oct 2022 02:51:19 +0300 Subject: [PATCH 05/10] Update Nostalgia.css --- themes/Nostalgia.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/Nostalgia.css b/themes/Nostalgia.css index a37fd328..a214432e 100644 --- a/themes/Nostalgia.css +++ b/themes/Nostalgia.css @@ -108,7 +108,7 @@ /*World Info*/ --wi_card_border_color: #1e1e1e; - --wi_card_border_color_to_ai: #1e1e1e00; + --wi_card_border_color_to_ai: #3bf72380; --wi_card_bg_color: #1e1e1e; --wi_card_text_color: #ffffff; From a353a58f7fdafc545b0c416ec30627ae810ec7fa Mon Sep 17 00:00:00 2001 From: LightSaveUs <108632621+LightSaveUs@users.noreply.github.com> Date: Tue, 18 Oct 2022 02:51:52 +0300 Subject: [PATCH 06/10] Update Darkness.css --- themes/Darkness.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/Darkness.css b/themes/Darkness.css index 527f57b2..8b1eb52b 100644 --- a/themes/Darkness.css +++ b/themes/Darkness.css @@ -1,7 +1,7 @@ /* Name: Darkness Author: LightSaveUs - Version: 0.4 + Version: 0.4.1 Description: A theme inspired by the AI Dungeon interface. */ From b586ebcb6ae088281efef5dd61154657b10fa0d9 Mon Sep 17 00:00:00 2001 From: LightSaveUs <108632621+LightSaveUs@users.noreply.github.com> Date: Tue, 18 Oct 2022 02:52:05 +0300 Subject: [PATCH 07/10] Update Unicorn.css --- themes/Unicorn.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/Unicorn.css b/themes/Unicorn.css index 1b2cb2b6..58470731 100644 --- a/themes/Unicorn.css +++ b/themes/Unicorn.css @@ -1,7 +1,7 @@ /* Name: Unicorn Author: LightSaveUs - Version: 0.4 + Version: 0.4.1 Description: A theme inspired by the DreamilyAI interface. */ From a958c3c2dd3ef378501cc28bf58e0b272121e39a Mon Sep 17 00:00:00 2001 From: LightSaveUs <108632621+LightSaveUs@users.noreply.github.com> Date: Tue, 18 Oct 2022 02:52:23 +0300 Subject: [PATCH 08/10] Update Nostalgia.css --- themes/Nostalgia.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/Nostalgia.css b/themes/Nostalgia.css index a214432e..bac657cd 100644 --- a/themes/Nostalgia.css +++ b/themes/Nostalgia.css @@ -1,7 +1,7 @@ /* Name: Nostalgia Author: LightSaveUs - Version: 0.3 + Version: 0.3.1 Description: A theme inspired by the old KoboldAI interface. */ From 3a73d3277f2af02fe8964bf267aec433e7b131d7 Mon Sep 17 00:00:00 2001 From: LightSaveUs <108632621+LightSaveUs@users.noreply.github.com> Date: Tue, 18 Oct 2022 03:30:11 +0300 Subject: [PATCH 09/10] Update hide-max-length.css --- themes/tweaks/hide-max-length.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/themes/tweaks/hide-max-length.css b/themes/tweaks/hide-max-length.css index 248773ce..31747d42 100644 --- a/themes/tweaks/hide-max-length.css +++ b/themes/tweaks/hide-max-length.css @@ -3,3 +3,7 @@ color: inherit; font-weight: inherit; } + +.world_info_card.used_in_game { + border: none; +} From 236712a5352aa82b88110b18021ddd22b8dbd92a Mon Sep 17 00:00:00 2001 From: LightSaveUs <108632621+LightSaveUs@users.noreply.github.com> Date: Tue, 18 Oct 2022 03:34:52 +0300 Subject: [PATCH 10/10] Update hide-max-length.css --- themes/tweaks/hide-max-length.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/tweaks/hide-max-length.css b/themes/tweaks/hide-max-length.css index 31747d42..43af183e 100644 --- a/themes/tweaks/hide-max-length.css +++ b/themes/tweaks/hide-max-length.css @@ -5,5 +5,5 @@ } .world_info_card.used_in_game { - border: none; + border: 2px outset var(--wi_card_border_color); }