|
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.30.4 |
| 223 | +// @version 2025.1.30.5 |
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
|
|
787 | 787 | return style
|
788 | 788 | }
|
789 | 789 |
|
790 |
| - function addRisingParticles(targetNode) { // requires https://assets.aiwebextensions.com/styles/rising-particles/dist/<gray|white>.min.css |
| 790 | + function addRisingParticles(targetNode, { lightScheme = 'gray', darkScheme = 'white' } = {}) { |
| 791 | + // Requires https://assets.aiwebextensions.com/styles/rising-particles/dist/<lightScheme|darkScheme>.min.css |
| 792 | + |
791 | 793 | 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 | + const particlesDivsWrapper = document.createElement('div') |
| 795 | + particlesDivsWrapper.style.cssText = ( |
| 796 | + 'position: absolute ; top: 0 ; left: 0 ;' // hug targetNode's top-left corner |
794 | 797 | + 'height: 100% ; width: 100% ; border-radius: 15px ; overflow: clip ;' // bound innards exactly by targetNode
|
795 |
| - + 'z-index: -1'; // allow interactive elems to be clicked |
| 798 | + + 'z-index: -1' ); // allow interactive elems to be clicked |
796 | 799 | ['sm', 'med', 'lg'].forEach(particleSize => {
|
797 | 800 | const particlesDiv = document.createElement('div')
|
798 |
| - particlesDiv.id = `${ env.ui.scheme == 'dark' ? 'white' : 'gray' }-particles-${particleSize}` |
799 |
| - particlesDivsContainer.append(particlesDiv) |
| 801 | + particlesDiv.id = `${ env.ui.scheme == 'dark' ? darkScheme : lightScheme }-particles-${particleSize}` |
| 802 | + particlesDivsWrapper.append(particlesDiv) |
800 | 803 | })
|
801 |
| - targetNode.prepend(particlesDivsContainer) |
| 804 | + targetNode.prepend(particlesDivsWrapper) |
802 | 805 | }
|
803 | 806 |
|
804 | 807 | const toggles = {
|
|
0 commit comments