diff --git a/static/koboldai.js b/static/koboldai.js index 7e9ba936..17844dd2 100644 --- a/static/koboldai.js +++ b/static/koboldai.js @@ -5187,11 +5187,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 || ""; } @@ -5206,11 +5206,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); }); } @@ -5218,7 +5218,7 @@ function initalizeTooltips() { const yOffset = 15; document.addEventListener("mousemove", function(event) { - if (!tooltipActive) return; + if (!tooltipTarget) return; let [x, y] = [event.x, event.y]; @@ -5255,6 +5255,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; diff --git a/themes/Darkness.css b/themes/Darkness.css index 6b84ba0a..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. */ @@ -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; 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; diff --git a/themes/Nostalgia.css b/themes/Nostalgia.css index a37fd328..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. */ @@ -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; diff --git a/themes/Unicorn.css b/themes/Unicorn.css index 80da55b4..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. */ @@ -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; diff --git a/themes/tweaks/hide-max-length.css b/themes/tweaks/hide-max-length.css index 248773ce..43af183e 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: 2px outset var(--wi_card_border_color); +}