|
148 | 148 | // @description:zu Yengeza izimpendulo ze-AI ku-DuckDuckGo (inikwa amandla yi-GPT-4o!) |
149 | 149 | // @author KudoAI |
150 | 150 | // @namespace https://kudoai.com |
151 | | -// @version 2025.10.16 |
| 151 | +// @version 2025.10.16.1 |
152 | 152 | // @license MIT |
153 | 153 | // @icon https://assets.ddgpt.com/images/icons/app/icon48.png?v=533ce0f |
154 | 154 | // @icon64 https://assets.ddgpt.com/images/icons/app/icon64.png?v=533ce0f |
|
1986 | 1986 | // Re-style button cluster |
1987 | 1987 | const btnsDiv = feedbackModal.querySelector('.modal-buttons') |
1988 | 1988 | btnsDiv.style.cssText = `margin-top: 12px !important ; ${ env.browser.isPhone ? '' |
1989 | | - : 'flex-wrap: wrap ; justify-content: center ; gap: 9px' }` // gridify desktop btns |
| 1989 | + : 'flex-wrap: wrap ; justify-content: center ; gap: 9px' }` // gridify wide view btns |
1990 | 1990 |
|
1991 | 1991 | // Hack buttons |
1992 | 1992 | btns = btnsDiv.querySelectorAll('button') |
|
2072 | 2072 | document.removeEventListener(eventType, modals.handlers.drag[eventType])) |
2073 | 2073 | modals.draggingModal = null |
2074 | 2074 | } |
2075 | | - |
2076 | 2075 | } |
2077 | 2076 | }, |
2078 | 2077 |
|
|
2503 | 2502 | }, |
2504 | 2503 |
|
2505 | 2504 | stylize() { |
| 2505 | + const { scheme: appScheme } = env.ui.app |
2506 | 2506 | if (!this.styles?.isConnected) document.head.append(this.styles ||= dom.create.style()) |
2507 | 2507 | this.styles.textContent = ( |
2508 | 2508 |
|
|
2524 | 2524 | padding: 20px 25px 24px 31px !important /* increase alert padding */ |
2525 | 2525 | } |
2526 | 2526 | .chatgpt-modal p { margin: -8px 0 -14px 4px ; font-size: 1.55rem } /* pos/size modal msg */ |
2527 | | - .chatgpt-modal a { color: #${ env.ui.app.scheme == 'dark' ? '00cfff' : '1e9ebb' } !important } |
| 2527 | + .chatgpt-modal a { color: #${ appScheme == 'dark' ? '00cfff' : '1e9ebb' } !important } |
2528 | 2528 | .modal-buttons { |
2529 | 2529 | margin: 24px -5px -3px ${ env.browser.isMobile ? -5 : -11 }px !important ; width: 100% } |
2530 | 2530 | .chatgpt-modal button { /* this.alert() buttons */ |
2531 | 2531 | min-width: 121px ; padding: ${ env.browser.isMobile ? '7px' : '4px 15px' } !important ; |
2532 | 2532 | cursor: pointer ; border-radius: 0 !important ; height: 39px ; |
2533 | | - border: 1px solid ${ env.ui.app.scheme == 'dark' ? 'white' : 'black' }!important ; |
2534 | | - ${ env.ui.app.scheme == 'dark' ? 'background: none ; color: white' : '' }} |
| 2533 | + border: 1px solid ${ appScheme == 'dark' ? 'white' : 'black' }!important ; |
| 2534 | + ${ appScheme == 'dark' ? 'background: none ; color: white' : '' }} |
2535 | 2535 | .primary-modal-btn { background: black !important ; color: white !important } |
2536 | 2536 | .chatgpt-modal button:hover { |
2537 | | - ${ env.ui.app.scheme == 'light' ? // reduce intensity of light scheme hover glow |
| 2537 | + ${ appScheme == 'light' ? // reduce intensity of light scheme hover glow |
2538 | 2538 | '--btn-shadow: 2px 1px 43px #00cfff70 ;' : '' } |
2539 | 2539 | color: inherit !important ; background-color: inherit !important /* remove color hacks */ |
2540 | 2540 | } |
2541 | | - ${ env.ui.app.scheme == 'dark' ? // darkmode chatgpt.alert() styles |
| 2541 | + ${ appScheme == 'dark' ? // darkmode chatgpt.alert() styles |
2542 | 2542 | `.chatgpt-modal > div, .chatgpt-modal button:not(.primary-modal-btn) { |
2543 | 2543 | color: white !important } |
2544 | 2544 | .primary-modal-btn { background: #00cfff !important ; color: black !important } |
|
2549 | 2549 | position: absolute !important ; float: right ; top: 14px !important ; right: 16px !important ; |
2550 | 2550 | cursor: pointer ; width: 33px ; height: 33px ; border-radius: 20px |
2551 | 2551 | } |
2552 | | - [class*=modal-close-btn] path {${ env.ui.app.scheme == 'dark' ? 'stroke: white ; fill: white' |
2553 | | - : 'stroke: #9f9f9f ; fill: #9f9f9f' }} |
2554 | | - ${ env.ui.app.scheme == 'dark' ? // invert dark mode hover paths |
| 2552 | + [class*=modal-close-btn] path {${ appScheme == 'dark' ? 'stroke: white ; fill: white' |
| 2553 | + : 'stroke: #9f9f9f ; fill: #9f9f9f' }} |
| 2554 | + ${ appScheme == 'dark' ? // invert dark mode hover paths |
2555 | 2555 | '[class*=modal-close-btn]:hover path { stroke: black ; fill: black }' : '' } |
2556 | 2556 | [class*=modal-close-btn]:hover { background-color: #f2f2f2 } /* hover underlay */ |
2557 | 2557 | [class*=modal-close-btn] svg { margin: 11.5px } /* center SVG for hover underlay */ |
|
2574 | 2574 | position: absolute ; /* to be click-draggable */ |
2575 | 2575 | opacity: 0 ; /* to fade-in */ |
2576 | 2576 | background-image: linear-gradient(180deg, ${ |
2577 | | - env.ui.app.scheme == 'dark' ? '#99a8a6 -200px, black 200px' |
2578 | | - : '#b6ebff -296px, white 171px' }) ; |
2579 | | - border: 1px solid ${ env.ui.app.scheme == 'dark' ? 'white' : '#b5b5b5' } !important ; |
2580 | | - color: ${ env.ui.app.scheme == 'dark' ? 'white' : 'black' }; |
| 2577 | + appScheme == 'dark' ? '#99a8a6 -200px, black 200px' : '#b6ebff -296px, white 171px' }) ; |
| 2578 | + border: 1px solid ${ appScheme == 'dark' ? 'white' : '#b5b5b5' } !important ; |
| 2579 | + color: ${ appScheme == 'dark' ? 'white' : 'black' }; |
2581 | 2580 | transform: translateX(-3px) translateY(7px) ; /* offset to move-in from */ |
2582 | 2581 | transition: var(--fg-transition) ; /* fade-in + move-in */ |
2583 | 2582 | -webkit-transition: var(--fg-transition) ; -moz-transition: var(--fg-transition) ; |
|
2595 | 2594 | + `#${app.slug}-settings { |
2596 | 2595 | min-width: ${ env.browser.isPortrait ? 288 : 698 }px ; max-width: 75vw ; |
2597 | 2596 | word-wrap: break-word ; border-radius: 15px ; |
2598 | | - ${ env.ui.app.scheme == 'dark' ? 'stroke: white ; fill: white' : 'stroke: black ; fill: black' }; |
| 2597 | + ${ appScheme == 'dark' ? 'stroke: white ; fill: white' : 'stroke: black ; fill: black' }; |
2599 | 2598 | --shadow: 0 30px 60px rgba(0,0,0,0.12) ; |
2600 | 2599 | box-shadow: var(--shadow) ; -webkit-box-shadow: var(--shadow) ; -moz-box-shadow: var(--shadow) } |
2601 | 2600 | #${app.slug}-settings-title { |
|
2606 | 2605 | list-style: none ; padding: 0 ; margin-bottom: 2px ; /* hide bullets, close bottom gap */ |
2607 | 2606 | width: ${ env.browser.isPortrait ? 100 : 50 }% } /* set width based on column cnt */ |
2608 | 2607 | ${ env.browser.isPhone ? '' : `#${app.slug}-settings ul:first-of-type { /* color desktop middle sep */ |
2609 | | - border-right: 1px dotted ${ env.ui.app.scheme == 'dark' ? 'white' : 'black' }}`} |
| 2608 | + border-right: 1px dotted ${ appScheme == 'dark' ? 'white' : 'black' }}`} |
2610 | 2609 | #${app.slug}-settings li { |
2611 | | - color: ${ env.ui.app.scheme == 'dark' ? 'rgb(255,255,255,0.65)' : 'rgba(0,0,0,0.45)' }; |
2612 | | - fill: ${ env.ui.app.scheme == 'dark' ? 'rgb(255,255,255,0.65)' : 'rgba(0,0,0,0.45)' }; |
2613 | | - stroke: ${ env.ui.app.scheme == 'dark' ? 'rgb(255,255,255,0.65)' : 'rgba(0,0,0,0.45)' }; |
| 2610 | + color: ${ appScheme == 'dark' ? 'rgb(255,255,255,0.65)' : 'rgba(0,0,0,0.45)' }; |
| 2611 | + fill: ${ appScheme == 'dark' ? 'rgb(255,255,255,0.65)' : 'rgba(0,0,0,0.45)' }; |
| 2612 | + stroke: ${ appScheme == 'dark' ? 'rgb(255,255,255,0.65)' : 'rgba(0,0,0,0.45)' }; |
2614 | 2613 | height: 25px ; padding: 4px 10px ; font-size: 14.5px ; |
2615 | | - border-bottom: 1px dotted ${ env.ui.app.scheme == 'dark' ? 'white' : 'black' }; /* add separator */ |
| 2614 | + border-bottom: 1px dotted ${ appScheme == 'dark' ? 'white' : 'black' }; /* add separator */ |
2616 | 2615 | border-radius: 3px ; /* slightly round highlight strip */ |
2617 | 2616 | ${ config.fgAnimationsDisabled || env.browser.isMobile ? '' : |
2618 | 2617 | `transition: var(--settings-li-transition) ; |
|
2621 | 2620 | -o-transition: var(--settings-li-transition) ; |
2622 | 2621 | -ms-transition: var(--settings-li-transition)` }} |
2623 | 2622 | #${app.slug}-settings li.active { |
2624 | | - color: ${ env.ui.app.scheme == 'dark' ? 'rgb(255,255,255)' : 'rgba(0,0,0)' }; |
2625 | | - fill: ${ env.ui.app.scheme == 'dark' ? 'rgb(255,255,255)' : 'rgba(0,0,0)' }; |
2626 | | - stroke: ${ env.ui.app.scheme == 'dark' ? 'rgb(255,255,255)' : 'rgba(0,0,0)' }} |
| 2623 | + color: ${ appScheme == 'dark' ? 'rgb(255,255,255)' : 'rgba(0,0,0)' }; |
| 2624 | + fill: ${ appScheme == 'dark' ? 'rgb(255,255,255)' : 'rgba(0,0,0)' }; |
| 2625 | + stroke: ${ appScheme == 'dark' ? 'rgb(255,255,255)' : 'rgba(0,0,0)' }} |
2627 | 2626 | #${app.slug}-settings li label { padding-right: 20px } /* right-pad labels so toggles don't hug */ |
2628 | 2627 | #${app.slug}-settings li:last-of-type { border-bottom: none } /* remove last bottom-border */ |
2629 | 2628 | #${app.slug}-settings li, #${app.slug}-settings li label { cursor: pointer } /* add finger on hover */ |
|
2649 | 2648 | ${ config.fgAnimationsDisabled ? '' // spin cycle arrows icon when scheme is Auto |
2650 | 2649 | : `#scheme-settings-entry svg[class*=arrowsCyclic], |
2651 | 2650 | .chatgpt-notif svg[class*=arrowsCyclic] { animation: rotate 5s linear infinite }`} |
2652 | | - #about-settings-entry span { color: ${ env.ui.app.scheme == 'dark' ? '#28ee28' : 'green' }} |
| 2651 | + #about-settings-entry span { color: ${ appScheme == 'dark' ? '#28ee28' : 'green' }} |
2653 | 2652 | #about-settings-entry > span { /* outer About status span */ |
2654 | 2653 | width: ${ env.browser.isPortrait ? '15vw' : '95px' }; height: 20px ; overflow: hidden ; |
2655 | 2654 | ${ config.fgAnimationsDisabled ? '' : // fade edges |
|
2661 | 2660 | text-wrap: nowrap ; ${ |
2662 | 2661 | config.fgAnimationsDisabled ? '' : 'animation: ticker linear 75s infinite' }} |
2663 | 2662 | @keyframes ticker { 0% { transform: translateX(100%) } 100% { transform: translateX(-2000%) }} |
2664 | | - .about-em { color: ${ env.ui.app.scheme == 'dark' ? 'white' : 'green' } !important }` |
| 2663 | + .about-em { color: ${ appScheme == 'dark' ? 'white' : 'green' } !important }` |
2665 | 2664 | ) |
2666 | 2665 | }, |
2667 | 2666 |
|
|
0 commit comments