Skip to content

Commit

Permalink
Added dark scheme styles to state word in notify() ↞ [auto-sync from
Browse files Browse the repository at this point in the history
  • Loading branch information
kudo-sync-bot committed Jan 29, 2025
1 parent e90422b commit 3a059f5
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions chatgpt/duckduckgpt/duckduckgpt.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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])
}
}
Expand Down

0 comments on commit 3a059f5

Please sign in to comment.