From 2b90059b85216ab76f989e05af669ae012792384 Mon Sep 17 00:00:00 2001 From: kudo-sync-bot Date: Thu, 30 Jan 2025 06:02:17 -0800 Subject: [PATCH] =?UTF-8?q?Changed=20Settings=20toggles=20to=20only=20init?= =?UTF-8?q?=20opposite=20enabled=20state=20+=20unstaggered=20animations=20?= =?UTF-8?q?on=20modal=20open=20=E2=86=9E=20[auto-sync=20from=20https://git?= =?UTF-8?q?hub.com/adamlui/ai-web-extensions/tree/main/duckduckgpt]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- chatgpt/duckduckgpt/duckduckgpt.user.js | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/chatgpt/duckduckgpt/duckduckgpt.user.js b/chatgpt/duckduckgpt/duckduckgpt.user.js index 53ee870d63..77f70bf7c5 100644 --- a/chatgpt/duckduckgpt/duckduckgpt.user.js +++ b/chatgpt/duckduckgpt/duckduckgpt.user.js @@ -148,7 +148,7 @@ // @description:zu Yengeza izimpendulo ze-AI ku-DuckDuckGo (inikwa amandla yi-GPT-4o!) // @author KudoAI // @namespace https://kudoai.com -// @version 2025.1.30.3 +// @version 2025.1.30.4 // @license MIT // @icon https://assets.ddgpt.com/images/icons/duckduckgpt/icon48.png?v=06af076 // @icon64 https://assets.ddgpt.com/images/icons/duckduckgpt/icon64.png?v=06af076 @@ -1334,8 +1334,7 @@ const switchSpan = document.createElement('span') Object.assign(switchSpan.style, { position: 'relative', left: '-1px', bottom:'-5.5px', float: 'right', - backgroundColor: settingToggle.checked ? '#ccc' : '#AD68FF', // init opposite final color - width: '26px', height: '13px', borderRadius: '28px', + backgroundColor: '#ccc', width: '26px', height: '13px', borderRadius: '28px', transition: '0.4s', '-webkit-transition': '0.4s', '-moz-transition': '0.4s', '-o-transition': '0.4s', '-ms-transition': '0.4s' }) @@ -1343,10 +1342,8 @@ // Create/stylize knob const knobSpan = document.createElement('span') Object.assign(knobSpan.style, { - position: 'absolute', left: '1px', bottom: '1px', backgroundColor: 'white', - width: '11px', height: '11px', content: '""', borderRadius: '28px', - transform: settingToggle.checked ? // init opposite final pos - 'translateX(0)' : 'translateX(14px) translateY(0)', + position: 'absolute', left: '1px', bottom: '1px', backgroundColor: 'white', content: '""', + width: '11px', height: '11px', borderRadius: '28px', transform: 'translateX(0)', transition: '0.2s', '-webkit-transition': '0.2s', '-moz-transition': '0.2s', '-o-transition': '0.2s', '-ms-transition': '0.2s' }) @@ -1355,7 +1352,7 @@ switchSpan.append(knobSpan) ; settingItem.append(settingToggle, switchSpan) // Update visual state w/ animation - setTimeout(() => modals.settings.toggle.updateStyles(settingToggle), idx *25 -25) + setTimeout(() => modals.settings.toggle.updateStyles(settingToggle), +155) // Add click listener settingItem.onclick = () => {