Adds AI answers to Brave Search (powered by GPT-4o!)
These are versions of this script where the code was updated. Show all versions.
Moved log.prefix before label in log.err() ↞ [auto-sync from adamlui/chatgpt-apps]
log.prefix
label
log.err()
adamlui/chatgpt-apps
Added Render service suspended fail flag to Free Chat API props ↞ [auto-sync from adamlui/chatgpt-apps]
Condensed log.err() ↞ [auto-sync from adamlui/chatgpt-apps]
Added optional chaining in show.reply() to accommodate empty 1st chunks when streaming ↞ [auto-sync from adamlui/chatgpt-apps]
show.reply()
Replaced passing of logPrefix in log function calls w/ log.prefix ↞ [auto-sync from adamlui/chatgpt-apps]
logPrefix
Moved log functions into obj for improved readability ↞ [auto-sync from adamlui/chatgpt-apps]
Added stripping of dark scheme '>> ' from replies when clicking Copy button ↞ [auto-sync from adamlui/chatgpt-apps]
Added failFlagsAndURLs init to dataProcess.stream(), changed .test() target to more precise textToShow ↞ [auto-sync from adamlui/chatgpt-apps]
failFlagsAndURLs
dataProcess.stream()
.test()
textToShow
Eliminated reliance on deprecated global event ↞ [auto-sync from adamlui/chatgpt-apps]
event
Moved reply Copy button up/right, renamed .copy-icon to .copy-btn ↞ [auto-sync from adamlui/chatgpt-apps]
.copy-icon
.copy-btn
Fixed copy icon sometimes didn't update to checkmarks ↞ [auto-sync from adamlui/chatgpt-apps]
Moved styles from show.copyBtns() to appStyles to support live update w/ scheme changes
show.copyBtns()
appStyles
± Refactored update.scheme() to match routine order in other KudoAI scripts for easier maintenance ± Replaced deprecated SVG className w/ classList.add()
update.scheme()
className
classList.add()
Abstracted dataProcess.initFailFlags(api) ↞ [auto-sync from adamlui/chatgpt-apps]
dataProcess.initFailFlags(api)
Renamed str to url in escapedAPIurls for improved readability ↞ [auto-sync from adamlui/chatgpt-apps]
str
url
escapedAPIurls
Fixed Copy buttons didn't show when Streaming disabled ↞ [auto-sync from adamlui/chatgpt-apps]
Added caller/function log prefix to dataProcess.stream() ↞ [auto-sync from adamlui/chatgpt-apps]
Re-added erroneously deleted accumulatedChunks assignment to dataProcess.stream() ↞ [auto-sync from adamlui/chatgpt-apps]
accumulatedChunks
Improved dataProcess methods
dataProcess
± Added endpoint + expected origin URL detection in response for all APIs to try diff API ± Condensed dataProcess.text()
dataProcess.text()
Added type conversion to consoleErr() to prevent uncaught exceptions in TM (Tampermonkey/tampermonkey#2158) ↞ [auto-sync from adamlui/chatgpt-apps]
consoleErr()
Changed err.message unsupported by GM XHR onerror to err ↞ [auto-sync from adamlui/chatgpt-apps]
err.message
onerror
err
Refactored show.reply() to use forEach loop for dynamic button creation ↞ [auto-sync from adamlui/chatgpt-apps]
forEach
Improved update.tooltip() for easier maintenance
update.tooltip()
± Added chatbarBtnTypes ± Replaced regex in update pos routine w/ cornerBtnTypes check
chatbarBtnTypes
cornerBtnTypes
Shortened buttonType to btnType in update.tooltip() ↞ [auto-sync from adamlui/chatgpt-apps]
buttonType
btnType
Added insufficient balance as Free Chat API fail flag ↞ [auto-sync from adamlui/chatgpt-apps]
Added Streaming switch state update w/ Proxy toggle + on Settings open ↞ [auto-sync from adamlui/chatgpt-apps]
Corrected selector in appAlert() ↞ [auto-sync from adamlui/chatgpt-apps]
appAlert()
Added Copy buttons ↞ [auto-sync from adamlui/chatgpt-apps]
Added 'invalid_request_error' to Free Chat API fail flags ↞ [auto-sync from adamlui/chatgpt-apps]
'invalid_request_error'
Separated appAlert() arg in dataProcess.text() into 2 for proper handling ↞ [auto-sync from adamlui/chatgpt-apps]
Alphabetizezd dataProcess methods for improved readability ↞ [auto-sync from adamlui/chatgpt-apps]
Updated dataProcess.stream() to only use fail flags from active API ↞ [auto-sync from adamlui/chatgpt-apps]
Tweaked rqPrompt to avoid AIchatOS detection ↞ [auto-sync from adamlui/chatgpt-apps]
rqPrompt
Refined get methods to time-out call api.tryNew() only if no prev err + untried APIs remain ↞ [auto-sync from adamlui/chatgpt-apps]
get
api.tryNew()
Removed unnecessary braces ↞ [auto-sync from adamlui/chatgpt-apps]
Moved rqPrompt init out of return statement in get.related(queries) for readability ↞ [auto-sync from adamlui/chatgpt-apps]
get.related(queries)
Removed erroneous leading in ↞ [auto-sync from ]
Shortened Review button label in About modal ↞ [auto-sync from adamlui/chatgpt-apps]
Updated Free Chat API endpoint URL ↞ [auto-sync from adamlui/chatgpt-apps]
Reversed ternary in rqPrompt for readability ↞ [auto-sync from adamlui/chatgpt-apps]
Excluded toggles/borders from opacity dim of disabled settings ↞ [auto-sync from adamlui/chatgpt-apps]
Updated button label msg key names ↞ [auto-sync from adamlui/chatgpt-apps]
Added error catching to Sogou TTS for buffer errors
± Prepended 'sgt' to Sogou var names ↞ [auto-sync from adamlui/chatgpt-apps]
Shortened rqPrompt when using Free Chat API to avoid long prompt detection ↞ [auto-sync from adamlui/chatgpt-apps]
Added font size tooltip to slider thumb ↞ [auto-sync from adamlui/chatgpt-apps]
Consolidated openAIendpoints into apis.OpenAI.endpoints ↞ [auto-sync from adamlui/chatgpt-apps]
openAIendpoints
apis.OpenAI.endpoints
Added free credit fail flag for Free Chat API ↞ [auto-sync from adamlui/chatgpt-apps]
Prepended '>> ' to dark scheme replies to emulate terminal since speech balloon tip missing ↞ [auto-sync from adamlui/chatgpt-apps]
Moved fail flags from dataProcess methods to apis
apis
± Replaced AIchatOS key ref w/ caller.api for easier maintenance ± Updated GPTforLove condition to rely on new failFlags from apis ↞ [auto-sync from adamlui/chatgpt-apps]
caller.api
failFlags
Hid GitHub button if Feedback modal summoned from About modal ↞ [auto-sync from adamlui/chatgpt-apps]
Added Render 404 check to dataProcess methods ↞ [auto-sync from adamlui/chatgpt-apps]
Show all script versions