Skip to content

Commit bb82b3c

Browse files
committed
Condensed modals.replyLang()
1 parent 4ed7584 commit bb82b3c

File tree

4 files changed

+20
-24
lines changed

4 files changed

+20
-24
lines changed

amazongpt/greasemonkey/amazongpt.user.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// @description Add AI chat & product/category summaries to Amazon shopping, powered by the latest LLMs like GPT-4o!
44
// @author KudoAI
55
// @namespace https://kudoai.com
6-
// @version 2025.5.16.14
6+
// @version 2025.5.16.15
77
// @license MIT
88
// @icon https://amazongpt.kudoai.com/assets/images/icons/app/black-gold-teal/icon48.png?v=8e8ed1c
99
// @icon64 https://amazongpt.kudoai.com/assets/images/icons/app/black-gold-teal/icon64.png?v=8e8ed1c
@@ -2095,19 +2095,18 @@
20952095
document.addEventListener('keydown', modals.handlers.dismiss.key) ; modals.handlers.dismiss.key.added = true }
20962096
},
20972097

2098-
replyLang() {
2098+
replyLang() { // requires <app|config|env|log|modals|settings>
20992099
while (true) {
2100-
let replyLang = prompt(
2101-
( app.msgs.prompt_updateReplyLang ) + ':', config.replyLang)
2100+
let replyLang = prompt(`${app.msgs.prompt_updateReplyLang}:`, config.replyLang)
21022101
if (replyLang == null) break // user cancelled so do nothing
21032102
else if (!/\d/.test(replyLang)) {
21042103
replyLang = ( // auto-case for menu/alert aesthetics
21052104
replyLang.length < 4 || replyLang.includes('-') ? replyLang.toUpperCase()
21062105
: log.toTitleCase(replyLang) )
21072106
settings.save('replyLang', replyLang || env.browser.language)
21082107
modals.alert(`${app.msgs.alert_langUpdated}!`, // title
2109-
`${app.name} ${app.msgs.alert_willReplyIn} ` // msg
2110-
+ ( replyLang || app.msgs.alert_yourSysLang ) + '.',
2108+
`${app.name} ${ // msg
2109+
app.msgs.alert_willReplyIn} ${ replyLang || app.msgs.alert_yourSysLang }.`,
21112110
'', '', 375) // modal width
21122111
if (modals.settings.get()) // update settings menu status label
21132112
document.querySelector('#replyLang-settings-entry span').textContent = replyLang

bravegpt/greasemonkey/bravegpt.user.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@
148148
// @description:zu Yengeza izimpendulo ze-AI ku-Brave Search (inikwa amandla yi-GPT-4o!)
149149
// @author KudoAI
150150
// @namespace https://kudoai.com
151-
// @version 2025.5.16.15
151+
// @version 2025.5.16.16
152152
// @license MIT
153153
// @icon https://assets.bravegpt.com/images/icons/bravegpt/icon48.png?v=df624b0
154154
// @icon64 https://assets.bravegpt.com/images/icons/bravegpt/icon64.png?v=df624b0
@@ -2835,19 +2835,18 @@
28352835
}
28362836
},
28372837

2838-
replyLang() {
2838+
replyLang() { // requires <app|config|env|log|modals|settings>
28392839
while (true) {
2840-
let replyLang = prompt(
2841-
( app.msgs.prompt_updateReplyLang ) + ':', config.replyLang)
2840+
let replyLang = prompt(`${app.msgs.prompt_updateReplyLang}:`, config.replyLang)
28422841
if (replyLang == null) break // user cancelled so do nothing
28432842
else if (!/\d/.test(replyLang)) {
28442843
replyLang = ( // auto-case for menu/alert aesthetics
28452844
replyLang.length < 4 || replyLang.includes('-') ? replyLang.toUpperCase()
28462845
: log.toTitleCase(replyLang) )
28472846
settings.save('replyLang', replyLang || env.browser.language)
28482847
modals.alert(`${app.msgs.alert_langUpdated}!`, // title
2849-
`${app.name} ${app.msgs.alert_willReplyIn} ` // msg
2850-
+ ( replyLang || app.msgs.alert_yourSysLang ) + '.',
2848+
`${app.name} ${ // msg
2849+
app.msgs.alert_willReplyIn} ${ replyLang || app.msgs.alert_yourSysLang }.`,
28512850
'', '', 447) // modal width
28522851
if (modals.settings.get()) // update settings menu status label
28532852
document.querySelector('#replyLang-settings-entry span').textContent = replyLang

duckduckgpt/greasemonkey/duckduckgpt.user.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@
148148
// @description:zu Yengeza izimpendulo ze-AI ku-DuckDuckGo (inikwa amandla yi-GPT-4o!)
149149
// @author KudoAI
150150
// @namespace https://kudoai.com
151-
// @version 2025.5.16.16
151+
// @version 2025.5.16.17
152152
// @license MIT
153153
// @icon https://assets.ddgpt.com/images/icons/duckduckgpt/icon48.png?v=06af076
154154
// @icon64 https://assets.ddgpt.com/images/icons/duckduckgpt/icon64.png?v=06af076
@@ -2833,19 +2833,18 @@
28332833
}
28342834
},
28352835

2836-
replyLang() {
2836+
replyLang() { // requires <app|config|env|log|modals|settings>
28372837
while (true) {
2838-
let replyLang = prompt(
2839-
( app.msgs.prompt_updateReplyLang ) + ':', config.replyLang)
2838+
let replyLang = prompt(`${app.msgs.prompt_updateReplyLang}:`, config.replyLang)
28402839
if (replyLang == null) break // user cancelled so do nothing
28412840
else if (!/\d/.test(replyLang)) {
28422841
replyLang = ( // auto-case for menu/alert aesthetics
28432842
replyLang.length < 4 || replyLang.includes('-') ? replyLang.toUpperCase()
28442843
: log.toTitleCase(replyLang) )
28452844
settings.save('replyLang', replyLang || env.browser.language)
28462845
modals.alert(`${app.msgs.alert_langUpdated}!`, // title
2847-
`${app.name} ${app.msgs.alert_willReplyIn} ` // msg
2848-
+ ( replyLang || app.msgs.alert_yourSysLang ) + '.',
2846+
`${app.name} ${ // msg
2847+
app.msgs.alert_willReplyIn} ${ replyLang || app.msgs.alert_yourSysLang }.`,
28492848
'', '', 330) // modal width
28502849
if (modals.settings.get()) // update settings menu status label
28512850
document.querySelector('#replyLang-settings-entry span').textContent = replyLang

googlegpt/greasemonkey/googlegpt.user.js

Lines changed: 5 additions & 6 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.5.16.15
152+
// @version 2025.5.16.16
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
@@ -3012,19 +3012,18 @@
30123012
}
30133013
},
30143014

3015-
replyLang() {
3015+
replyLang() { // requires <app|config|env|log|modals|settings>
30163016
while (true) {
3017-
let replyLang = prompt(
3018-
( app.msgs.prompt_updateReplyLang ) + ':', config.replyLang)
3017+
let replyLang = prompt(`${app.msgs.prompt_updateReplyLang}:`, config.replyLang)
30193018
if (replyLang == null) break // user cancelled so do nothing
30203019
else if (!/\d/.test(replyLang)) {
30213020
replyLang = ( // auto-case for menu/alert aesthetics
30223021
replyLang.length < 4 || replyLang.includes('-') ? replyLang.toUpperCase()
30233022
: log.toTitleCase(replyLang) )
30243023
settings.save('replyLang', replyLang || env.browser.language)
30253024
modals.alert(`${app.msgs.alert_langUpdated}!`, // title
3026-
`${app.name} ${app.msgs.alert_willReplyIn} ` // msg
3027-
+ ( replyLang || app.msgs.alert_yourSysLang ) + '.',
3025+
`${app.name} ${ // msg
3026+
app.msgs.alert_willReplyIn} ${ replyLang || app.msgs.alert_yourSysLang }.`,
30283027
'', '', 330) // modal width
30293028
if (modals.settings.get()) // update settings menu status label
30303029
document.querySelector('#replyLang-settings-entry span').textContent = replyLang

0 commit comments

Comments
 (0)