Skip to content

Commit a1876e2

Browse files
committed
Changed Settings toggles to only init opposite enabled state + unstaggered animations on modal open ↞ [auto-sync from https://github.com/adamlui/ai-web-extensions/tree/main/googlegpt]
1 parent 2b90059 commit a1876e2

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

chatgpt/googlegpt/googlegpt.user.js

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@
149149
// @description:zu Yengeza izimpendulo ze-AI ku-Google Search (inikwa amandla yi-Google Gemma + GPT-4o!)
150150
// @author KudoAI
151151
// @namespace https://kudoai.com
152-
// @version 2025.1.30.3
152+
// @version 2025.1.30.4
153153
// @license MIT
154154
// @icon https://assets.googlegpt.io/images/icons/googlegpt/black/icon48.png?v=59409b2
155155
// @icon64 https://assets.googlegpt.io/images/icons/googlegpt/black/icon64.png?v=59409b2
@@ -1476,19 +1476,16 @@
14761476
const switchSpan = document.createElement('span')
14771477
Object.assign(switchSpan.style, {
14781478
position: 'relative', left: '-1px', bottom:'-5.5px', float: 'right',
1479-
backgroundColor: settingToggle.checked ? '#ccc' : '#AD68FF', // init opposite final color
1480-
width: '26px', height: '13px', borderRadius: '28px',
1479+
backgroundColor: '#ccc', width: '26px', height: '13px', borderRadius: '28px',
14811480
transition: '0.4s', '-webkit-transition': '0.4s', '-moz-transition': '0.4s',
14821481
'-o-transition': '0.4s', '-ms-transition': '0.4s'
14831482
})
14841483

14851484
// Create/stylize knob
14861485
const knobSpan = document.createElement('span')
14871486
Object.assign(knobSpan.style, {
1488-
position: 'absolute', left: '1px', bottom: '1px', backgroundColor: 'white',
1489-
width: '11px', height: '11px', content: '""', borderRadius: '28px',
1490-
transform: settingToggle.checked ? // init opposite final pos
1491-
'translateX(0)' : 'translateX(14px) translateY(0)',
1487+
position: 'absolute', left: '1px', bottom: '1px', backgroundColor: 'white', content: '""',
1488+
width: '11px', height: '11px', borderRadius: '28px', transform: 'translateX(0)',
14921489
transition: '0.2s', '-webkit-transition': '0.2s', '-moz-transition': '0.2s',
14931490
'-o-transition': '0.2s', '-ms-transition': '0.2s'
14941491
})
@@ -1497,7 +1494,7 @@
14971494
switchSpan.append(knobSpan) ; settingItem.append(settingToggle, switchSpan)
14981495

14991496
// Update visual state w/ animation
1500-
setTimeout(() => modals.settings.toggle.updateStyles(settingToggle), idx *25 -25)
1497+
setTimeout(() => modals.settings.toggle.updateStyles(settingToggle), +155)
15011498

15021499
// Add click listener
15031500
settingItem.onclick = () => {

0 commit comments

Comments
 (0)