|
3 | 3 | // @description Add AI chat & product/category summaries to Amazon shopping, powered by the latest LLMs like GPT-4o! |
4 | 4 | // @author KudoAI |
5 | 5 | // @namespace https://kudoai.com |
6 | | -// @version 2025.9.14 |
| 6 | +// @version 2025.9.15 |
7 | 7 | // @license MIT |
8 | 8 | // @icon https://amazongpt.kudoai.com/assets/images/icons/app/black-gold-teal/icon48.png?v=8e8ed1c |
9 | 9 | // @icon64 https://amazongpt.kudoai.com/assets/images/icons/app/black-gold-teal/icon64.png?v=8e8ed1c |
|
1547 | 1547 | }, |
1548 | 1548 |
|
1549 | 1549 | replyLang() { // requires <app|config|env|log|modals|settings> |
1550 | | - while (true) { |
1551 | | - let replyLang = prompt(`${app.msgs.prompt_updateReplyLang}:`, config.replyLang) |
1552 | | - if (replyLang == null) break // user cancelled so do nothing |
1553 | | - else if (!/\d/.test(replyLang)) { |
1554 | | - replyLang = ( // auto-case for menu/alert aesthetics |
1555 | | - replyLang.length < 4 || replyLang.includes('-') ? replyLang.toUpperCase() |
1556 | | - : log.toTitleCase(replyLang) ) |
1557 | | - settings.save('replyLang', replyLang || env.browser.language) |
1558 | | - modals.alert(`${app.msgs.alert_langUpdated}!`, // title |
1559 | | - `${app.name} ${ // msg |
1560 | | - app.msgs.alert_willReplyIn} ${ replyLang || app.msgs.alert_yourSysLang }.`, |
1561 | | - '', '', 375) // modal width |
1562 | | - if (modals.settings.get()) // update settings menu status label |
1563 | | - document.querySelector('#replyLang-settings-entry span').textContent = replyLang |
1564 | | - break |
1565 | | - } |
| 1550 | + let replyLang = prompt(`${app.msgs.prompt_updateReplyLang}:`, config.replyLang) |
| 1551 | + if (replyLang == null) return // user cancelled so do nothing |
| 1552 | + else if (!/\d/.test(replyLang)) { |
| 1553 | + replyLang = ( // auto-case for menu/alert aesthetics |
| 1554 | + replyLang.length < 4 || replyLang.includes('-') ? replyLang.toUpperCase() |
| 1555 | + : log.toTitleCase(replyLang) ) |
| 1556 | + settings.save('replyLang', replyLang || env.browser.language) |
| 1557 | + modals.alert(`${app.msgs.alert_langUpdated}!`, // title |
| 1558 | + `${app.name} ${ // msg |
| 1559 | + app.msgs.alert_willReplyIn} ${ replyLang || app.msgs.alert_yourSysLang }.`, |
| 1560 | + '', '', 375) // modal width |
| 1561 | + if (modals.settings.get()) // update settings menu status label |
| 1562 | + document.querySelector('#replyLang-settings-entry span').textContent = replyLang |
1566 | 1563 | } |
1567 | 1564 | }, |
1568 | 1565 |
|
|
0 commit comments