Skip to content

Commit

Permalink
Shortened controlType to ctrlType, added ctrlStatus check befor…
Browse files Browse the repository at this point in the history
  • Loading branch information
kudo-sync-bot committed Feb 21, 2025
1 parent d65a51c commit 07d2f57
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions greasemonkey/autoclear-chatgpt-history.user.js
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.2.21.1
// @version 2025.2.21.2
// @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 @@ -419,14 +419,15 @@

// Add toggles
Object.keys(settings.controls).forEach(key => {
const controlType = settings.controls[key].type
const ctrlType = settings.controls[key].type
const ctrlStatus = settings.controls[key].status
const menuLabel = `${ settings.controls[key].symbol || this.state.symbols[+settingIsEnabled(key)] } `
+ settings.controls[key].label
+ ( controlType == 'toggle' ? this.state.separator
+ this.state.words[+settingIsEnabled(key)]
: `— ${settings.controls[key].status}` )
+ ( ctrlType == 'toggle' ? this.state.separator
+ this.state.words[+settingIsEnabled(key)]
: ctrlStatus ? `— ${ctrlStatus}` : '' )
this.ids.push(GM_registerMenuCommand(menuLabel, () => {
if (controlType == 'toggle') {
if (ctrlType == 'toggle') {
settings.save(key, !config[key]) ; syncConfigToUI({ updatedKey: key })
notify(`${settings.controls[key].label}: ${this.state.words[+settingIsEnabled(key)]}`)
} else // Clear Now action
Expand Down

0 comments on commit 07d2f57

Please sign in to comment.