|
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.29.2 |
| 223 | +// @version 2025.1.29.3 |
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
|
|
239 | 239 | // @connect gm.chatgptautorefresh.com
|
240 | 240 | // @connect raw.githubusercontent.com
|
241 | 241 | // @require https://cdn.jsdelivr.net/npm/@kudoai/chatgpt.js@3.5.0/dist/chatgpt.min.js#sha256-+C0x4BOFQc38aZB3pvUC2THu+ZSvuCxRphGdtRLjCDg=
|
242 |
| -// @resource brsCSS https://assets.aiwebextensions.com/styles/rising-stars/dist/black.min.css?v=3289404#sha256-CTj6Ndngq+TsPlNpQ6Ej39PQKSDpmxyKUFohhc91ruQ= |
243 |
| -// @resource wrsCSS https://assets.aiwebextensions.com/styles/rising-stars/dist/white.min.css?v=3289404#sha256-tOOIvIe6O5/x2A5E7s9kP4+zw0d4EEDfRgXQLq2KwLs= |
| 242 | +// @resource brpCSS https://assets.aiwebextensions.com/styles/rising-particles/dist/black.min.css?v=727feff#sha256-7ycEGqwB5zKKoaW3olhaFP8yj0KEXe+Ks2kS/4iRGZM= |
| 243 | +// @resource wrpCSS https://assets.aiwebextensions.com/styles/rising-particles/dist/white.min.css?v=727feff#sha256-6xBXczm7yM1MZ/v0o1KVFfJGehHk47KJjq8oTktH4KE= |
244 | 244 | // @grant GM_setValue
|
245 | 245 | // @grant GM_getValue
|
246 | 246 | // @grant GM_registerMenuCommand
|
|
533 | 533 | alert(title = '', msg = '', btns = '', checkbox = '', width = '') { // generic one from chatgpt.alert()
|
534 | 534 | const alertID = chatgpt.alert(title, msg, btns, checkbox, width),
|
535 | 535 | alert = document.getElementById(alertID).firstChild
|
536 |
| - this.init(alert) // add classes + starry bg |
| 536 | + this.init(alert) // add classes + rising particles bg |
537 | 537 | return alert
|
538 | 538 | },
|
539 | 539 |
|
540 | 540 | open(modalType, modalSubType) {
|
541 | 541 | const modal = modalSubType ? this[modalType][modalSubType]() : this[modalType]() // show modal
|
542 | 542 | if (!modal) return // since no div returned
|
543 | 543 | this.stack.unshift(modalSubType ? `${modalType}_${modalSubType}` : modalType) // add to stack
|
544 |
| - this.init(modal) // add classes + starry bg |
| 544 | + this.init(modal) // add classes + rising particles bg |
545 | 545 | this.observeRemoval(modal, modalType, modalSubType) // to maintain stack for proper nav
|
546 | 546 | },
|
547 | 547 |
|
548 | 548 | init(modal) {
|
549 | 549 | if (!this.styles) this.stylize() // to init/append stylesheet
|
550 | 550 | modal.classList.add('no-user-select', this.class) ; modal.parentNode.classList.add(`${this.class}-bg`)
|
551 |
| - fillStarryBG(modal) // add starry bg |
| 551 | + addRisingParticles(modal) |
552 | 552 | },
|
553 | 553 |
|
554 | 554 | stylize() {
|
|
787 | 787 | return style
|
788 | 788 | }
|
789 | 789 |
|
790 |
| - function fillStarryBG(targetNode) { // requires https://assets.aiwebextensions.com/styles/rising-stars/css/<black|white>.min.css |
791 |
| - if (targetNode.querySelector('[id*=stars]')) return |
792 |
| - const starsDivsContainer = document.createElement('div') |
793 |
| - starsDivsContainer.style.cssText = 'position: absolute ; top: 0 ; left: 0 ;' // hug targetNode's top-left corner |
| 790 | + function addRisingParticles(targetNode) { // requires https://assets.aiwebextensions.com/styles/rising-particles/dist/<black|white>.min.css |
| 791 | + if (targetNode.querySelector('[id*=particles]')) return |
| 792 | + const particlesDivsContainer = document.createElement('div') |
| 793 | + particlesDivsContainer.style.cssText = 'position: absolute ; top: 0 ; left: 0 ;' // hug targetNode's top-left corner |
794 | 794 | + 'height: 100% ; width: 100% ; border-radius: 15px ; overflow: clip ;' // bound innards exactly by targetNode
|
795 | 795 | + 'z-index: -1'; // allow interactive elems to be clicked
|
796 |
| - ['sm', 'med', 'lg'].forEach(starSize => { |
797 |
| - const starsDiv = document.createElement('div') |
798 |
| - starsDiv.id = `${ env.ui.scheme == 'dark' ? 'white' : 'black' }-stars-${starSize}` |
799 |
| - starsDivsContainer.append(starsDiv) |
| 796 | + ['sm', 'med', 'lg'].forEach(particleSize => { |
| 797 | + const particlesDiv = document.createElement('div') |
| 798 | + particlesDiv.id = `${ env.ui.scheme == 'dark' ? 'white' : 'black' }-particles-${particleSize}` |
| 799 | + particlesDivsContainer.append(particlesDiv) |
800 | 800 | })
|
801 |
| - targetNode.prepend(starsDivsContainer) |
| 801 | + targetNode.prepend(particlesDivsContainer) |
802 | 802 | }
|
803 | 803 |
|
804 | 804 | const toggles = {
|
|
949 | 949 | await chatgpt.sidebar.isLoaded()
|
950 | 950 | env.ui.firstLink = chatgpt.getNewChatLink();
|
951 | 951 |
|
952 |
| - // Add STARS styles |
953 |
| - ['brs', 'wrs'].forEach(cssType => document.head.append(createStyle(GM_getResourceText(`${cssType}CSS`)))) |
| 952 | + // Add RISING PARTICLES styles |
| 953 | + ['brp', 'wrp'].forEach(cssType => document.head.append(createStyle(GM_getResourceText(`${cssType}CSS`)))) |
954 | 954 |
|
955 | 955 | toggles.sidebar.insert()
|
956 | 956 |
|
|
0 commit comments