Skip to content

Commit dc66fcb

Browse files
committed
Converted env.browser.isPhone to .isCompact ↞ [auto-sync from https://github.com/adamlui/ai-web-extensions/tree/main/googlegpt]
1 parent bfce22f commit dc66fcb

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

chatgpt/googlegpt/googlegpt.user.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@
149149
// @description:zu Yengeza izimpendulo ze-AI ku-Google Search (inikwa amandla yi-Google Gemma + GPT-4o!)
150150
// @author KudoAI
151151
// @namespace https://kudoai.com
152-
// @version 2025.10.21.2
152+
// @version 2025.10.21.3
153153
// @license MIT
154154
// @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
155155
// @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
@@ -453,7 +453,7 @@
453453
env.browser[`is${ platform == 'Firefox' ? 'FF' : platform }`] = chatgpt.browser['is' + platform]())
454454
Object.assign(env.browser, {
455455
get isPortrait() { return env.browser.isMobile && (innerWidth < innerHeight) },
456-
get isPhone() { return env.browser.isMobile && innerWidth <= 480 }
456+
get isCompact() { return innerWidth <= 480 }
457457
})
458458
env.userLocale = location.hostname.endsWith('.com') ? 'us' : location.hostname.split('.').pop()
459459
env.scriptManager.supportsStreaming = /Tampermonkey|ScriptCat/.test(env.scriptManager.name)
@@ -756,7 +756,7 @@
756756
animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite }
757757
#${app.slug} section.loading { padding: 15px 0 14px 5px } /* pad loading status when sending replies */
758758
#${app.slug}-font-size-slider-track {
759-
width: 98% ; height: 7px ; margin: 3px auto ${ env.browser.isPhone ? -6 : -11 }px ;
759+
width: 98% ; height: 7px ; margin: 3px auto ${ env.browser.isCompact ? -6 : -11 }px ;
760760
padding: 15px 0 ; background-color: #ccc ; box-sizing: content-box; background-clip: content-box ;
761761
-webkit-background-clip: content-box }
762762
#${app.slug}-font-size-slider-track::before { /* to add finger cursor to unpadded core only */
@@ -1010,7 +1010,7 @@
10101010
},
10111011

10121012
bylineVisibility() {
1013-
if (env.browser.isPhone) return // since byline hidden by app.styles
1013+
if (env.browser.isCompact) return // since byline hidden by app.styles
10141014

10151015
// Init header elems
10161016
const headerElems = { byline: app.div.querySelector('.byline') }
@@ -2098,7 +2098,7 @@
20982098
aboutModal.querySelector('h2').remove() // remove empty title h2
20992099
aboutModal.querySelector('p').style.cssText = `
21002100
overflow-wrap: anywhere ; line-height: 1.55 ;
2101-
margin: ${ env.browser.isPhone ? '21px 0 -20px' : '15px 0 -28px 17px' }`
2101+
margin: ${ env.browser.isCompact ? '21px 0 -20px' : '15px 0 -28px 17px' }`
21022102

21032103
// Hack buttons
21042104
aboutModal.querySelectorAll('button').forEach(btn => {
@@ -2160,7 +2160,7 @@
21602160
// Re-style elems
21612161
apiModal.querySelector('h2').style.justifySelf = 'center' // center title
21622162
const btnsDiv = apiModal.querySelector('.modal-buttons')
2163-
btnsDiv.style.cssText = `margin: 18px 0px 4px !important ; ${ env.browser.isPhone ? ''
2163+
btnsDiv.style.cssText = `margin: 18px 0px 4px !important ; ${ env.browser.isCompact ? ''
21642164
: 'flex-wrap: wrap ; justify-content: center ; gap: 9px' }` // gridify wide view btns
21652165
btnsDiv.querySelectorAll('button').forEach((btn, idx) => {
21662166
if (idx == 0) btn.style.display = 'none' // hide Dismiss button
@@ -2690,7 +2690,7 @@
26902690
}
26912691
.chatgpt-modal > div {
26922692
background-color: white ; color: #202124 ;
2693-
padding: ${ env.browser.isPhone ? '31px' : '25px 31px' }!important
2693+
padding: ${ env.browser.isCompact ? '31px' : '25px 31px' }!important
26942694
}
26952695
.chatgpt-modal p { margin: 14px 0 -29px 4px ; font-size: 1.28em ; line-height: 1.57 }
26962696
.modal-buttons {
@@ -2775,7 +2775,7 @@
27752775
align-content: center ; /* for symmetrized gaps when odd num of entries */
27762776
list-style: none ; padding: 0 ; margin-bottom: 2px ; /* hide bullets, close bottom gap */
27772777
width: ${ env.browser.isPortrait ? 100 : 50 }% } /* set width based on column cnt */
2778-
${ env.browser.isPhone ? '' : `#${app.slug}-settings ul:first-of-type { /* color desktop middle sep */
2778+
${ env.browser.isCompact ? '' : `#${app.slug}-settings ul:first-of-type { /* color desktop middle sep */
27792779
border-right: 1px dotted ${ appScheme == 'dark' ? 'white' : 'black' }}`}
27802780
#${app.slug}-settings li {
27812781
color: ${ appScheme == 'dark' ? 'rgb(255,255,255,0.65)' : 'rgba(0,0,0,0.45)' };

0 commit comments

Comments
 (0)