Skip to content

Commit 5fad5d3

Browse files
committed
1 parent 53c2011 commit 5fad5d3

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

chatgpt/chatgpt-auto-talk/chatgpt-auto-talk.user.js

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@
225225
// @description:zu Dlala izimpendulo ze-ChatGPT ngokuzenzakalela
226226
// @author Adam Lui
227227
// @namespace https://github.com/adamlui
228-
// @version 2025.1.29.1
228+
// @version 2025.1.29.2
229229
// @license MIT
230230
// @icon https://assets.chatgptautotalk.com/images/icons/openai/black/icon48.png?v=9f1ed3c
231231
// @icon64 https://assets.chatgptautotalk.com/images/icons/openai/black/icon64.png?v=9f1ed3c
@@ -291,7 +291,7 @@
291291
support: 'https://support.chatgptautotalk.com',
292292
update: 'https://gm.chatgptautotalk.com'
293293
},
294-
latestResourceCommitHash: 'ded5e95' // for cached messages.json + navicon in toggles.sidebar.insert()
294+
latestResourceCommitHash: 'f260579' // for cached messages.json + navicon in toggles.sidebar.insert()
295295
}
296296
app.urls.resourceHost = app.urls.gitHub.replace('github.com', 'cdn.jsdelivr.net/gh')
297297
+ `@${app.latestResourceCommitHash}`
@@ -774,7 +774,7 @@
774774
}
775775

776776
// Update color/state
777-
this.updateAesthetic() ; this.updateState() // to opposite init state for animation on 1st load
777+
this.updateNavicon() ; this.updateState() // to opposite init state for animation on 1st load
778778

779779
// Add hover/click listeners
780780
this.div.onmouseover = this.div.onmouseout = event => // trigger OpenAI hover overlay
@@ -853,12 +853,13 @@
853853
sidebar.insertBefore(this.div, sidebar.children[1]) ; this.status = 'inserted'
854854
},
855855

856-
updateAesthetic() { // to match UI scheme
856+
updateNavicon() { // to match UI scheme
857857
const isDarkScheme = env.ui.scheme == 'dark'
858858
this.div.classList.add(isDarkScheme ? 'dark' : 'light')
859859
this.div.classList.remove(isDarkScheme ? 'light' : 'dark')
860-
this.navicon.src = `${app.urls.resourceHost }/assets/images/icons/speaker/${
861-
env.ui.scheme == 'dark' ? 'white' : 'black' }-icon.svg`
860+
this.navicon.src = `${app.urls.resourceHost }/assets/images/icons/soundwave`
861+
+ `/${ config.autoTalkDisabled ? '' : 'tall-thick' }`
862+
+ `/${ env.ui.scheme == 'dark' ? 'white' : 'black' }.svg`
862863
},
863864

864865
updateState() {
@@ -867,6 +868,7 @@
867868
this.toggleInput.checked = !config.autoTalkDisabled
868869
this.toggleLabel.innerText = `${app.msgs.mode_autoTalk} `
869870
+ app.msgs[`state_${ this.toggleInput.checked ? 'enabled' : 'disabled' }`]
871+
this.updateNavicon()
870872
setTimeout(() => {
871873
this.switchSpan.className = this.toggleInput.checked ? 'enabled' : 'disabled'
872874
this.knobSpan.style.transform = `translateX(${ this.toggleInput.checked ? 13 : 0 }px)`
@@ -916,7 +918,7 @@
916918
function handleSchemePrefChange() {
917919
const displayedScheme = getScheme()
918920
if (env.ui.scheme != displayedScheme) {
919-
env.ui.scheme = displayedScheme ; toggles.sidebar.updateAesthetic() ; modals.stylize() }
921+
env.ui.scheme = displayedScheme ; toggles.sidebar.updateNavicon() ; modals.stylize() }
920922
}
921923

922924
// Disable distracting SIDEBAR CLICK-ZOOM effect

0 commit comments

Comments
 (0)