|
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.29.1 |
| 228 | +// @version 2025.1.29.2 |
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
|
|
243 | 243 | // @connect gm.autoclearchatgpt.com
|
244 | 244 | // @connect raw.githubusercontent.com
|
245 | 245 | // @require https://cdn.jsdelivr.net/npm/@kudoai/chatgpt.js@3.5.0/dist/chatgpt.min.js#sha256-+C0x4BOFQc38aZB3pvUC2THu+ZSvuCxRphGdtRLjCDg=
|
246 |
| -// @resource brsCSS https://assets.aiwebextensions.com/styles/rising-stars/dist/black.min.css?v=3289404#sha256-CTj6Ndngq+TsPlNpQ6Ej39PQKSDpmxyKUFohhc91ruQ= |
247 |
| -// @resource wrsCSS https://assets.aiwebextensions.com/styles/rising-stars/dist/white.min.css?v=3289404#sha256-tOOIvIe6O5/x2A5E7s9kP4+zw0d4EEDfRgXQLq2KwLs= |
| 246 | +// @resource brpCSS https://assets.aiwebextensions.com/styles/rising-particles/dist/black.min.css?v=727feff#sha256-7ycEGqwB5zKKoaW3olhaFP8yj0KEXe+Ks2kS/4iRGZM= |
| 247 | +// @resource wrpCSS https://assets.aiwebextensions.com/styles/rising-particles/dist/white.min.css?v=727feff#sha256-6xBXczm7yM1MZ/v0o1KVFfJGehHk47KJjq8oTktH4KE= |
248 | 248 | // @grant GM_setValue
|
249 | 249 | // @grant GM_getValue
|
250 | 250 | // @grant GM_registerMenuCommand
|
|
499 | 499 | alert(title = '', msg = '', btns = '', checkbox = '', width = '') { // generic one from chatgpt.alert()
|
500 | 500 | const alertID = chatgpt.alert(title, msg, btns, checkbox, width),
|
501 | 501 | alert = document.getElementById(alertID).firstChild
|
502 |
| - this.init(alert) // add classes + starry bg |
| 502 | + this.init(alert) // add classes + rising particles bg |
503 | 503 | return alert
|
504 | 504 | },
|
505 | 505 |
|
506 | 506 | open(modalType, modalSubType) {
|
507 | 507 | const modal = modalSubType ? this[modalType][modalSubType]() : this[modalType]() // show modal
|
508 | 508 | if (!modal) return // since no div returned
|
509 | 509 | this.stack.unshift(modalSubType ? `${modalType}_${modalSubType}` : modalType) // add to stack
|
510 |
| - this.init(modal) // add classes + starry bg |
| 510 | + this.init(modal) // add classes + rising particles bg |
511 | 511 | this.observeRemoval(modal, modalType, modalSubType) // to maintain stack for proper nav
|
512 | 512 | },
|
513 | 513 |
|
514 | 514 | init(modal) {
|
515 | 515 | if (!this.styles) this.stylize() // to init/append stylesheet
|
516 | 516 | modal.classList.add('no-user-select', this.class) ; modal.parentNode.classList.add(`${this.class}-bg`)
|
517 |
| - fillStarryBG(modal) // add starry bg |
| 517 | + addRisingParticles(modal) |
518 | 518 | },
|
519 | 519 |
|
520 | 520 | stylize() {
|
|
753 | 753 | return style
|
754 | 754 | }
|
755 | 755 |
|
756 |
| - function fillStarryBG(targetNode) { // requires https://assets.aiwebextensions.com/styles/rising-stars/css/<black|white>.min.css |
757 |
| - if (targetNode.querySelector('[id*=stars]')) return |
758 |
| - const starsDivsContainer = document.createElement('div') |
759 |
| - starsDivsContainer.style.cssText = 'position: absolute ; top: 0 ; left: 0 ;' // hug targetNode's top-left corner |
| 756 | + function addRisingParticles(targetNode) { // requires https://assets.aiwebextensions.com/styles/rising-particles/dist/<black|white>.min.css |
| 757 | + if (targetNode.querySelector('[id*=particles]')) return |
| 758 | + const particlesDivsContainer = document.createElement('div') |
| 759 | + particlesDivsContainer.style.cssText = 'position: absolute ; top: 0 ; left: 0 ;' // hug targetNode's top-left corner |
760 | 760 | + 'height: 100% ; width: 100% ; border-radius: 15px ; overflow: clip ;' // bound innards exactly by targetNode
|
761 | 761 | + 'z-index: -1'; // allow interactive elems to be clicked
|
762 |
| - ['sm', 'med', 'lg'].forEach(starSize => { |
763 |
| - const starsDiv = document.createElement('div') |
764 |
| - starsDiv.id = `${ env.ui.scheme == 'dark' ? 'white' : 'black' }-stars-${starSize}` |
765 |
| - starsDivsContainer.append(starsDiv) |
| 762 | + ['sm', 'med', 'lg'].forEach(particleSize => { |
| 763 | + const particlesDiv = document.createElement('div') |
| 764 | + particlesDiv.id = `${ env.ui.scheme == 'dark' ? 'white' : 'black' }-particles-${particleSize}` |
| 765 | + particlesDivsContainer.append(particlesDiv) |
766 | 766 | })
|
767 |
| - targetNode.prepend(starsDivsContainer) |
| 767 | + targetNode.prepend(particlesDivsContainer) |
768 | 768 | }
|
769 | 769 |
|
770 | 770 | const toggles = {
|
|
929 | 929 | await chatgpt.sidebar.isLoaded()
|
930 | 930 | env.ui.firstLink = chatgpt.getNewChatLink();
|
931 | 931 |
|
932 |
| - // Add STARS styles |
933 |
| - ['brs', 'wrs'].forEach(cssType => document.head.append(createStyle(GM_getResourceText(`${cssType}CSS`)))) |
| 932 | + // Add RISING PARTICLES styles |
| 933 | + ['brp', 'wrp'].forEach(cssType => document.head.append(createStyle(GM_getResourceText(`${cssType}CSS`)))) |
934 | 934 |
|
935 | 935 | toggles.sidebar.insert()
|
936 | 936 |
|
|
0 commit comments