Skip to content

Commit

Permalink
Updated log.regEx refs ↞ [auto-sync from adamlui/chatgpt-apps]
Browse files Browse the repository at this point in the history
  • Loading branch information
adamlui authored and kudo-sync-bot committed Sep 13, 2024
1 parent b9a8200 commit ef3ca95
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 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 2024.9.13.1
// @version 2024.9.13.2
// @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 @@ -287,9 +287,9 @@
args.forEach((arg, idx) => {
finalMsg += idx == 1 ? ': ' : idx > 1 ? ' ' : '' // separate multi-args
finalMsg += arg?.toString().replace(new RegExp(Object.values(log.regEx).map(value => value.source).join('|'), 'ig'), match => {
if (log.regEx.greenChars.test(match)) { msgStyles.push('color: green', baseMsgStyle) ; return `%c${match}%c` }
else if (log.regEx.redChars.test(match)) { msgStyles.push('color: red', baseMsgStyle) ; return `%c${match}%c` }
else if (log.regEx.purpChars.test(match)) { msgStyles.push('color: #dd29f4', baseMsgStyle) ; return `%c${match}%c` }
if (log.regEx.greenVals.test(match)) { msgStyles.push('color: green', baseMsgStyle) ; return `%c${match}%c` }
else if (log.regEx.redVals.test(match)) { msgStyles.push('color: red', baseMsgStyle) ; return `%c${match}%c` }
else if (log.regEx.purpVals.test(match)) { msgStyles.push('color: #dd29f4', baseMsgStyle) ; return `%c${match}%c` }
})
})

Expand Down

0 comments on commit ef3ca95

Please sign in to comment.