From 1c4df2bd856ac2c6b2cff69451455382fb14a2d7 Mon Sep 17 00:00:00 2001 From: kudo-sync-bot Date: Fri, 28 Feb 2025 09:53:27 -0800 Subject: [PATCH] =?UTF-8?q?Enhanced=20`settings.isEnabled()`=20to=20handle?= =?UTF-8?q?=20control=20labels,=20expanded=20inversion=20flags=20=E2=86=9E?= =?UTF-8?q?=20[auto-sync=20from=20https://github.com/adamlui/ai-web-extens?= =?UTF-8?q?ions/tree/main/chatgpt-auto-refresh]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- greasemonkey/chatgpt-auto-refresh.user.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/greasemonkey/chatgpt-auto-refresh.user.js b/greasemonkey/chatgpt-auto-refresh.user.js index 8ec7260..20817fb 100644 --- a/greasemonkey/chatgpt-auto-refresh.user.js +++ b/greasemonkey/chatgpt-auto-refresh.user.js @@ -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.2.28 +// @version 2025.2.28.1 // @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 @@ -401,7 +401,12 @@ label: app.msgs.menuLabel_refreshInt, helptip: app.msgs.helptip_refreshInt } }, - isEnabled(key) { return config[key] ^ /disabled/i.test(key) }, + isEnabled(key) { + const reInvertFlags = /disabled|hidden/i + return reInvertFlags.test(key) // flag in control key name + && !reInvertFlags.test(this.controls[key]?.label || '') // but not in label msg key name + ? !config[key] : config[key] // so invert since flag reps opposite state, else don't + }, load(...keys) { keys.flat().forEach(key => {