|
148 | 148 | // @description:zu Yengeza izimpendulo ze-AI ku-DuckDuckGo (inikwa amandla yi-GPT-4o!)
|
149 | 149 | // @author KudoAI
|
150 | 150 | // @namespace https://kudoai.com
|
151 |
| -// @version 2025.1.30.3 |
| 151 | +// @version 2025.1.30.4 |
152 | 152 | // @license MIT
|
153 | 153 | // @icon https://assets.ddgpt.com/images/icons/duckduckgpt/icon48.png?v=06af076
|
154 | 154 | // @icon64 https://assets.ddgpt.com/images/icons/duckduckgpt/icon64.png?v=06af076
|
|
1334 | 1334 | const switchSpan = document.createElement('span')
|
1335 | 1335 | Object.assign(switchSpan.style, {
|
1336 | 1336 | position: 'relative', left: '-1px', bottom:'-5.5px', float: 'right',
|
1337 |
| - backgroundColor: settingToggle.checked ? '#ccc' : '#AD68FF', // init opposite final color |
1338 |
| - width: '26px', height: '13px', borderRadius: '28px', |
| 1337 | + backgroundColor: '#ccc', width: '26px', height: '13px', borderRadius: '28px', |
1339 | 1338 | transition: '0.4s', '-webkit-transition': '0.4s', '-moz-transition': '0.4s',
|
1340 | 1339 | '-o-transition': '0.4s', '-ms-transition': '0.4s'
|
1341 | 1340 | })
|
1342 | 1341 |
|
1343 | 1342 | // Create/stylize knob
|
1344 | 1343 | const knobSpan = document.createElement('span')
|
1345 | 1344 | Object.assign(knobSpan.style, {
|
1346 |
| - position: 'absolute', left: '1px', bottom: '1px', backgroundColor: 'white', |
1347 |
| - width: '11px', height: '11px', content: '""', borderRadius: '28px', |
1348 |
| - transform: settingToggle.checked ? // init opposite final pos |
1349 |
| - 'translateX(0)' : 'translateX(14px) translateY(0)', |
| 1345 | + position: 'absolute', left: '1px', bottom: '1px', backgroundColor: 'white', content: '""', |
| 1346 | + width: '11px', height: '11px', borderRadius: '28px', transform: 'translateX(0)', |
1350 | 1347 | transition: '0.2s', '-webkit-transition': '0.2s', '-moz-transition': '0.2s',
|
1351 | 1348 | '-o-transition': '0.2s', '-ms-transition': '0.2s'
|
1352 | 1349 | })
|
|
1355 | 1352 | switchSpan.append(knobSpan) ; settingItem.append(settingToggle, switchSpan)
|
1356 | 1353 |
|
1357 | 1354 | // Update visual state w/ animation
|
1358 |
| - setTimeout(() => modals.settings.toggle.updateStyles(settingToggle), idx *25 -25) |
| 1355 | + setTimeout(() => modals.settings.toggle.updateStyles(settingToggle), +155) |
1359 | 1356 |
|
1360 | 1357 | // Add click listener
|
1361 | 1358 | settingItem.onclick = () => {
|
|
0 commit comments