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 453a24f commit aa43097
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 13 deletions.
17 changes: 13 additions & 4 deletions chromium/extension/content.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,19 @@

// Append styled state word
if (foundState) {
const styledStateSpan = dom.create.elem('span')
styledStateSpan.style.cssText = `color: ${
foundState == 'OFF' ? '#ef4848 ; text-shadow: rgba(255,169,225,0.44) 2px 1px 5px'
: '#5cef48 ; text-shadow: rgba(255,250,169,0.38) 2px 1px 5px' }`
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 = stateStyles[
foundState == chrome.i18n.getMessage('state_off').toUpperCase() ? 'off' : 'on'][env.ui.scheme]
styledStateSpan.append(foundState) ; notif.append(styledStateSpan)
}
}
Expand Down
17 changes: 13 additions & 4 deletions firefox/extension/content.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,19 @@

// Append styled state word
if (foundState) {
const styledStateSpan = dom.create.elem('span')
styledStateSpan.style.cssText = `color: ${
foundState == 'OFF' ? '#ef4848 ; text-shadow: rgba(255,169,225,0.44) 2px 1px 5px'
: '#5cef48 ; text-shadow: rgba(255,250,169,0.38) 2px 1px 5px' }`
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 = stateStyles[
foundState == chrome.i18n.getMessage('state_off').toUpperCase() ? 'off' : 'on'][env.ui.scheme]
styledStateSpan.append(foundState) ; notif.append(styledStateSpan)
}
}
Expand Down
18 changes: 13 additions & 5 deletions greasemonkey/chatgpt-auto-continue.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@
// @description:zu ⚡ Terus menghasilkan imibuzo eminingi ye-ChatGPT ngokwesizulu
// @author Adam Lui
// @namespace https://github.com/adamlui
// @version 2025.1.29
// @version 2025.1.29.1
// @license MIT
// @icon https://assets.chatgptautocontinue.com/images/icons/continue-symbol/circled/with-robot/icon48.png?v=8b39fb4
// @icon64 https://assets.chatgptautocontinue.com/images/icons/continue-symbol/circled/with-robot/icon64.png?v=8b39fb4
Expand Down Expand Up @@ -443,10 +443,18 @@

// Append styled state word
if (foundState) {
const styledStateSpan = dom.create.elem('span')
styledStateSpan.style.cssText = `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' }`
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 = stateStyles[foundState == menu.state.words[0] ? 'off' : 'on'][env.ui.scheme]
styledStateSpan.append(foundState) ; notif.append(styledStateSpan)
}
}
Expand Down

0 comments on commit aa43097

Please sign in to comment.