|
220 | 220 | // @description:zu *NGOKUPHEPHA* susa ukusetha kabusha ingxoxo yemizuzu eyi-10 + amaphutha enethiwekhi ahlala njalo + Ukuhlolwa kwe-Cloudflare ku-ChatGPT.
|
221 | 221 | // @author Adam Lui
|
222 | 222 | // @namespace https://github.com/adamlui
|
223 |
| -// @version 2025.1.17 |
| 223 | +// @version 2025.1.18 |
224 | 224 | // @license MIT
|
225 | 225 | // @icon https://assets.chatgptautorefresh.com/images/icons/openai/black/icon48.png?v=f11a0a8
|
226 | 226 | // @icon64 https://assets.chatgptautorefresh.com/images/icons/openai/black/icon64.png?v=f11a0a8
|
|
287 | 287 | urls: {
|
288 | 288 | chatgptJS: 'https://chatgpt.js.org',
|
289 | 289 | contributors: 'https://docs.chatgptautorefresh.com/#-contributors',
|
| 290 | + discuss: 'https://github.com/adamlui/chatgpt-auto-refresh/discussions', |
290 | 291 | donate: {
|
291 | 292 | cashApp: 'https://cash.app/$adamlui',
|
292 | 293 | gitHub: 'https://github.com/sponsors/adamlui',
|
293 | 294 | payPal: 'https://paypal.me/adamlui'
|
294 | 295 | },
|
295 | 296 | gitHub: 'https://github.com/adamlui/chatgpt-auto-refresh',
|
296 |
| - greasyFork: 'https://greasyfork.org/scripts/462422-chatgpt-auto-refresh', |
297 | 297 | assetHost: 'https://assets.chatgptautorefresh.com',
|
298 | 298 | relatedExtensions: 'https://github.com/adamlui/ai-web-extensions',
|
299 |
| - review: { |
300 |
| - greasyFork: 'https://greasyfork.org/scripts/462422-chatgpt-auto-refresh/feedback#post-discussion' |
301 |
| - }, |
302 | 299 | support: 'https://support.chatgptautorefresh.com',
|
303 | 300 | update: 'https://gm.chatgptautorefresh.com'
|
304 | 301 | },
|
305 |
| - latestResourceCommitHash: '228c25a' // for cached messages.json + navicon in toggles.sidebar.insert() |
| 302 | + latestResourceCommitHash: 'e6261c6' // for cached messages.json + navicon in toggles.sidebar.insert() |
306 | 303 | }
|
307 | 304 | app.urls.resourceHost = app.urls.gitHub.replace('github.com', 'cdn.jsdelivr.net/gh') + `@${app.latestResourceCommitHash}`
|
308 | 305 | app.msgs = {
|
|
345 | 342 | alert_isUpToDate: 'is up-to-date',
|
346 | 343 | btnLabel_moreAIextensions: 'More AI Extensions',
|
347 | 344 | btnLabel_rateUs: 'Rate Us',
|
| 345 | + btnLabel_discuss: 'Discuss', |
348 | 346 | btnLabel_getSupport: 'Get Support',
|
349 | 347 | btnLabel_checkForUpdates: 'Check for Updates',
|
350 | 348 | btnLabel_update: 'Update',
|
|
625 | 623 | [ // buttons
|
626 | 624 | function checkForUpdates() { updateCheck() },
|
627 | 625 | function getSupport(){},
|
628 |
| - function rateUs() {}, |
| 626 | + function discuss() {}, |
629 | 627 | function moreAIextensions(){}
|
630 | 628 | ], '', 714 // set width
|
631 | 629 | )
|
|
642 | 640 | btn.style.cssText = 'height: 58px ; min-width: 136px ; text-align: center'
|
643 | 641 |
|
644 | 642 | // 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)) { |
646 | 644 | const btnClone = btn.cloneNode(true)
|
647 | 645 | 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 | + ]) |
653 | 650 | }
|
654 | 651 |
|
655 | 652 | // Prepend emoji + localize labels
|
656 | 653 | if (/updates/i.test(btn.textContent))
|
657 | 654 | btn.textContent = `🚀 ${app.msgs.btnLabel_checkForUpdates}`
|
658 | 655 | else if (/support/i.test(btn.textContent))
|
659 | 656 | 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}` |
662 | 659 | else if (/extensions/i.test(btn.textContent))
|
663 | 660 | btn.textContent = `🤖 ${app.msgs.btnLabel_moreAIextensions}`
|
664 | 661 |
|
|
690 | 687 | [ // buttons
|
691 | 688 | function paypal(){},
|
692 | 689 | function githubSponsors(){},
|
693 |
| - function cashApp(){}, |
694 |
| - function rateUs() { modals.safeWinOpen(app.urls.review.greasyFork) } |
| 690 | + function cashApp(){} |
695 | 691 | ], '', 478 // set width
|
696 | 692 | )
|
697 | 693 |
|
|
704 | 700 | btns.forEach((btn, idx) => {
|
705 | 701 |
|
706 | 702 | // 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)) { |
708 | 704 | const btnClone = btn.cloneNode(true)
|
709 | 705 | 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 | + ]) |
716 | 710 | }
|
717 | 711 |
|
718 | 712 | // Format buttons
|
|
722 | 716 | + ' width: 107px ; line-height: 14px'
|
723 | 717 | if (idx == btns.length -1) // de-emphasize right-most button
|
724 | 718 | 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 |
727 | 719 | }
|
728 | 720 | })
|
729 | 721 |
|
|
0 commit comments