|
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.21.2 |
| 151 | +// @version 2025.10.21.3 |
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 |
|
263 | 263 | env.browser[`is${ platform == 'Firefox' ? 'FF' : platform }`] = chatgpt.browser['is' + platform]()) |
264 | 264 | Object.assign(env.browser, { |
265 | 265 | get isPortrait() { return env.browser.isMobile && (innerWidth < innerHeight) }, |
266 | | - get isPhone() { return env.browser.isMobile && innerWidth <= 480 } |
| 266 | + get isCompact() { return innerWidth <= 480 } |
267 | 267 | }) |
268 | 268 | env.userLocale = env.browser.language.includes('-') ? env.browser.language.split('-')[1].toLowerCase() : '' |
269 | 269 | env.scriptManager.supportsStreaming = /Tampermonkey|ScriptCat/.test(env.scriptManager.name) |
|
554 | 554 | color: #b6b8ba ; fill: #b6b8ba ; animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite } |
555 | 555 | #${app.slug} section.loading { padding-left: 5px } /* left-pad loading status when sending replies */ |
556 | 556 | #${app.slug}-font-size-slider-track { |
557 | | - width: 98% ; height: 7px ; margin: -6px auto ${ env.browser.isPhone ? -5 : -10 }px ; |
| 557 | + width: 98% ; height: 7px ; margin: -6px auto ${ env.browser.isCompact ? -5 : -10 }px ; |
558 | 558 | padding: 15px 0 ; background-color: #ccc ; box-sizing: content-box; background-clip: content-box ; |
559 | 559 | -webkit-background-clip: content-box } |
560 | 560 | #${app.slug}-font-size-slider-track::before { /* to add finger cursor to unpadded core only */ |
|
819 | 819 | }, |
820 | 820 |
|
821 | 821 | bylineVisibility() { |
822 | | - if (env.browser.isPhone) return // since byline hidden by app.styles |
| 822 | + if (env.browser.isCompact) return // since byline hidden by app.styles |
823 | 823 |
|
824 | 824 | // Init header elems |
825 | 825 | const headerElems = { byline: app.div.querySelector('.byline') } |
|
1887 | 1887 | aboutModal.querySelector('h2').remove() // remove empty title h2 |
1888 | 1888 | aboutModal.querySelector('p').style.cssText = ( |
1889 | 1889 | 'overflow-wrap: anywhere ; line-height: 1.55 ;' |
1890 | | - + `margin: ${ env.browser.isPhone ? '9px 0 -16px' : '3px 0 -11px 10px' }`) |
| 1890 | + + `margin: ${ env.browser.isCompact ? '9px 0 -16px' : '3px 0 -11px 10px' }`) |
1891 | 1891 |
|
1892 | 1892 | // Hack buttons |
1893 | 1893 | aboutModal.querySelectorAll('button').forEach(btn => { |
|
1948 | 1948 | // Re-style elems |
1949 | 1949 | apiModal.querySelector('h2').style.justifySelf = 'center' // center title |
1950 | 1950 | const btnsDiv = apiModal.querySelector('.modal-buttons') |
1951 | | - btnsDiv.style.cssText = `margin: 18px 0px 6px !important ; ${ env.browser.isPhone ? '' |
| 1951 | + btnsDiv.style.cssText = `margin: 18px 0px 6px !important ; ${ env.browser.isCompact ? '' |
1952 | 1952 | : 'flex-wrap: wrap ; justify-content: center ; gap: 9px' }` // gridify wide view btns |
1953 | 1953 | btnsDiv.querySelectorAll('button').forEach((btn, idx) => { |
1954 | 1954 | if (idx == 0) btn.style.display = 'none' // hide Dismiss button |
|
1975 | 1975 |
|
1976 | 1976 | // Re-style button cluster |
1977 | 1977 | const btnsDiv = feedbackModal.querySelector('.modal-buttons') |
1978 | | - btnsDiv.style.cssText = `margin-top: 12px !important ; ${ env.browser.isPhone ? '' |
| 1978 | + btnsDiv.style.cssText = `margin-top: 12px !important ; ${ env.browser.isCompact ? '' |
1979 | 1979 | : 'flex-wrap: wrap ; justify-content: center ; gap: 9px' }` // gridify wide view btns |
1980 | 1980 |
|
1981 | 1981 | // Hack buttons |
|
2602 | 2602 | align-content: center ; /* for symmetrized gaps when odd num of entries */ |
2603 | 2603 | list-style: none ; padding: 0 ; margin-bottom: 2px ; /* hide bullets, close bottom gap */ |
2604 | 2604 | width: ${ env.browser.isPortrait ? 100 : 50 }% } /* set width based on column cnt */ |
2605 | | - ${ env.browser.isPhone ? '' : `#${app.slug}-settings ul:first-of-type { /* color desktop middle sep */ |
| 2605 | + ${ env.browser.isCompact ? '' : `#${app.slug}-settings ul:first-of-type { /* color desktop middle sep */ |
2606 | 2606 | border-right: 1px dotted ${ appScheme == 'dark' ? 'white' : 'black' }}`} |
2607 | 2607 | #${app.slug}-settings li { |
2608 | 2608 | color: ${ appScheme == 'dark' ? 'rgb(255,255,255,0.65)' : 'rgba(0,0,0,0.45)' }; |
|
0 commit comments