|
156 | 156 | // @description:zu Yengeza izimpendulo ze-AI ku-Google Search (inikwa amandla yi-Google Gemma + GPT-4o!)
|
157 | 157 | // @author KudoAI
|
158 | 158 | // @namespace https://kudoai.com
|
159 |
| -// @version 2024.6.17.1 |
| 159 | +// @version 2024.6.17.2 |
160 | 160 | // @license MIT
|
161 | 161 | // @icon https://media.googlegpt.io/images/icons/googlegpt/black/icon48.png?8652a6e
|
162 | 162 | // @icon64 https://media.googlegpt.io/images/icons/googlegpt/black/icon64.png?8652a6e
|
|
417 | 417 | .replace(/(\d+)-?([a-zA-Z-]*)$/, (_, id, name) => `${ id }/${ !name ? 'script' : name }.meta.js`)
|
418 | 418 | config.supportURL = config.gitHubURL + '/issues/new'
|
419 | 419 | config.feedbackURL = config.gitHubURL + '/discussions/new/choose'
|
420 |
| - config.assetHostURL = config.gitHubURL.replace('github.com', 'cdn.jsdelivr.net/gh') + '@c2c72f8/' |
| 420 | + config.assetHostURL = config.gitHubURL.replace('github.com', 'cdn.jsdelivr.net/gh') + '@02510f0/' |
421 | 421 | config.userLanguage = chatgpt.getUserLanguage()
|
422 | 422 | config.userLocale = window.location.hostname.endsWith('.com') ? 'us'
|
423 | 423 | : window.location.hostname.split('.').pop()
|
|
426 | 426 | 'suffixEnabled', 'widerSidebar')
|
427 | 427 | if (!config.replyLanguage) saveSetting('replyLanguage', config.userLanguage) // init reply language if unset
|
428 | 428 | if (!config.fontSize) saveSetting('fontSize', isMobile ? 14 : 16.55) // init reply font size if unset
|
429 |
| - if (getUserscriptManager() != 'Tampermonkey') saveSetting('streamingDisabled', true) // disable streaming if not TM |
| 429 | + if (isEdge || getUserscriptManager() != 'Tampermonkey') saveSetting('streamingDisabled', true) // disable streaming if Edge or not TM |
430 | 430 | if (isMobile && !config.notFirstRun) saveSetting('autoget', true) // reverse default auto-get disabled if mobile
|
431 | 431 | saveSetting('notFirstRun', true)
|
432 | 432 |
|
|
467 | 467 | + ( msgs.mode_streaming || 'Streaming Mode' ) + ' '
|
468 | 468 | + state.separator + state.word[+stmState]
|
469 | 469 | menuIDs.push(GM_registerMenuCommand(stmLabel, () => {
|
470 |
| - if (getUserscriptManager() != 'Tampermonkey') // alert userscript manager unsupported, suggest Tampermonkey |
| 470 | + if (isEdge) { // alert Edge unsupported, link to browser bug |
| 471 | + const msBugLink = 'https://answers.microsoft.com/en-us/microsoftedge/forum/all/' |
| 472 | + + 'status-access-violation-issues/1fd4a2ef-6736-441f-8421-6ed167105093' |
| 473 | + siteAlert(`${ msgs.mode_streaming || 'Streaming Mode' } ${ msgs.alert_unavailable || 'unavailable' }`, |
| 474 | + `${ msgs.mode_streaming || 'Streaming Mode' } ${ msgs.alert_isUnsupportedIn || 'is unsupported in' } Edge` |
| 475 | + + ` ${ msgs.alert_untilMSfixesBug || 'until Microsoft fixes this long-standing browser rendering bug' }:` |
| 476 | + + ` <a target="_blank" rel="noopener" href="${msBugLink}">${msBugLink}</a>`) |
| 477 | + } else if (getUserscriptManager() != 'Tampermonkey') // alert userscript manager unsupported, suggest Tampermonkey |
471 | 478 | siteAlert(`${ msgs.mode_streaming || 'Streaming Mode' } ${ msgs.alert_unavailable || 'unavailable' }`,
|
472 | 479 | `${ msgs.mode_streaming || 'Streaming Mode' } ${ msgs.alert_isOnlyAvailFor || 'is only available for' }`
|
473 | 480 | + ' <a target="_blank" rel="noopener" href="https://tampermonkey.net">Tampermonkey</a>.'
|
|
1661 | 1668 | } catch (err) { consoleErr('Error showing stream', err.message) }
|
1662 | 1669 | return reader.read().then(({ done, value }) => {
|
1663 | 1670 | if (get.reply.sender == caller.api) // am designated sender, recurse
|
1664 |
| - setTimeout(() => { processStreamText({ done, value }) }, isEdge ? 200 : 1) // Edge delay vs. STATUS_ACCESS_VIOLATION bug |
| 1671 | + processStreamText({ done, value }) |
1665 | 1672 | }).catch(err => consoleErr('Error reading stream', err.message))
|
1666 | 1673 | }
|
1667 | 1674 | }
|
|
0 commit comments