Skip to content

Commit

Permalink
Renamed alert() to siteAlert() to avoid potential namespace confl…
Browse files Browse the repository at this point in the history
…icts ↞ [auto-sync from `adamlui/chatgpt-apps/chatgpt-auto-continue`]
  • Loading branch information
adamlui authored and kudo-sync-bot committed Jun 8, 2024
1 parent cb5ff32 commit b889bcc
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions chatgpt/chatgpt-auto-continue/chatgpt-auto-continue.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@
// @description:zu ⚡ Terus menghasilkan imibuzo eminingi ye-ChatGPT ngokwesizulu
// @author Adam Lui
// @namespace https://github.com/adamlui
// @version 2024.6.8.1
// @version 2024.6.8.2
// @license MIT
// @match *://chatgpt.com/*
// @match *://chat.openai.com/*
Expand Down Expand Up @@ -350,7 +350,7 @@
pStyle = 'position: relative ; left: 3px',
pBrStyle = 'position: relative ; left: 4px ',
aStyle = 'color: ' + ( chatgpt.isDarkMode() ? '#c67afb' : '#8325c4' ) // purple
const aboutModalID = alert(
const aboutModalID = siteAlert(
msgs.appName || config.appName, // title
`<span style="${ headingStyle }"><b>🏷️ <i>${ msgs.about_version || 'Version' }</i></b>: </span>`
+ `<span style="${ pStyle }">${ GM_info.script.version }</span>\n`
Expand Down Expand Up @@ -400,7 +400,7 @@
else if (latestSubVer > currentSubVer) { // if outdated

// Alert to update
const updateModalID = alert(( msgs.alert_updateAvail || 'Update available' ) + '! 🚀', // title
const updateModalID = siteAlert(( msgs.alert_updateAvail || 'Update available' ) + '! 🚀', // title
( msgs.alert_newerVer || 'An update to' ) + ' ' // msg
+ ( msgs.appName || config.appName ) + ' '
+ `(v${ latestVer }) ${ msgs.alert_isAvail || 'is available' }! `
Expand All @@ -426,7 +426,7 @@
}}

// Alert to no update, return to About modal
alert(( msgs.alert_upToDate || 'Up-to-date' ) + '!', // title
siteAlert(( msgs.alert_upToDate || 'Up-to-date' ) + '!', // title
`${ msgs.appName || 'ChatGPT Auto-Continue' } (v${ currentVer }) ` // msg
+ ( msgs.alert_isUpToDate || 'is up-to-date' ) + '!',
'', '', updateAlertWidth
Expand All @@ -439,7 +439,7 @@
function notify(msg, position = '', notifDuration = '', shadow = '') {
chatgpt.notify(`${ config.appSymbol } ${ msg }`, position, notifDuration, shadow || chatgpt.isDarkMode() ? '' : 'shadow') }

function alert(title = '', msg = '', btns = '', checkbox = '', width = '') {
function siteAlert(title = '', msg = '', btns = '', checkbox = '', width = '') {
return chatgpt.alert(`${ config.appSymbol } ${ title }`, msg, btns, checkbox, width )}

})()

0 comments on commit b889bcc

Please sign in to comment.