|
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.21.2 |
| 151 | +// @version 2025.10.21.3 |
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 |
|
262 | 262 | env.browser[`is${ platform == 'Firefox' ? 'FF' : platform }`] = chatgpt.browser['is' + platform]()) |
263 | 263 | Object.assign(env.browser, { |
264 | 264 | get isPortrait() { return env.browser.isMobile && (innerWidth < innerHeight) }, |
265 | | - get isPhone() { return env.browser.isMobile && innerWidth <= 480 } |
| 265 | + get isCompact() { return innerWidth <= 480 } |
266 | 266 | }) |
267 | 267 | env.userLocale = env.browser.language.includes('-') ? env.browser.language.split('-')[1].toLowerCase() : '' |
268 | 268 | env.scriptManager.supportsStreaming = /Tampermonkey|ScriptCat/.test(env.scriptManager.name) |
|
557 | 557 | color: #b6b8ba ; fill: #b6b8ba ; animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite } |
558 | 558 | #${app.slug} section.loading { padding: 0 0 14px 5px ; font-size: 90% } /* pad loading status */ |
559 | 559 | #${app.slug}-font-size-slider-track { |
560 | | - width: 98% ; height: 7px ; margin: -5px auto ${ env.browser.isPhone ? -4 : -9 }px ; |
| 560 | + width: 98% ; height: 7px ; margin: -5px auto ${ env.browser.isCompact ? -4 : -9 }px ; |
561 | 561 | padding: 15px 0 ; background-color: #ccc ; box-sizing: content-box; background-clip: content-box ; |
562 | 562 | -webkit-background-clip: content-box } |
563 | 563 | #${app.slug}-font-size-slider-track::before { /* to add finger cursor to unpadded core only */ |
|
816 | 816 | }, |
817 | 817 |
|
818 | 818 | bylineVisibility() { |
819 | | - if (env.browser.isPhone) return // since byline hidden by app.styles |
| 819 | + if (env.browser.isCompact) return // since byline hidden by app.styles |
820 | 820 |
|
821 | 821 | // Init header elems |
822 | 822 | const headerElems = { byline: app.div.querySelector('.byline') } |
|
1885 | 1885 | aboutModal.querySelector('h2').remove() // remove empty title h2 |
1886 | 1886 | aboutModal.querySelector('p').style.cssText = ` |
1887 | 1887 | overflow-wrap: anywhere ; line-height: 1.55 ; |
1888 | | - margin: ${ env.browser.isPhone ? '15px 0 -21px' : '13px 0 -18px 11px' }` |
| 1888 | + margin: ${ env.browser.isCompact ? '15px 0 -21px' : '13px 0 -18px 11px' }` |
1889 | 1889 |
|
1890 | 1890 | // Hack buttons |
1891 | 1891 | aboutModal.querySelectorAll('button').forEach(btn => { |
|
1946 | 1946 | // Re-style elems |
1947 | 1947 | apiModal.querySelector('h2').style.justifySelf = 'center' // center title |
1948 | 1948 | const btnsDiv = apiModal.querySelector('.modal-buttons') |
1949 | | - btnsDiv.style.cssText = `margin-top: 23px !important ; ${ env.browser.isPhone ? '' |
| 1949 | + btnsDiv.style.cssText = `margin-top: 23px !important ; ${ env.browser.isCompact ? '' |
1950 | 1950 | : 'flex-wrap: wrap ; justify-content: center ; gap: 9px' }` // gridify wide view btns |
1951 | 1951 | btnsDiv.querySelectorAll('button').forEach((btn, idx) => { |
1952 | 1952 | if (idx == 0) btn.style.display = 'none' // hide Dismiss button |
|
1973 | 1973 |
|
1974 | 1974 | // Re-style button cluster |
1975 | 1975 | const btnsDiv = feedbackModal.querySelector('.modal-buttons') |
1976 | | - if (!env.browser.isPhone) // gridify wide view btns |
| 1976 | + if (!env.browser.isCompact) // gridify wide view btns |
1977 | 1977 | btnsDiv.style.cssText = 'flex-wrap: wrap ; justify-content: center ; gap: 3px' |
1978 | 1978 |
|
1979 | 1979 | // Hack buttons |
|
2514 | 2514 | } |
2515 | 2515 | .chatgpt-modal > div { |
2516 | 2516 | background-color: white !important ; color: #202124 ; |
2517 | | - ${ env.browser.isPhone ? 'padding: 25px 31px !important' : '' } |
| 2517 | + ${ env.browser.isCompact ? 'padding: 25px 31px !important' : '' } |
2518 | 2518 | } |
2519 | 2519 | .chatgpt-modal p { margin: 14px 0 -20px 4px ; font-size: 18px } /* pos/size modal msg */ |
2520 | 2520 | .chatgpt-modal a { color: #${ appScheme == 'dark' ? '00cfff' : '1e9ebb' } !important } |
|
2600 | 2600 | align-content: center ; /* for symmetrized gaps when odd num of entries */ |
2601 | 2601 | list-style: none ; padding: 0 ; margin: 0 ; /* hide bullets, override Brave ul margins */ |
2602 | 2602 | width: ${ env.browser.isPortrait ? 100 : 50 }% } /* set width based on column cnt */ |
2603 | | - ${ env.browser.isPhone ? '' : `#${app.slug}-settings ul:first-of-type { /* color desktop middle sep */ |
| 2603 | + ${ env.browser.isCompact ? '' : `#${app.slug}-settings ul:first-of-type { /* color desktop middle sep */ |
2604 | 2604 | border-right: 1px dotted ${ appScheme == 'dark' ? 'white' : 'black' }}`} |
2605 | 2605 | #${app.slug}-settings li { |
2606 | 2606 | color: ${ appScheme == 'dark' ? 'rgb(255,255,255,0.65)' : 'rgba(0,0,0,0.45)' }; |
|
0 commit comments