Skip to content

Commit e9cffa0

Browse files
committed
Added key support to sync.configToUI()
1 parent abf716b commit e9cffa0

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

block-quora-poe/block-quora-poe.user.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
// @description:zh-TW 阻止 AI + Quora 的推廣/贊助答案
1414
// @author Adam Lui
1515
// @namespace https://github.com/adamlui
16-
// @version 2026.7.28.1
16+
// @version 2026.7.28.2
1717
// @license MIT
1818
// @icon https://cdn.jsdelivr.net/gh/adamlui/userscripts@f3e6bf0/assets/images/icons/sites/quora/icon64.png
1919
// @match *://*.quora.com/*
@@ -129,7 +129,7 @@
129129
: ctrl.type == 'slider' ? ': ' + config[key] + ctrl.labelSuffix || ''
130130
: ctrl.status ? ` — ${ctrl.status}` : '' }`
131131
return GM_registerMenuCommand(menuLabel, () => {
132-
settings.save(key, !config[key]) ; sync.configToUI({ updatedKey: key })
132+
settings.save(key, !config[key]) ; sync.configToUI({ key })
133133
feedback.notify(`${ctrl.label}: ${this.state.words[+settings.typeIsEnabled(key)]}`)
134134
}, env.scriptManager.supportsTooltips ? { title: ctrl.helptip || ' ' } : undefined )
135135
}
@@ -865,7 +865,7 @@
865865
}
866866
}
867867

868-
window.sync = { configToUI() { styles.update({ key: 'tweaks' }) ; gmToolbarMenu.refresh() }}
868+
window.sync = { configToUI({ key } = {}) { styles.update({ key: 'tweaks' }) ; gmToolbarMenu.refresh() }}
869869

870870
window.updateCheck = () => env.xhr({
871871
method: 'GET', url: `${app.urls.update.gm}?t=${Date.now()}`,

0 commit comments

Comments
 (0)