|
149 | 149 | // @description:zu Yengeza izimpendulo ze-AI ku-Google Search (inikwa amandla yi-Google Gemma + GPT-4o!) |
150 | 150 | // @author KudoAI |
151 | 151 | // @namespace https://kudoai.com |
152 | | -// @version 2025.10.16 |
| 152 | +// @version 2025.10.16.1 |
153 | 153 | // @license MIT |
154 | 154 | // @icon data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%22170.667%22%20height=%22170.667%22%3E%3Cstyle%3E:root%7B--fill:%23000%7D@media%20(prefers-color-scheme:dark)%7B:root%7B--fill:%23fff%7D%7D%3C/style%3E%3Cpath%20fill=%22var(--fill)%22%20d=%22M82.346%20159.79c-18.113-1.815-31.78-9.013-45.921-24.184C23.197%20121.416%2017.333%20106.18%2017.333%2086c0-21.982%205.984-36.245%2021.87-52.131C55.33%2017.74%2069.27%2011.867%2091.416%2011.867c17.574%200%2029.679%203.924%2044.309%2014.363l8.57%206.116-8.705%208.705-8.704%208.704-4.288-3.608c-13.91-11.704-35.932-14.167-53.085-5.939-3.4%201.631-9.833%206.601-14.297%2011.045C44.669%2061.753%2040.95%2070.811%2040.95%2086c0%2014.342%203.594%2023.555%2013.26%2033.995%2019.088%2020.618%2048.46%2022.539%2070.457%204.608l5.333-4.348%2011.333%203.844c6.234%202.114%2011.54%203.857%2011.791%203.873.252.015-2.037%203.008-5.087%206.65-6.343%207.577-20.148%2017.217-30.493%2021.295-8.764%203.454-23.358%205.06-35.198%203.873zM92%2086.333V74.667h60.648l-11.41%2011.41-11.411%2011.41-18.914.257L92%2098z%22/%3E%3C/svg%3E |
155 | 155 | // @icon64 data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%22170.667%22%20height=%22170.667%22%3E%3Cstyle%3E:root%7B--fill:%23000%7D@media%20(prefers-color-scheme:dark)%7B:root%7B--fill:%23fff%7D%7D%3C/style%3E%3Cpath%20fill=%22var(--fill)%22%20d=%22M82.346%20159.79c-18.113-1.815-31.78-9.013-45.921-24.184C23.197%20121.416%2017.333%20106.18%2017.333%2086c0-21.982%205.984-36.245%2021.87-52.131C55.33%2017.74%2069.27%2011.867%2091.416%2011.867c17.574%200%2029.679%203.924%2044.309%2014.363l8.57%206.116-8.705%208.705-8.704%208.704-4.288-3.608c-13.91-11.704-35.932-14.167-53.085-5.939-3.4%201.631-9.833%206.601-14.297%2011.045C44.669%2061.753%2040.95%2070.811%2040.95%2086c0%2014.342%203.594%2023.555%2013.26%2033.995%2019.088%2020.618%2048.46%2022.539%2070.457%204.608l5.333-4.348%2011.333%203.844c6.234%202.114%2011.54%203.857%2011.791%203.873.252.015-2.037%203.008-5.087%206.65-6.343%207.577-20.148%2017.217-30.493%2021.295-8.764%203.454-23.358%205.06-35.198%203.873zM92%2086.333V74.667h60.648l-11.41%2011.41-11.411%2011.41-18.914.257L92%2098z%22/%3E%3C/svg%3E |
|
2243 | 2243 | document.removeEventListener(eventType, modals.handlers.drag[eventType])) |
2244 | 2244 | modals.draggingModal = null |
2245 | 2245 | } |
2246 | | - |
2247 | 2246 | } |
2248 | 2247 | }, |
2249 | 2248 |
|
|
2675 | 2674 | }, |
2676 | 2675 |
|
2677 | 2676 | stylize() { |
| 2677 | + const { scheme: appScheme } = env.ui.app |
2678 | 2678 | if (!this.styles?.isConnected) document.head.append(this.styles ||= dom.create.style()) |
2679 | 2679 | this.styles.textContent = ( |
2680 | 2680 |
|
|
2701 | 2701 | .chatgpt-modal button { /* this.alert() buttons */ |
2702 | 2702 | min-width: 113px ; padding: ${ env.browser.isMobile ? '5px' : '4px 15px' } !important ; |
2703 | 2703 | cursor: pointer ; border-radius: 0 !important ; height: 39px ; |
2704 | | - border: 1px solid ${ env.ui.app.scheme == 'dark' ? 'white' : 'black' }!important } |
| 2704 | + border: 1px solid ${ appScheme == 'dark' ? 'white' : 'black' }!important } |
2705 | 2705 | .primary-modal-btn { background: black !important ; color: white !important } |
2706 | 2706 | .chatgpt-modal button:hover { |
2707 | | - ${ env.ui.app.scheme == 'light' ? // reduce intensity of light scheme hover glow |
| 2707 | + ${ appScheme == 'light' ? // reduce intensity of light scheme hover glow |
2708 | 2708 | '--btn-shadow: 2px 1px 43px #00cfff70 ;' : '' } |
2709 | 2709 | color: inherit !important ; background-color: inherit !important /* remove color hacks */ |
2710 | 2710 | } |
2711 | | - ${ env.ui.app.scheme == 'dark' ? // darkmode chatgpt.alert() styles |
| 2711 | + ${ appScheme == 'dark' ? // darkmode chatgpt.alert() styles |
2712 | 2712 | `.chatgpt-modal > div, .chatgpt-modal button:not(.primary-modal-btn) { |
2713 | 2713 | color: white !important } |
2714 | 2714 | .primary-modal-btn { background: #00cfff !important ; color: black !important } |
|
2719 | 2719 | position: absolute !important ; float: right ; top: 14px !important ; right: 16px !important ; |
2720 | 2720 | cursor: pointer ; width: 33px ; height: 33px ; border-radius: 20px |
2721 | 2721 | } |
2722 | | - [class*=modal-close-btn] path {${ env.ui.app.scheme == 'dark' ? 'stroke: white ; fill: white' |
2723 | | - : 'stroke: #9f9f9f ; fill: #9f9f9f' }} |
2724 | | - ${ env.ui.app.scheme == 'dark' ? // invert dark mode hover paths |
| 2722 | + [class*=modal-close-btn] path {${ appScheme == 'dark' ? 'stroke: white ; fill: white' |
| 2723 | + : 'stroke: #9f9f9f ; fill: #9f9f9f' }} |
| 2724 | + ${ appScheme == 'dark' ? // invert dark mode hover paths |
2725 | 2725 | '[class*=modal-close-btn]:hover path { stroke: black ; fill: black }' : '' } |
2726 | 2726 | [class*=modal-close-btn]:hover { background-color: #f2f2f2 } /* hover underlay */ |
2727 | 2727 | [class*=modal-close-btn] svg { margin: 11.5px } /* center SVG for hover underlay */ |
|
2731 | 2731 | : 'justify-self: start' }} /* left-align on desktop */ |
2732 | 2732 | [class*=-modal] p { justify-self: start ; font-size: 20px } |
2733 | 2733 | [class*=-modal] button { |
2734 | | - color: ${ env.ui.app.scheme == 'dark' ? 'white' : 'black' }; |
2735 | | - font-size: 12px !important ; background: none } |
| 2734 | + color: ${ appScheme == 'dark' ? 'white' : 'black' }; font-size: 12px !important ; background: none } |
2736 | 2735 | [class*=-modal-bg] { |
2737 | 2736 | pointer-events: auto ; /* override any disabling from site modals */ |
2738 | 2737 | position: fixed ; top: 0 ; left: 0 ; width: 100% ; height: 100% ; /* expand to full view-port */ |
|
2746 | 2745 | position: absolute ; /* to be click-draggable */ |
2747 | 2746 | opacity: 0 ; /* to fade-in */ |
2748 | 2747 | background-image: linear-gradient(180deg, ${ |
2749 | | - env.ui.app.scheme == 'dark' ? '#99a8a6 -200px, black 200px' |
2750 | | - : '#b6ebff -296px, white 171px' }) ; |
2751 | | - border: 1px solid ${ env.ui.app.scheme == 'dark' ? 'white' : '#b5b5b5' } !important ; |
2752 | | - color: ${ env.ui.app.scheme == 'dark' ? 'white' : 'black' }; |
| 2748 | + appScheme == 'dark' ? '#99a8a6 -200px, black 200px' : '#b6ebff -296px, white 171px' }) ; |
| 2749 | + border: 1px solid ${ appScheme == 'dark' ? 'white' : '#b5b5b5' } !important ; |
| 2750 | + color: ${ appScheme == 'dark' ? 'white' : 'black' }; |
2753 | 2751 | transform: translateX(-3px) translateY(7px) ; /* offset to move-in from */ |
2754 | 2752 | transition: var(--fg-transition) ; /* fade-in + move-in */ |
2755 | 2753 | -webkit-transition: var(--fg-transition) ; -moz-transition: var(--fg-transition) ; |
|
2767 | 2765 | + `#${app.slug}-settings { |
2768 | 2766 | min-width: ${ env.browser.isPortrait ? 288 : 698 }px ; max-width: 75vw ; word-wrap: break-word ; |
2769 | 2767 | margin: 12px 23px ; border-radius: 15px ; |
2770 | | - ${ env.ui.app.scheme == 'dark' ? 'stroke: white ; fill: white' : 'stroke: black ; fill: black' }; |
| 2768 | + ${ appScheme == 'dark' ? 'stroke: white ; fill: white' : 'stroke: black ; fill: black' }; |
2771 | 2769 | --shadow: 0 30px 60px rgba(0,0,0,0.12) ; |
2772 | 2770 | box-shadow: var(--shadow) ; -webkit-box-shadow: var(--shadow) ; -moz-box-shadow: var(--shadow) } |
2773 | 2771 | #${app.slug}-settings-title { |
|
2780 | 2778 | list-style: none ; padding: 0 ; margin-bottom: 2px ; /* hide bullets, close bottom gap */ |
2781 | 2779 | width: ${ env.browser.isPortrait ? 100 : 50 }% } /* set width based on column cnt */ |
2782 | 2780 | ${ env.browser.isPhone ? '' : `#${app.slug}-settings ul:first-of-type { /* color desktop middle sep */ |
2783 | | - border-right: 1px dotted ${ env.ui.app.scheme == 'dark' ? 'white' : 'black' }}`} |
| 2781 | + border-right: 1px dotted ${ appScheme == 'dark' ? 'white' : 'black' }}`} |
2784 | 2782 | #${app.slug}-settings li { |
2785 | | - color: ${ env.ui.app.scheme == 'dark' ? 'rgb(255,255,255,0.65)' : 'rgba(0,0,0,0.45)' }; |
2786 | | - fill: ${ env.ui.app.scheme == 'dark' ? 'rgb(255,255,255,0.65)' : 'rgba(0,0,0,0.45)' }; |
2787 | | - stroke: ${ env.ui.app.scheme == 'dark' ? 'rgb(255,255,255,0.65)' : 'rgba(0,0,0,0.45)' }; |
| 2783 | + color: ${ appScheme == 'dark' ? 'rgb(255,255,255,0.65)' : 'rgba(0,0,0,0.45)' }; |
| 2784 | + fill: ${ appScheme == 'dark' ? 'rgb(255,255,255,0.65)' : 'rgba(0,0,0,0.45)' }; |
| 2785 | + stroke: ${ appScheme == 'dark' ? 'rgb(255,255,255,0.65)' : 'rgba(0,0,0,0.45)' }; |
2788 | 2786 | height: 24px ; padding: 6px 10px ; font-size: 13.5px ; |
2789 | | - border-bottom: 1px dotted ${ env.ui.app.scheme == 'dark' ? 'white' : 'black' }; /* add separators */ |
| 2787 | + border-bottom: 1px dotted ${ appScheme == 'dark' ? 'white' : 'black' }; /* add separators */ |
2790 | 2788 | border-radius: 3px ; /* slightly round highlight strip */ |
2791 | 2789 | ${ config.fgAnimationsDisabled || env.browser.isMobile ? '' : |
2792 | 2790 | `transition: var(--settings-li-transition) ; |
|
2795 | 2793 | -o-transition: var(--settings-li-transition) ; |
2796 | 2794 | -ms-transition: var(--settings-li-transition)` }} |
2797 | 2795 | #${app.slug}-settings li.active { |
2798 | | - color: ${ env.ui.app.scheme == 'dark' ? 'rgb(255,255,255)' : 'rgba(0,0,0)' }; |
2799 | | - fill: ${ env.ui.app.scheme == 'dark' ? 'rgb(255,255,255)' : 'rgba(0,0,0)' }; |
2800 | | - stroke: ${ env.ui.app.scheme == 'dark' ? 'rgb(255,255,255)' : 'rgba(0,0,0)' }} |
| 2796 | + color: ${ appScheme == 'dark' ? 'rgb(255,255,255)' : 'rgba(0,0,0)' }; |
| 2797 | + fill: ${ appScheme == 'dark' ? 'rgb(255,255,255)' : 'rgba(0,0,0)' }; |
| 2798 | + stroke: ${ appScheme == 'dark' ? 'rgb(255,255,255)' : 'rgba(0,0,0)' }} |
2801 | 2799 | #${app.slug}-settings li label { padding-right: 20px } /* right-pad labels so toggles don't hug */ |
2802 | 2800 | #${app.slug}-settings li:last-of-type { border-bottom: none } /* remove last bottom-border */ |
2803 | 2801 | #${app.slug}-settings li, #${app.slug}-settings li label { cursor: pointer } /* add finger on hover */ |
|
2823 | 2821 | ${ config.fgAnimationsDisabled ? '' // spin cycle arrows icon when scheme is Auto |
2824 | 2822 | : `#scheme-settings-entry svg[class*=arrowsCyclic], |
2825 | 2823 | .chatgpt-notif svg[class*=arrowsCyclic] { animation: rotate 5s linear infinite }` } |
2826 | | - #about-settings-entry span { color: ${ env.ui.app.scheme == 'dark' ? '#28ee28' : 'green' }} |
| 2824 | + #about-settings-entry span { color: ${ appScheme == 'dark' ? '#28ee28' : 'green' }} |
2827 | 2825 | #about-settings-entry > span { /* outer About status span */ |
2828 | 2826 | width: ${ env.browser.isPortrait ? '15vw' : '95px' }; height: 20px ; overflow: hidden ; |
2829 | 2827 | ${ env.browser.isPortrait ? 'position: relative ; bottom: 3px ;' : '' } /* v-align */ |
|
2836 | 2834 | text-wrap: nowrap ; ${ |
2837 | 2835 | config.fgAnimationsDisabled ? '' : 'animation: ticker linear 75s infinite' }} |
2838 | 2836 | @keyframes ticker { 0% { transform: translateX(100%) } 100% { transform: translateX(-2000%) }} |
2839 | | - .about-em { color: ${ env.ui.app.scheme == 'dark' ? 'white' : 'green' } !important }` |
| 2837 | + .about-em { color: ${ appScheme == 'dark' ? 'white' : 'green' } !important }` |
2840 | 2838 | ) |
2841 | 2839 | }, |
2842 | 2840 |
|
|
0 commit comments