Skip to content

Commit

Permalink
Removed logging from reliable appAlert() for cleaner console ↞ [aut…
Browse files Browse the repository at this point in the history
…o-sync from `adamlui/chatgpt-apps`]
  • Loading branch information
adamlui authored and kudo-sync-bot committed Sep 13, 2024
1 parent 8571b48 commit ce4ae47
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions greasemonkey/googlegpt.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@
// @description:zu Yengeza izimpendulo ze-AI ku-Google Search (inikwa amandla yi-Google Gemma + GPT-4o!)
// @author KudoAI
// @namespace https://kudoai.com
// @version 2024.9.13.4
// @version 2024.9.13.5
// @license MIT
// @icon https://media.googlegpt.io/images/icons/googlegpt/black/icon48.png?8652a6e
// @icon64 https://media.googlegpt.io/images/icons/googlegpt/black/icon64.png?8652a6e
Expand Down Expand Up @@ -786,7 +786,6 @@
// Define FEEDBACK functions

function appAlert(...alerts) {
log.caller = 'appAlert()'
alerts = alerts.flat() // flatten array args nested by spread operator
while (appDiv.firstChild) appDiv.removeChild(appDiv.firstChild) // clear appDiv content
const alertP = document.createElement('p')
Expand All @@ -800,7 +799,6 @@

// Add login link to login msgs
if (msg.includes('@')) {
log.debug('Adding login link...')
msg += '<a class="alert-link" target="_blank" rel="noopener" href="https://chatgpt.com">chatgpt.com</a>,'
+ ` ${ msgs.alert_thenRefreshPage || 'then refresh this page' }.`
+ ` (${ msgs.alert_ifIssuePersists || 'If issue persists' },`
Expand All @@ -813,7 +811,6 @@
const foundState = ['On', 'Off'].find(state =>
msg.includes(msgs['alert_switching' + state]) || new RegExp(`\\b${state}\\b`, 'i').test(msg))
if (foundState) { // hyperlink switch phrase for click listener to toggle.proxyMode()
log.debug('Hyperlinking on/off state in alert...')
const switchPhrase = msgs['alert_switching' + foundState] || 'switching ' + foundState.toLowerCase()
msg = msg.replace(switchPhrase, `<a class="alert-link" href="#">${switchPhrase}</a>`)
}
Expand Down

0 comments on commit ce4ae47

Please sign in to comment.