|
148 | 148 | // @description:zu Yengeza izimpendulo ze-AI ku-Brave Search (inikwa amandla yi-GPT-4o!) |
149 | 149 | // @author KudoAI |
150 | 150 | // @namespace https://kudoai.com |
151 | | -// @version 2025.9.14 |
| 151 | +// @version 2025.9.15 |
152 | 152 | // @license MIT |
153 | 153 | // @icon https://assets.bravegpt.com/images/icons/app/icon48.png?v=e8ca7c2 |
154 | 154 | // @icon64 https://assets.bravegpt.com/images/icons/app/icon64.png?v=e8ca7c2 |
|
2233 | 2233 | }, |
2234 | 2234 |
|
2235 | 2235 | replyLang() { // requires <app|config|env|log|modals|settings> |
2236 | | - while (true) { |
2237 | | - let replyLang = prompt(`${app.msgs.prompt_updateReplyLang}:`, config.replyLang) |
2238 | | - if (replyLang == null) break // user cancelled so do nothing |
2239 | | - else if (!/\d/.test(replyLang)) { |
2240 | | - replyLang = ( // auto-case for menu/alert aesthetics |
2241 | | - replyLang.length < 4 || replyLang.includes('-') ? replyLang.toUpperCase() |
2242 | | - : log.toTitleCase(replyLang) ) |
2243 | | - settings.save('replyLang', replyLang || env.browser.language) |
2244 | | - modals.alert(`${app.msgs.alert_langUpdated}!`, // title |
2245 | | - `${app.name} ${ // msg |
2246 | | - app.msgs.alert_willReplyIn} ${ replyLang || app.msgs.alert_yourSysLang }.`, |
2247 | | - '', '', 447) // modal width |
2248 | | - if (modals.settings.get()) // update settings menu status label |
2249 | | - document.querySelector('#replyLang-settings-entry span').textContent = replyLang |
2250 | | - break |
2251 | | - } |
| 2236 | + let replyLang = prompt(`${app.msgs.prompt_updateReplyLang}:`, config.replyLang) |
| 2237 | + if (replyLang == null) return // user cancelled so do nothing |
| 2238 | + else if (!/\d/.test(replyLang)) { |
| 2239 | + replyLang = ( // auto-case for menu/alert aesthetics |
| 2240 | + replyLang.length < 4 || replyLang.includes('-') ? replyLang.toUpperCase() |
| 2241 | + : log.toTitleCase(replyLang) ) |
| 2242 | + settings.save('replyLang', replyLang || env.browser.language) |
| 2243 | + modals.alert(`${app.msgs.alert_langUpdated}!`, // title |
| 2244 | + `${app.name} ${ // msg |
| 2245 | + app.msgs.alert_willReplyIn} ${ replyLang || app.msgs.alert_yourSysLang }.`, |
| 2246 | + '', '', 447) // modal width |
| 2247 | + if (modals.settings.get()) // update settings menu status label |
| 2248 | + document.querySelector('#replyLang-settings-entry span').textContent = replyLang |
2252 | 2249 | } |
2253 | 2250 | }, |
2254 | 2251 |
|
|
0 commit comments