Skip to content

Commit 4a5c900

Browse files
committed
Replaced GM About modal's Rate Us button w/ Discuss + deleted Rate Us button from Donate modal ↞ [auto-sync from https://github.com/adamlui/ai-web-extensions/tree/main/chatgpt-auto-refresh]
1 parent bb33432 commit 4a5c900

File tree

1 file changed

+18
-26
lines changed

1 file changed

+18
-26
lines changed

chatgpt/chatgpt-auto-refresh/chatgpt-auto-refresh.user.js

Lines changed: 18 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@
220220
// @description:zu *NGOKUPHEPHA* susa ukusetha kabusha ingxoxo yemizuzu eyi-10 + amaphutha enethiwekhi ahlala njalo + Ukuhlolwa kwe-Cloudflare ku-ChatGPT.
221221
// @author Adam Lui
222222
// @namespace https://github.com/adamlui
223-
// @version 2025.1.17
223+
// @version 2025.1.18
224224
// @license MIT
225225
// @icon https://assets.chatgptautorefresh.com/images/icons/openai/black/icon48.png?v=f11a0a8
226226
// @icon64 https://assets.chatgptautorefresh.com/images/icons/openai/black/icon64.png?v=f11a0a8
@@ -287,22 +287,19 @@
287287
urls: {
288288
chatgptJS: 'https://chatgpt.js.org',
289289
contributors: 'https://docs.chatgptautorefresh.com/#-contributors',
290+
discuss: 'https://github.com/adamlui/chatgpt-auto-refresh/discussions',
290291
donate: {
291292
cashApp: 'https://cash.app/$adamlui',
292293
gitHub: 'https://github.com/sponsors/adamlui',
293294
payPal: 'https://paypal.me/adamlui'
294295
},
295296
gitHub: 'https://github.com/adamlui/chatgpt-auto-refresh',
296-
greasyFork: 'https://greasyfork.org/scripts/462422-chatgpt-auto-refresh',
297297
assetHost: 'https://assets.chatgptautorefresh.com',
298298
relatedExtensions: 'https://github.com/adamlui/ai-web-extensions',
299-
review: {
300-
greasyFork: 'https://greasyfork.org/scripts/462422-chatgpt-auto-refresh/feedback#post-discussion'
301-
},
302299
support: 'https://support.chatgptautorefresh.com',
303300
update: 'https://gm.chatgptautorefresh.com'
304301
},
305-
latestResourceCommitHash: '228c25a' // for cached messages.json + navicon in toggles.sidebar.insert()
302+
latestResourceCommitHash: 'e6261c6' // for cached messages.json + navicon in toggles.sidebar.insert()
306303
}
307304
app.urls.resourceHost = app.urls.gitHub.replace('github.com', 'cdn.jsdelivr.net/gh') + `@${app.latestResourceCommitHash}`
308305
app.msgs = {
@@ -345,6 +342,7 @@
345342
alert_isUpToDate: 'is up-to-date',
346343
btnLabel_moreAIextensions: 'More AI Extensions',
347344
btnLabel_rateUs: 'Rate Us',
345+
btnLabel_discuss: 'Discuss',
348346
btnLabel_getSupport: 'Get Support',
349347
btnLabel_checkForUpdates: 'Check for Updates',
350348
btnLabel_update: 'Update',
@@ -625,7 +623,7 @@
625623
[ // buttons
626624
function checkForUpdates() { updateCheck() },
627625
function getSupport(){},
628-
function rateUs() {},
626+
function discuss() {},
629627
function moreAIextensions(){}
630628
], '', 714 // set width
631629
)
@@ -642,23 +640,22 @@
642640
btn.style.cssText = 'height: 58px ; min-width: 136px ; text-align: center'
643641

644642
// Replace link buttons w/ clones that don't dismiss modal
645-
if (/support|rate|extensions/i.test(btn.textContent)) {
643+
if (/support|discuss|extensions/i.test(btn.textContent)) {
646644
const btnClone = btn.cloneNode(true)
647645
btn.parentNode.replaceChild(btnClone, btn) ; btn = btnClone
648-
btn.onclick = () => modals.safeWinOpen(
649-
btn.textContent.includes(app.msgs.btnLabel_getSupport) ? app.urls.support
650-
: btn.textContent.includes(app.msgs.btnLabel_rateUs) ? app.urls.review.greasyFork
651-
: app.urls.relatedExtensions
652-
)
646+
btn.onclick = () => modals.safeWinOpen(app.urls[
647+
btn.textContent.includes(app.msgs.btnLabel_getSupport) ? 'support'
648+
: btn.textContent.includes(app.msgs.btnLabel_discuss) ? 'discuss' : 'relatedExtensions'
649+
])
653650
}
654651

655652
// Prepend emoji + localize labels
656653
if (/updates/i.test(btn.textContent))
657654
btn.textContent = `🚀 ${app.msgs.btnLabel_checkForUpdates}`
658655
else if (/support/i.test(btn.textContent))
659656
btn.textContent = `🧠 ${app.msgs.btnLabel_getSupport}`
660-
else if (/rate/i.test(btn.textContent))
661-
btn.textContent = ` ${app.msgs.btnLabel_rateUs}`
657+
else if (/discuss/i.test(btn.textContent))
658+
btn.textContent = `🗨️ ${app.msgs.btnLabel_discuss}`
662659
else if (/extensions/i.test(btn.textContent))
663660
btn.textContent = `🤖 ${app.msgs.btnLabel_moreAIextensions}`
664661

@@ -690,8 +687,7 @@
690687
[ // buttons
691688
function paypal(){},
692689
function githubSponsors(){},
693-
function cashApp(){},
694-
function rateUs() { modals.safeWinOpen(app.urls.review.greasyFork) }
690+
function cashApp(){}
695691
], '', 478 // set width
696692
)
697693

@@ -704,15 +700,13 @@
704700
btns.forEach((btn, idx) => {
705701

706702
// Replace link buttons w/ clones that don't dismiss modal
707-
if (!/dismiss|rate/i.test(btn.textContent)) {
703+
if (!/dismiss/i.test(btn.textContent)) {
708704
const btnClone = btn.cloneNode(true)
709705
btn.parentNode.replaceChild(btnClone, btn) ; btn = btnClone
710-
btn.onclick = () => modals.safeWinOpen(
711-
btn.textContent == 'Cash App' ? app.urls.donate.cashApp
712-
: btn.textContent == 'Github Sponsors' ? app.urls.donate.gitHub
713-
: btn.textContent == 'Paypal' ? app.urls.donate.payPal
714-
: app.urls.review.greasyFork
715-
)
706+
btn.onclick = () => modals.safeWinOpen(app.urls.donate[
707+
btn.textContent == 'Cash App' ? 'cashApp'
708+
: btn.textContent == 'Github Sponsors' ? 'gitHub' : 'payPal'
709+
])
716710
}
717711

718712
// Format buttons
@@ -722,8 +716,6 @@
722716
+ ' width: 107px ; line-height: 14px'
723717
if (idx == btns.length -1) // de-emphasize right-most button
724718
btn.classList.remove('primary-modal-btn')
725-
else if (/rate/i.test(btn.textContent)) // localize 'Rate Us' label
726-
btn.textContent = app.msgs.btnLabel_rateUs
727719
}
728720
})
729721

0 commit comments

Comments
 (0)