|
148 | 148 | // @description:zu Yengeza izimpendulo ze-AI ku-Brave Search (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.bravegpt.com/images/icons/app/icon48.png?v=e8ca7c2 |
154 | 154 | // @icon64 https://assets.bravegpt.com/images/icons/app/icon64.png?v=e8ca7c2 |
|
2067 | 2067 | document.removeEventListener(eventType, modals.handlers.drag[eventType])) |
2068 | 2068 | modals.draggingModal = null |
2069 | 2069 | } |
2070 | | - |
2071 | 2070 | } |
2072 | 2071 | }, |
2073 | 2072 |
|
|
2092 | 2091 | // Hack BG |
2093 | 2092 | dom.addRisingParticles(modal) |
2094 | 2093 | setTimeout(() => { // dim bg |
2095 | | - modal.parentNode.style.backgroundColor = `rgba(67,70,72,${ |
2096 | | - env.ui.app.scheme == 'dark' ? 0.62 : 0.33 })` |
| 2094 | + modal.parentNode.style.backgroundColor = `rgba(67,70,72,${ env.ui.app.scheme == 'dark' ? 0.62 : 0.33 })` |
2097 | 2095 | modal.parentNode.classList.add('animated') |
2098 | 2096 | }, 100) // delay for transition fx |
2099 | 2097 | }, |
|
2500 | 2498 | }, |
2501 | 2499 |
|
2502 | 2500 | stylize() { |
| 2501 | + const { scheme: appScheme } = env.ui.app |
2503 | 2502 | if (!this.styles?.isConnected) document.head.append(this.styles ||= dom.create.style()) |
2504 | 2503 | this.styles.textContent = ( |
2505 | 2504 |
|
|
2521 | 2520 | ${ env.browser.isPhone ? 'padding: 25px 31px !important' : '' } |
2522 | 2521 | } |
2523 | 2522 | .chatgpt-modal p { margin: 14px 0 -20px 4px ; font-size: 18px } /* pos/size modal msg */ |
2524 | | - .chatgpt-modal a { color: #${ env.ui.app.scheme == 'dark' ? '00cfff' : '1e9ebb' } !important } |
| 2523 | + .chatgpt-modal a { color: #${ appScheme == 'dark' ? '00cfff' : '1e9ebb' } !important } |
2525 | 2524 | .modal-buttons { |
2526 | 2525 | margin: 38px 0 1px ${ env.browser.isMobile ? 0 : -7 }px !important ; width: 100% } |
2527 | 2526 | .chatgpt-modal button { /* this.alert() buttons */ |
2528 | 2527 | min-width: 123px ; padding: ${ env.browser.isMobile ? '5px' : '4px 8px' } !important ; |
2529 | 2528 | cursor: pointer ; border-radius: 0 !important ; height: 39px ; |
2530 | | - border: 1px solid ${ env.ui.app.scheme == 'dark' ? 'white' : 'black' }!important } |
| 2529 | + border: 1px solid ${ appScheme == 'dark' ? 'white' : 'black' }!important } |
2531 | 2530 | .primary-modal-btn { background: black !important ; color: white !important } |
2532 | 2531 | .chatgpt-modal button:hover { |
2533 | | - ${ env.ui.app.scheme == 'light' ? // reduce intensity of light scheme hover glow |
| 2532 | + ${ appScheme == 'light' ? // reduce intensity of light scheme hover glow |
2534 | 2533 | '--btn-shadow: 2px 1px 43px #00cfff70 ;' : '' } |
2535 | 2534 | color: inherit !important ; background-color: inherit !important /* remove color hacks */ |
2536 | 2535 | } |
2537 | | - ${ env.ui.app.scheme == 'dark' ? // darkmode chatgpt.alert() styles |
| 2536 | + ${ appScheme == 'dark' ? // darkmode chatgpt.alert() styles |
2538 | 2537 | `.chatgpt-modal > div, .chatgpt-modal button:not(.primary-modal-btn) { |
2539 | 2538 | color: white !important } |
2540 | 2539 | .primary-modal-btn { background: #00cfff !important ; color: black !important } |
|
2546 | 2545 | cursor: pointer ; width: 33px ; height: 33px ; border-radius: 20px |
2547 | 2546 | } |
2548 | 2547 | [class*=modal-close-btn] path {${ |
2549 | | - env.ui.app.scheme == 'dark' ? 'stroke: white ; fill: white' |
2550 | | - : 'stroke: #9f9f9f ; fill: #9f9f9f' }} |
2551 | | - ${ env.ui.app.scheme == 'dark' ? // invert dark mode hover paths |
| 2548 | + appScheme == 'dark' ? 'stroke: white ; fill: white' : 'stroke: #9f9f9f ; fill: #9f9f9f' }} |
| 2549 | + ${ appScheme == 'dark' ? // invert dark mode hover paths |
2552 | 2550 | '[class*=modal-close-btn]:hover path { stroke: black ; fill: black }' : '' } |
2553 | 2551 | [class*=modal-close-btn]:hover { background-color: #f2f2f2 } /* hover underlay */ |
2554 | 2552 | [class*=modal-close-btn] svg { margin: 11.5px } /* center SVG for hover underlay */ |
|
2571 | 2569 | position: absolute ; /* to be click-draggable */ |
2572 | 2570 | opacity: 0 ; /* to fade-in */ |
2573 | 2571 | background-image: linear-gradient(180deg, ${ |
2574 | | - env.ui.app.scheme == 'dark' ? '#99a8a6 -200px, black 200px' |
2575 | | - : '#b6ebff -296px, white 171px' }) ; |
2576 | | - border: 1px solid ${ env.ui.app.scheme == 'dark' ? 'white' : '#b5b5b5' } !important ; |
2577 | | - color: ${ env.ui.app.scheme == 'dark' ? 'white' : 'black' }; |
| 2572 | + appScheme == 'dark' ? '#99a8a6 -200px, black 200px' : '#b6ebff -296px, white 171px' }) ; |
| 2573 | + border: 1px solid ${ appScheme == 'dark' ? 'white' : '#b5b5b5' } !important ; |
| 2574 | + color: ${ appScheme == 'dark' ? 'white' : 'black' }; |
2578 | 2575 | transform: translateX(-3px) translateY(7px) ; /* offset to move-in from */ |
2579 | 2576 | transition: var(--fg-transition) ; /* fade-in + move-in */ |
2580 | 2577 | -webkit-transition: var(--fg-transition) ; -moz-transition: var(--fg-transition) ; |
|
2593 | 2590 | font-family: var(--brand-font) ; |
2594 | 2591 | min-width: ${ env.browser.isPortrait ? 288 : 758 }px ; max-width: 75vw ; margin: 12px 23px ; |
2595 | 2592 | word-wrap: break-word ; border-radius: 15px ; |
2596 | | - ${ env.ui.app.scheme == 'dark' ? 'stroke: white ; fill: white' : 'stroke: black ; fill: black' }; |
| 2593 | + ${ appScheme == 'dark' ? 'stroke: white ; fill: white' : 'stroke: black ; fill: black' }; |
2597 | 2594 | --shadow: 0 30px 60px rgba(0,0,0,0.12) ; |
2598 | 2595 | box-shadow: var(--shadow) ; -webkit-box-shadow: var(--shadow) ; -moz-box-shadow: var(--shadow) } |
2599 | 2596 | #${app.slug}-settings-title { |
|
2606 | 2603 | list-style: none ; padding: 0 ; margin: 0 ; /* hide bullets, override Brave ul margins */ |
2607 | 2604 | width: ${ env.browser.isPortrait ? 100 : 50 }% } /* set width based on column cnt */ |
2608 | 2605 | ${ 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' }}`} |
| 2606 | + border-right: 1px dotted ${ appScheme == 'dark' ? 'white' : 'black' }}`} |
2610 | 2607 | #${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)' }; |
| 2608 | + color: ${ appScheme == 'dark' ? 'rgb(255,255,255,0.65)' : 'rgba(0,0,0,0.45)' }; |
| 2609 | + fill: ${ appScheme == 'dark' ? 'rgb(255,255,255,0.65)' : 'rgba(0,0,0,0.45)' }; |
| 2610 | + stroke: ${ appScheme == 'dark' ? 'rgb(255,255,255,0.65)' : 'rgba(0,0,0,0.45)' }; |
2614 | 2611 | height: 37px ; padding: 7px 10px ; font-size: 14.5px ; |
2615 | | - border-bottom: 1px dotted ${ env.ui.app.scheme == 'dark' ? 'white' : 'black' }; /* add separators */ |
| 2612 | + border-bottom: 1px dotted ${ appScheme == 'dark' ? 'white' : 'black' }; /* add separators */ |
2616 | 2613 | border-radius: 3px ; /* slightly round highlight strip */ |
2617 | 2614 | ${ config.fgAnimationsDisabled || env.browser.isMobile ? '' : |
2618 | 2615 | `transition: var(--settings-li-transition) ; |
|
2621 | 2618 | -o-transition: var(--settings-li-transition) ; |
2622 | 2619 | -ms-transition: var(--settings-li-transition)` }} |
2623 | 2620 | #${app.slug}-settings li.active { |
2624 | | - color: ${ env.ui.app.scheme == 'dark' ? 'rgb(255,255,255)' : 'rgba(0,0,0)' }; /* for text */ |
2625 | | - fill: ${ env.ui.app.scheme == 'dark' ? 'rgb(255,255,255)' : 'rgba(0,0,0)' }; /* for icons */ |
2626 | | - stroke: ${ env.ui.app.scheme == 'dark' ? 'rgb(255,255,255)' : 'rgba(0,0,0)' }} /* for icons */ |
| 2621 | + color: ${ appScheme == 'dark' ? 'rgb(255,255,255)' : 'rgba(0,0,0)' }; /* for text */ |
| 2622 | + fill: ${ appScheme == 'dark' ? 'rgb(255,255,255)' : 'rgba(0,0,0)' }; /* for icons */ |
| 2623 | + stroke: ${ appScheme == 'dark' ? 'rgb(255,255,255)' : 'rgba(0,0,0)' }} /* for icons */ |
2627 | 2624 | #${app.slug}-settings li label { padding-right: 20px } /* right-pad labels so toggles don't hug */ |
2628 | 2625 | #${app.slug}-settings li:last-of-type { border-bottom: none } /* remove last bottom-border /* |
2629 | 2626 | #${app.slug}-settings li, #${app.slug}-settings li label { cursor: pointer } /* add finger on hover */ |
|
2649 | 2646 | ${ config.fgAnimationsDisabled ? '' // spin cycle arrows icon when scheme is Auto |
2650 | 2647 | : `#scheme-settings-entry svg[class*=arrowsCyclic],' |
2651 | 2648 | + '.chatgpt-notif svg[class*=arrowsCyclic] { animation: rotate 5s linear infinite }`} |
2652 | | - #about-settings-entry span { color: ${ env.ui.app.scheme == 'dark' ? '#28ee28' : 'green' }} |
| 2649 | + #about-settings-entry span { color: ${ appScheme == 'dark' ? '#28ee28' : 'green' }} |
2653 | 2650 | #about-settings-entry > span { /* outer About status span */ |
2654 | 2651 | width: ${ env.browser.isPortrait ? '15vw' : '95px' }; height: 20px ; overflow: hidden ; |
2655 | 2652 | ${ config.fgAnimationsDisabled ? '' : // fade edges |
|
2661 | 2658 | text-wrap: nowrap ; ${ |
2662 | 2659 | config.fgAnimationsDisabled ? '' : 'animation: ticker linear 75s infinite' }} |
2663 | 2660 | @keyframes ticker { 0% { transform: translateX(100%) } 100% { transform: translateX(-2000%) }} |
2664 | | - .about-em { color: ${ env.ui.app.scheme == 'dark' ? 'white' : 'green' } !important }` |
| 2661 | + .about-em { color: ${ appScheme == 'dark' ? 'white' : 'green' } !important }` |
2665 | 2662 | ) |
2666 | 2663 | }, |
2667 | 2664 |
|
|
0 commit comments