Skip to content

Commit b32beb9

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/autoclear-chatgpt-history]
1 parent 4a5c900 commit b32beb9

File tree

1 file changed

+16
-21
lines changed

1 file changed

+16
-21
lines changed

chatgpt/autoclear-chatgpt-history/autoclear-chatgpt-history.user.js

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@
225225
// @description:zu Ziba itshala lokucabanga okuzoshintshwa ngokuzenzakalelayo uma ukubuka chatgpt.com
226226
// @author Adam Lui
227227
// @namespace https://github.com/adamlui
228-
// @version 2025.1.17
228+
// @version 2025.1.18
229229
// @license MIT
230230
// @icon https://assets.autoclearchatgpt.com/images/icons/openai/black/icon48.png?v=f461c06
231231
// @icon64 https://assets.autoclearchatgpt.com/images/icons/openai/black/icon64.png?v=f461c06
@@ -285,7 +285,7 @@
285285
version: GM_info.script.version, configKeyPrefix: 'autoclearChatGPThistory',
286286
chatgptJSver: /chatgpt\.js@([\d.]+)/.exec(GM_info.scriptMetaStr)[1],
287287
urls: { update: 'https://gm.autoclearchatgpt.com' },
288-
latestResourceCommitHash: '06d6690' // for cached app.json + messages.json + navicon in toggles.sidebar.insert()
288+
latestResourceCommitHash: '05a0d8c' // for cached app.json + messages.json + navicon in toggles.sidebar.insert()
289289
}
290290
app.urls.resourceHost = `https://cdn.jsdelivr.net/gh/adamlui/autoclear-chatgpt-history@${app.latestResourceCommitHash}`
291291
const remoteAppData = await new Promise(resolve => xhr({
@@ -332,6 +332,7 @@
332332
alert_tyForSupport: 'Thank you for your support',
333333
btnLabel_moreAIextensions: 'More AI Extensions',
334334
btnLabel_rateUs: 'Rate Us',
335+
btnLabel_discuss: 'Discuss',
335336
btnLabel_getSupport: 'Get Support',
336337
btnLabel_checkForUpdates: 'Check for Updates',
337338
btnLabel_update: 'Update',
@@ -588,7 +589,7 @@
588589
[ // buttons
589590
function checkForUpdates() { updateCheck() },
590591
function getSupport(){},
591-
function rateUs() {},
592+
function discuss() {},
592593
function moreAIextensions(){}
593594
], '', 745 // set width
594595
)
@@ -605,23 +606,22 @@
605606
btn.style.cssText = 'height: 58px ; min-width: 136px ; text-align: center'
606607

607608
// Replace link buttons w/ clones that don't dismiss modal
608-
if (/support|rate|extensions/i.test(btn.textContent)) {
609+
if (/support|discuss|extensions/i.test(btn.textContent)) {
609610
const btnClone = btn.cloneNode(true)
610611
btn.parentNode.replaceChild(btnClone, btn) ; btn = btnClone
611-
btn.onclick = () => modals.safeWinOpen(
612-
btn.textContent.includes(app.msgs.btnLabel_getSupport) ? app.urls.support
613-
: btn.textContent.includes(app.msgs.btnLabel_rateUs) ? app.urls.review.greasyFork
614-
: app.urls.relatedExtensions
615-
)
612+
btn.onclick = () => modals.safeWinOpen(app.urls[
613+
btn.textContent.includes(app.msgs.btnLabel_getSupport) ? 'support'
614+
: btn.textContent.includes(app.msgs.btnLabel_discuss) ? 'discuss' : 'relatedExtensions'
615+
])
616616
}
617617

618618
// Prepend emoji + localize labels
619619
if (/updates/i.test(btn.textContent))
620620
btn.textContent = `🚀 ${app.msgs.btnLabel_checkForUpdates}`
621621
else if (/support/i.test(btn.textContent))
622622
btn.textContent = `🧠 ${app.msgs.btnLabel_getSupport}`
623-
else if (/rate/i.test(btn.textContent))
624-
btn.textContent = `⭐ ${app.msgs.btnLabel_rateUs}`
623+
else if (/discuss/i.test(btn.textContent))
624+
btn.textContent = `⭐ ${app.msgs.btnLabel_discuss}`
625625
else if (/extensions/i.test(btn.textContent))
626626
btn.textContent = `🤖 ${app.msgs.btnLabel_moreAIextensions}`
627627

@@ -653,8 +653,7 @@
653653
[ // buttons
654654
function paypal(){},
655655
function githubSponsors(){},
656-
function cashApp(){},
657-
function rateUs(){}
656+
function cashApp(){}
658657
], '', 478 // set width
659658
)
660659

@@ -670,12 +669,10 @@
670669
if (!/dismiss/i.test(btn.textContent)) {
671670
const btnClone = btn.cloneNode(true)
672671
btn.parentNode.replaceChild(btnClone, btn) ; btn = btnClone
673-
btn.onclick = () => modals.safeWinOpen(
674-
btn.textContent == 'Cash App' ? app.urls.donate.cashApp
675-
: btn.textContent == 'Github Sponsors' ? app.urls.donate.gitHub
676-
: btn.textContent == 'Paypal' ? app.urls.donate.payPal
677-
: app.urls.review.greasyFork
678-
)
672+
btn.onclick = () => modals.safeWinOpen(app.urls.donate[
673+
btn.textContent == 'Cash App' ? 'cashApp'
674+
: btn.textContent == 'Github Sponsors' ? 'gitHub' : 'payPal'
675+
])
679676
}
680677

681678
// Format buttons
@@ -685,8 +682,6 @@
685682
+ ' width: 107px ; line-height: 14px'
686683
if (idx == btns.length -1) // de-emphasize right-most button
687684
btn.classList.remove('primary-modal-btn')
688-
else if (/rate/i.test(btn.textContent)) // localize 'Rate Us' label
689-
btn.textContent = app.msgs.btnLabel_rateUs
690685
}
691686
})
692687

0 commit comments

Comments
 (0)