Skip to content

Commit

Permalink
Added dark scheme styles to state word in notify()
Browse files Browse the repository at this point in the history
  • Loading branch information
adamlui committed Jan 29, 2025
1 parent 1b23b58 commit 50cc1bc
Show file tree
Hide file tree
Showing 16 changed files with 207 additions and 69 deletions.
17 changes: 13 additions & 4 deletions amazongpt/greasemonkey/amazongpt.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// @description Adds the magic of AI to Amazon shopping
// @author KudoAI
// @namespace https://kudoai.com
// @version 2025.1.29.9
// @version 2025.1.29.10
// @license MIT
// @icon https://amazongpt.kudoai.com/assets/images/icons/amazongpt/black-gold-teal/icon48.png?v=0fddfc7
// @icon64 https://amazongpt.kudoai.com/assets/images/icons/amazongpt/black-gold-teal/icon64.png?v=0fddfc7
Expand Down Expand Up @@ -541,10 +541,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
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@
// @description:zu Ziba itshala lokucabanga okuzoshintshwa ngokuzenzakalelayo uma ukubuka chatgpt.com
// @author Adam Lui
// @namespace https://github.com/adamlui
// @version 2025.1.29
// @version 2025.1.29.1
// @license MIT
// @icon https://assets.autoclearchatgpt.com/images/icons/openai/black/icon48.png?v=f461c06
// @icon64 https://assets.autoclearchatgpt.com/images/icons/openai/black/icon64.png?v=f461c06
Expand Down Expand Up @@ -463,7 +463,6 @@
// Define FEEDBACK functions

function notify(msg, pos = '', notifDuration = '', shadow = '') {
if (config.notifDisabled && !msg.includes(app.msgs.menuLabel_modeNotifs)) return

// Strip state word to append colored one later
const foundState = menu.state.words.find(word => msg.includes(word))
Expand All @@ -475,10 +474,18 @@

// 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 = `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 = stateStyles[foundState == menu.state.words[0] ? 'off' : 'on'][env.ui.scheme]
styledStateSpan.append(foundState) ; notif.append(styledStateSpan)
}
}
Expand Down
17 changes: 13 additions & 4 deletions bravegpt/greasemonkey/bravegpt.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-Brave Search (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.bravegpt.com/images/icons/bravegpt/icon48.png?v=df624b0
// @icon64 https://assets.bravegpt.com/images/icons/bravegpt/icon64.png?v=df624b0
Expand Down Expand Up @@ -712,10 +712,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
17 changes: 13 additions & 4 deletions chatgpt-auto-continue/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 chatgpt-auto-continue/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 chatgpt-auto-continue/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
17 changes: 12 additions & 5 deletions chatgpt-auto-refresh/greasemonkey/chatgpt-auto-refresh.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@
// @description:zu *NGOKUPHEPHA* susa ukusetha kabusha ingxoxo yemizuzu eyi-10 + amaphutha enethiwekhi ahlala njalo + Ukuhlolwa kwe-Cloudflare ku-ChatGPT.
// @author Adam Lui
// @namespace https://github.com/adamlui
// @version 2025.1.29.1
// @version 2025.1.29.2
// @license MIT
// @icon https://assets.chatgptautorefresh.com/images/icons/openai/black/icon48.png?v=f11a0a8
// @icon64 https://assets.chatgptautorefresh.com/images/icons/openai/black/icon64.png?v=f11a0a8
Expand Down Expand Up @@ -497,7 +497,6 @@
// Define FEEDBACK functions

function notify(msg, pos = '', notifDuration = '', shadow = '') {
if (config.notifDisabled && !msg.includes(app.msgs.menuLabel_modeNotifs)) return

// Strip state word to append colored one later
const foundState = menu.state.words.find(word => msg.includes(word))
Expand All @@ -509,10 +508,18 @@

// 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 = `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 = stateStyles[foundState == menu.state.words[0] ? 'off' : 'on'][env.ui.scheme]
styledStateSpan.append(foundState) ; notif.append(styledStateSpan)
}
}
Expand Down
16 changes: 12 additions & 4 deletions chatgpt-auto-talk/greasemonkey/chatgpt-auto-talk.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@
// @description:zu Dlala izimpendulo ze-ChatGPT ngokuzenzakalela
// @author Adam Lui
// @namespace https://github.com/adamlui
// @version 2025.1.29.2
// @version 2025.1.29.3
// @license MIT
// @icon https://assets.chatgptautotalk.com/images/icons/openai/black/icon48.png?v=9f1ed3c
// @icon64 https://assets.chatgptautotalk.com/images/icons/openai/black/icon64.png?v=9f1ed3c
Expand Down Expand Up @@ -460,10 +460,18 @@

// 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 = `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 = stateStyles[foundState == menu.state.words[0] ? 'off' : 'on'][env.ui.scheme]
styledStateSpan.append(foundState) ; notif.append(styledStateSpan)
}
}
Expand Down
18 changes: 14 additions & 4 deletions chatgpt-infinity/chromium/extension/content.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
// Define FUNCTIONS

function notify(msg, pos = '', notifDuration = '', shadow = '') {
if (config.notifDisabled && !msg.includes(chrome.i18n.getMessage('menuLabel_modeNotifs'))) return

// Strip state word to append colored one later
const foundState = [ chrome.i18n.getMessage('state_on').toUpperCase(),
Expand All @@ -61,10 +62,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: 14 additions & 4 deletions chatgpt-infinity/firefox/extension/content.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
// Define FUNCTIONS

function notify(msg, pos = '', notifDuration = '', shadow = '') {
if (config.notifDisabled && !msg.includes(chrome.i18n.getMessage('menuLabel_modeNotifs'))) return

// Strip state word to append colored one later
const foundState = [ chrome.i18n.getMessage('state_on').toUpperCase(),
Expand All @@ -64,10 +65,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 chatgpt-infinity/greasemonkey/chatgpt-infinity.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@
// @description:zh-TW 從無所不知的 ChatGPT 生成無窮無盡的答案 (用任何語言!)
// @author Adam Lui
// @namespace https://github.com/adamlui
// @version 2025.1.29.1
// @version 2025.1.29.2
// @license MIT
// @icon https://assets.chatgptinfinity.com/images/icons/infinity-symbol/circled/with-robot/icon48.png?v=69e434b
// @icon64 https://assets.chatgptinfinity.com/images/icons/infinity-symbol/circled/with-robot/icon64.png?v=69e434b
Expand Down Expand Up @@ -528,10 +528,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
17 changes: 13 additions & 4 deletions chatgpt-widescreen/chromium/extension/content.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,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
Loading

0 comments on commit 50cc1bc

Please sign in to comment.