Skip to content

Commit

Permalink
Shortened scriptCatLink to scLink in toggle.streaming(), edited…
Browse files Browse the repository at this point in the history
… whitespace in init for readability ↞ [auto-sync from https://github.com/adamlui/ai-web-extensions]
  • Loading branch information
kudo-sync-bot committed Jan 3, 2025
1 parent 5c0dc60 commit 010f3ce
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions greasemonkey/bravegpt.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@
// @description:zu Yengeza izimpendulo ze-AI ku-Brave Search (inikwa amandla yi-GPT-4o!)
// @author KudoAI
// @namespace https://kudoai.com
// @version 2025.1.3.14
// @version 2025.1.3.15
// @license MIT
// @icon https://media.bravegpt.com/images/icons/bravegpt/icon48.png?0a9e287
// @icon64 https://media.bravegpt.com/images/icons/bravegpt/icon64.png?0a9e287
Expand Down Expand Up @@ -3024,19 +3024,20 @@
},

streaming() {
const scriptCatLink = env.browser.isFF ?
const scLink = (
env.browser.isFF ?
'https://addons.mozilla.org/firefox/addon/scriptcat/'
: env.browser.isEdge ?
: env.browser.isEdge ?
'https://microsoftedge.microsoft.com/addons/detail/scriptcat/liilgpjgabokdklappibcjfablkpcekh'
: 'https://chromewebstore.google.com/detail/scriptcat/ndcooeababalnlpkfedmmbbbgkljhpjf'
: 'https://chromewebstore.google.com/detail/scriptcat/ndcooeababalnlpkfedmmbbbgkljhpjf' )
if (!env.streamingSupported.byScriptManager) { // alert userscript manager unsupported, suggest TM/SC
modals.alert(
`${settings.controls.streamingDisabled.label} ${app.msgs.alert_unavailable}`,
`${settings.controls.streamingDisabled.label} ${app.msgs.alert_isOnlyAvailFor}`
+ ( !env.browser.isEdge && !env.browser.isBrave ? // suggest TM for supported browsers
` <a target="_blank" rel="noopener" href="https://tampermonkey.net">Tampermonkey</a> ${
app.msgs.alert_and}` : '' )
+ ` <a target="_blank" rel="noopener" href="${scriptCatLink}">ScriptCat</a>.` // suggest SC
+ ` <a target="_blank" rel="noopener" href="${scLink}">ScriptCat</a>.` // suggest SC
+ ` (${app.msgs.alert_userscriptMgrNoStream}.)`
)
} else if (!env.streamingSupported.byBrowser) { // alert TM/browser unsupported, suggest SC
Expand All @@ -3046,7 +3047,7 @@
+ `${ env.browser.isChrome ? 'Chrome' : env.browser.isEdge ? 'Edge' : 'Brave' } ${
app.msgs.alert_whenUsing} Tampermonkey. `
+ `${app.msgs.alert_pleaseUse} <a target="_blank" rel="noopener" href="${
scriptCatLink}">ScriptCat</a> ${app.msgs.alert_instead}.`
scLink}">ScriptCat</a> ${app.msgs.alert_instead}.`
)
} else if (!config.proxyAPIenabled) { // alert OpenAI API unsupported, suggest Proxy Mode
let msg = `${settings.controls.streamingDisabled.label} `
Expand Down

0 comments on commit 010f3ce

Please sign in to comment.