Skip to content

Commit

Permalink
Used template literals in notify() calls for consistency ↞ [auto-sy…
Browse files Browse the repository at this point in the history
…nc from `adamlui/chatgpt-apps`]
  • Loading branch information
adamlui authored and kudo-sync-bot committed Sep 24, 2024
1 parent cb151d5 commit e195845
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions greasemonkey/googlegpt.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@
// @description:zu Yengeza izimpendulo ze-AI ku-Google Search (inikwa amandla yi-Google Gemma + GPT-4o!)
// @author KudoAI
// @namespace https://kudoai.com
// @version 2024.9.24.1
// @version 2024.9.24.2
// @license MIT
// @icon https://media.googlegpt.io/images/icons/googlegpt/black/icon48.png?8652a6e
// @icon64 https://media.googlegpt.io/images/icons/googlegpt/black/icon64.png?8652a6e
Expand Down Expand Up @@ -1267,9 +1267,9 @@

// Show notification
notify(`${app.msgs.menuLabel_colorScheme}:`
+ ( scheme == 'light' ? app.msgs.scheme_light || 'Light'
: scheme == 'dark' ? app.msgs.scheme_dark || 'Dark'
: app.msgs.menuLabel_auto ).toUpperCase() )
+ ( scheme == 'light' ? app.msgs.scheme_light || 'Light'
: scheme == 'dark' ? app.msgs.scheme_dark || 'Dark'
: app.msgs.menuLabel_auto ).toUpperCase() )

// Append scheme icon
const notifs = document.querySelectorAll('.chatgpt-notif'),
Expand Down Expand Up @@ -2915,7 +2915,7 @@
}
if (prevState != config.anchored) {
menus.pin.topPos = menus.pin.rightPos = null
notify(( app.msgs.mode_anchor ) + ' ' + menu.state.words[+config.anchored])
notify(`${app.msgs.mode_anchor} ${menu.state.words[+config.anchored]}`)
log.debug(`Success! Anchor Mode toggled ${ config.anchored ? 'ON' : 'OFF' }`)
}
},
Expand Down Expand Up @@ -3024,7 +3024,7 @@
log.caller = 'toggle.proxyMode()'
log.debug(`Toggling Proxy Mode ${ config.proxyAPIenabled ? 'OFF' : 'ON' }...`)
settings.save('proxyAPIenabled', !config.proxyAPIenabled)
notify(( app.msgs.menuLabel_proxyAPImode ) + ' ' + menu.state.words[+config.proxyAPIenabled])
notify(`${app.msgs.menuLabel_proxyAPImode} ${menu.state.words[+config.proxyAPIenabled]}`)
menu.refresh()
if (modals.settings.get()) { // update visual states of Settings toggles
const proxyToggle = document.querySelector('[id*="proxy"][id*="menu-entry"] input'),
Expand All @@ -3051,7 +3051,7 @@
get.related(stripQueryAugments(msgChain)[msgChain.length - 1].content).then(queries => show.related(queries))
.catch(err => { log.error(err.message) ; api.tryNew(get.related) })
update.style.tweaks() // toggle <pre> max-height
notify(( app.msgs.menuLabel_relatedQueries ) + ' ' + menu.state.words[+!config.rqDisabled])
notify(`${app.msgs.menuLabel_relatedQueries} ${menu.state.words[+!config.rqDisabled]}`)
log.debug(`Success! config.rqDisabled = ${config.rqDisabled}`)
},

Expand All @@ -3073,8 +3073,8 @@
}
if (mode == 'sticky' && prevStickyState == config.stickySidebar)
return log.debug(`No change to ${log.toTitleCase(mode)} Sidebar`)
notify(( app.msgs[`menuLabel_${ mode }Sidebar`] || mode.charAt(0).toUpperCase() + mode.slice(1) + ' Sidebar' )
+ ' ' + menu.state.words[+config[configKeyName]])
notify(`${ app.msgs[`menuLabel_${ mode }Sidebar`] || mode.charAt(0).toUpperCase() + mode.slice(1) + ' Sidebar' } ${
menu.state.words[+config[configKeyName]]}`)
log.debug(`Success! ${log.toTitleCase(mode)} Sidebar toggled ${ toToggleOn ? 'ON' : 'OFF' }`)
},

Expand Down Expand Up @@ -3121,7 +3121,7 @@
} else { // functional toggle
log.debug(`Toggling Streaming Mode ${ config.streamingDisabled ? 'ON' : 'OFF' }`)
settings.save('streamingDisabled', !config.streamingDisabled)
notify(app.settings.streamingDisabled.label + ' ' + menu.state.words[+!config.streamingDisabled])
notify(`${app.settings.streamingDisabled.label} ${menu.state.words[+!config.streamingDisabled]}`)
log.debug(`Success! config.streamingDisabled = ${config.streamingDisabled}`)
}
},
Expand Down

0 comments on commit e195845

Please sign in to comment.