|
225 | 225 | // @description:zu Ziba itshala lokucabanga okuzoshintshwa ngokuzenzakalelayo uma ukubuka chatgpt.com
|
226 | 226 | // @author Adam Lui
|
227 | 227 | // @namespace https://github.com/adamlui
|
228 |
| -// @version 2025.1.17 |
| 228 | +// @version 2025.1.18 |
229 | 229 | // @license MIT
|
230 | 230 | // @icon https://assets.autoclearchatgpt.com/images/icons/openai/black/icon48.png?v=f461c06
|
231 | 231 | // @icon64 https://assets.autoclearchatgpt.com/images/icons/openai/black/icon64.png?v=f461c06
|
|
285 | 285 | version: GM_info.script.version, configKeyPrefix: 'autoclearChatGPThistory',
|
286 | 286 | chatgptJSver: /chatgpt\.js@([\d.]+)/.exec(GM_info.scriptMetaStr)[1],
|
287 | 287 | 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() |
289 | 289 | }
|
290 | 290 | app.urls.resourceHost = `https://cdn.jsdelivr.net/gh/adamlui/autoclear-chatgpt-history@${app.latestResourceCommitHash}`
|
291 | 291 | const remoteAppData = await new Promise(resolve => xhr({
|
|
332 | 332 | alert_tyForSupport: 'Thank you for your support',
|
333 | 333 | btnLabel_moreAIextensions: 'More AI Extensions',
|
334 | 334 | btnLabel_rateUs: 'Rate Us',
|
| 335 | + btnLabel_discuss: 'Discuss', |
335 | 336 | btnLabel_getSupport: 'Get Support',
|
336 | 337 | btnLabel_checkForUpdates: 'Check for Updates',
|
337 | 338 | btnLabel_update: 'Update',
|
|
588 | 589 | [ // buttons
|
589 | 590 | function checkForUpdates() { updateCheck() },
|
590 | 591 | function getSupport(){},
|
591 |
| - function rateUs() {}, |
| 592 | + function discuss() {}, |
592 | 593 | function moreAIextensions(){}
|
593 | 594 | ], '', 745 // set width
|
594 | 595 | )
|
|
605 | 606 | btn.style.cssText = 'height: 58px ; min-width: 136px ; text-align: center'
|
606 | 607 |
|
607 | 608 | // 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)) { |
609 | 610 | const btnClone = btn.cloneNode(true)
|
610 | 611 | 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 | + ]) |
616 | 616 | }
|
617 | 617 |
|
618 | 618 | // Prepend emoji + localize labels
|
619 | 619 | if (/updates/i.test(btn.textContent))
|
620 | 620 | btn.textContent = `🚀 ${app.msgs.btnLabel_checkForUpdates}`
|
621 | 621 | else if (/support/i.test(btn.textContent))
|
622 | 622 | 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}` |
625 | 625 | else if (/extensions/i.test(btn.textContent))
|
626 | 626 | btn.textContent = `🤖 ${app.msgs.btnLabel_moreAIextensions}`
|
627 | 627 |
|
|
653 | 653 | [ // buttons
|
654 | 654 | function paypal(){},
|
655 | 655 | function githubSponsors(){},
|
656 |
| - function cashApp(){}, |
657 |
| - function rateUs(){} |
| 656 | + function cashApp(){} |
658 | 657 | ], '', 478 // set width
|
659 | 658 | )
|
660 | 659 |
|
|
670 | 669 | if (!/dismiss/i.test(btn.textContent)) {
|
671 | 670 | const btnClone = btn.cloneNode(true)
|
672 | 671 | 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 | + ]) |
679 | 676 | }
|
680 | 677 |
|
681 | 678 | // Format buttons
|
|
685 | 682 | + ' width: 107px ; line-height: 14px'
|
686 | 683 | if (idx == btns.length -1) // de-emphasize right-most button
|
687 | 684 | 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 |
690 | 685 | }
|
691 | 686 | })
|
692 | 687 |
|
|
0 commit comments