From 3a059f5c3c7c91b8d746556233eecf001e861935 Mon Sep 17 00:00:00 2001 From: kudo-sync-bot Date: Wed, 29 Jan 2025 08:56:19 -0800 Subject: [PATCH] =?UTF-8?q?Added=20dark=20scheme=20styles=20to=20state=20w?= =?UTF-8?q?ord=20in=20`notify()`=20=E2=86=9E=20[auto-sync=20from=20https:/?= =?UTF-8?q?/github.com/adamlui/ai-web-extensions/tree/main/duckduckgpt]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- chatgpt/duckduckgpt/duckduckgpt.user.js | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/chatgpt/duckduckgpt/duckduckgpt.user.js b/chatgpt/duckduckgpt/duckduckgpt.user.js index df24b03057..324dfa7184 100644 --- a/chatgpt/duckduckgpt/duckduckgpt.user.js +++ b/chatgpt/duckduckgpt/duckduckgpt.user.js @@ -148,7 +148,7 @@ // @description:zu Yengeza izimpendulo ze-AI ku-DuckDuckGo (inikwa amandla yi-GPT-4o!) // @author KudoAI // @namespace https://kudoai.com -// @version 2025.1.29.12 +// @version 2025.1.29.13 // @license MIT // @icon https://assets.ddgpt.com/images/icons/duckduckgpt/icon48.png?v=06af076 // @icon64 https://assets.ddgpt.com/images/icons/duckduckgpt/icon64.png?v=06af076 @@ -720,10 +720,19 @@ // Append styled state word if (foundState) { + const stateStyles = { + on: { + light: 'color: #5cef48 ; text-shadow: rgba(255,250,169,0.38) 2px 1px 5px', + dark: 'color: #5cef48 ; text-shadow: rgb(55, 255, 0) 3px 0 10px' + }, + off: { + light: 'color: #ef4848 ; text-shadow: rgba(255,169,225,0.44) 2px 1px 5px', + dark: 'color: #ef4848 ; text-shadow: rgba(255, 116, 116, 0.87) 3px 0 9px' + } + } const styledStateSpan = document.createElement('span') - styledStateSpan.style.cssText = `font-weight: bold ; color: ${ - foundState == menu.state.words[0] ? '#ef4848 ; text-shadow: rgba(255,169,225,0.44) 2px 1px 5px' - : '#5cef48 ; text-shadow: rgba(255,250,169,0.38) 2px 1px 5px' }` + styledStateSpan.style.cssText = `font-weight: bold ; ${ + stateStyles[foundState == menu.state.words[0] ? 'off' : 'on'][env.ui.app.scheme] }` styledStateSpan.append(foundState) ; notif.insertBefore(styledStateSpan, notif.children[2]) } }