Skip to content

Commit a9b4536

Browse files
committed
Replaced env.browser.isPortrait w/ .isCompact
1 parent 2d5a9c3 commit a9b4536

File tree

22 files changed

+75
-87
lines changed

22 files changed

+75
-87
lines changed

amazongpt/greasemonkey/amazongpt.user.js

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// @description Add AI chat & product/category summaries to Amazon shopping, powered by the latest LLMs like GPT-4o!
44
// @author KudoAI
55
// @namespace https://kudoai.com
6-
// @version 2025.11.3
6+
// @version 2025.11.5
77
// @license MIT
88
// @icon https://amazongpt.kudoai.com/assets/images/icons/app/black-gold-teal/icon48.png?v=8e8ed1c
99
// @icon64 https://amazongpt.kudoai.com/assets/images/icons/app/black-gold-teal/icon64.png?v=8e8ed1c
@@ -139,10 +139,7 @@
139139
}
140140
} ; ['Chromium', 'Firefox', 'Chrome', 'Edge', 'Brave', 'Mobile'].forEach(platform =>
141141
env.browser[`is${ platform == 'Firefox' ? 'FF' : platform }`] = chatgpt.browser['is' + platform]())
142-
Object.assign(env.browser, {
143-
get isPortrait() { return env.browser.isMobile && (innerWidth < innerHeight) },
144-
get isCompact() { return innerWidth <= 480 }
145-
})
142+
Object.assign(env.browser, { get isCompact() { return innerWidth <= 480 }})
146143
env.scriptManager.supportsStreaming = /Tampermonkey|ScriptCat/.test(env.scriptManager.name)
147144
env.scriptManager.supportsTooltips = env.scriptManager.name == 'Tampermonkey'
148145
&& parseInt(env.scriptManager.version.split('.')[0]) >= 5
@@ -1568,8 +1565,8 @@
15681565

15691566
// Init logo
15701567
const settingsIcon = icons.amazongpt.create()
1571-
settingsIcon.style.cssText += `width: 65px ; margin-bottom: ${ env.browser.isPortrait ? -4 : 4 }px ;
1572-
position: relative ; top: -30px ; right: ${ env.browser.isPortrait ? -5 : 7 }px`
1568+
settingsIcon.style.cssText += `width: 65px ; margin-bottom: ${ env.browser.isCompact ? -4 : 4 }px ;
1569+
position: relative ; top: -30px ; right: ${ env.browser.isCompact ? -5 : 7 }px`
15731570

15741571
// Init title
15751572
const settingsTitleDiv = dom.create.elem('div', { id: `${app.slug}-settings-title` }),
@@ -1583,7 +1580,7 @@
15831580
const settingsLists = [], middleGap = 30 // px
15841581
const settingsListContainer = dom.create.elem('div')
15851582
const settingsListCnt = (
1586-
env.browser.isMobile && ( env.browser.isPortrait || settingsKeys.length < 8 )) ? 1 : 2
1583+
env.browser.isMobile && ( env.browser.isCompact || settingsKeys.length < 8 )) ? 1 : 2
15871584
const settingEntryCap = Math.floor(settingsKeys.length /2)
15881585
for (let i = 0 ; i < settingsListCnt ; i++) settingsLists.push(dom.create.elem('ul'))
15891586
settingsListContainer.style.width = '95%' // pad vs. parent
@@ -1603,7 +1600,7 @@
16031600
{ id: `${key}-settings-entry`, title: setting.helptip || '' })
16041601
const settingLabel = dom.create.elem('label', { textContent: setting.label })
16051602
settingEntry.append(settingLabel);
1606-
(settingsLists[env.browser.isPortrait ? 0 : +(idx >= settingEntryCap)]).append(settingEntry)
1603+
(settingsLists[env.browser.isCompact ? 0 : +(idx >= settingEntryCap)]).append(settingEntry)
16071604

16081605
// Create/prepend icons
16091606
const settingIcon = icons.create({ key: setting.icon })
@@ -1737,7 +1734,7 @@
17371734
if (!this.styles?.isConnected) document.head.append(this.styles ||= dom.create.style())
17381735
this.styles.textContent = `
17391736
#${app.slug}-settings {
1740-
min-width: ${ env.browser.isPortrait ? 288 : 755 }px ; max-width: 75vw ; margin: 12px 23px ;
1737+
min-width: ${ env.browser.isCompact ? 288 : 755 }px ; max-width: 75vw ; margin: 12px 23px ;
17411738
word-wrap: break-word ; border-radius: 15px ;
17421739
${ appScheme == 'dark' ? 'stroke: white ; fill: white' : 'stroke: black ; fill: black' };
17431740
--shadow: 0 30px 60px rgba(0,0,0,0.12) ; box-shadow: var(--shadow) ;
@@ -1748,11 +1745,11 @@
17481745
margin: 0 ${ env.browser.isMobile ? 6 : 24 }px 8px 0
17491746
}
17501747
#${app.slug}-settings-title h4 {
1751-
font-size: ${ env.browser.isPortrait ? 26 : 31 }px ; font-weight: bold ; margin-top: -25px }
1748+
font-size: ${ env.browser.isCompact ? 26 : 31 }px ; font-weight: bold ; margin-top: -25px }
17521749
#${app.slug}-settings ul {
17531750
align-content: center ; /* for symmetrized gaps when odd num of entries */
17541751
list-style: none ; padding: 0 ; margin: 0 0 2px -3px ; /* hide bullets, close bottom gap */
1755-
width: ${ env.browser.isPortrait ? 100 : 50 }% /* set width based on column cnt */
1752+
width: ${ env.browser.isCompact ? 100 : 50 }% /* set width based on column cnt */
17561753
}
17571754
${ env.browser.isCompact ? '' : `#${app.slug}-settings ul:first-of-type { /* color desktop middle sep */
17581755
border-right: 1px dotted ${ appScheme == 'dark' ? 'white' : 'black' }}`}
@@ -1809,7 +1806,7 @@
18091806
}
18101807
#about-settings-entry span { color: ${ appScheme == 'dark' ? '#28ee28' : 'green' }}
18111808
#about-settings-entry > span { /* outer About status span */
1812-
width: ${ env.browser.isPortrait ? '15vw' : '95px' }; height: 20px ; overflow: hidden ;
1809+
width: ${ env.browser.isCompact ? '15vw' : '95px' }; height: 20px ; overflow: hidden ;
18131810
${ config.fgAnimationsDisabled ? '' : // fade edges
18141811
`mask-image: linear-gradient(
18151812
to right, transparent, black 20%, black 89%, transparent) ;

autoclear-chatgpt-history/greasemonkey/autoclear-chatgpt-history.user.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@
225225
// @description:zu Ziba itshala lokucabanga okuzoshintshwa ngokuzenzakalelayo uma ukubuka chatgpt.com
226226
// @author Adam Lui
227227
// @namespace https://github.com/adamlui
228-
// @version 2025.10.20
228+
// @version 2025.11.5
229229
// @license MIT
230230
// @icon data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%22180%22%20height=%22180%22%20fill=%22none%22%3E%3Cstyle%3E:root%7B--primary-fill:%23000;--secondary-fill:%23fff;%7D@media%20(prefers-color-scheme:dark)%7B:root%7B--primary-fill:%23fff;--secondary-fill:%23000;%7D%7D%3C/style%3E%3Cg%20clip-path=%22url(%23a)%22%3E%3Crect%20width=%22180%22%20height=%22180%22%20fill=%22var(--primary-fill)%22%20rx=%2290%22/%3E%3Cg%20clip-path=%22url(%23b)%22%3E%3Cpath%20fill=%22var(--secondary-fill)%22%20d=%22M75.91%2073.628V62.232c0-.96.36-1.68%201.199-2.16l22.912-13.194c3.119-1.8%206.838-2.639%2010.676-2.639%2014.394%200%2023.511%2011.157%2023.511%2023.032%200%20.839%200%201.799-.12%202.758l-23.752-13.914c-1.439-.84-2.879-.84-4.318%200L75.91%2073.627Zm53.499%2044.383v-27.23c0-1.68-.72-2.88-2.159-3.719L97.142%2069.55l9.836-5.638c.839-.48%201.559-.48%202.399%200l22.912%2013.195c6.598%203.839%2011.035%2011.995%2011.035%2019.912%200%209.116-5.397%2017.513-13.915%2020.992v.001Zm-60.577-23.99-9.836-5.758c-.84-.48-1.2-1.2-1.2-2.16v-26.39c0-12.834%209.837-22.55%2023.152-22.55%205.039%200%209.716%201.679%2013.676%204.678L70.993%2055.516c-1.44.84-2.16%202.039-2.16%203.719v34.787-.002Zm21.173%2012.234L75.91%2098.339V81.546l14.095-7.917%2014.094%207.917v16.793l-14.094%207.916Zm9.056%2036.467c-5.038%200-9.716-1.68-13.675-4.678l23.631-13.676c1.439-.839%202.159-2.038%202.159-3.718V85.863l9.956%205.757c.84.48%201.2%201.2%201.2%202.16v26.389c0%2012.835-9.957%2022.552-23.27%2022.552v.001Zm-28.43-26.75L47.72%20102.778c-6.599-3.84-11.036-11.996-11.036-19.913%200-9.236%205.518-17.513%2014.034-20.992v27.35c0%201.68.72%202.879%202.16%203.718l29.989%2017.393-9.837%205.638c-.84.48-1.56.48-2.399%200Zm-1.318%2019.673c-13.555%200-23.512-10.196-23.512-22.792%200-.959.12-1.919.24-2.879l23.63%2013.675c1.44.84%202.88.84%204.32%200l30.108-17.392v11.395c0%20.96-.361%201.68-1.2%202.16l-22.912%2013.194c-3.119%201.8-6.837%202.639-10.675%202.639Zm29.748%2014.274c14.515%200%2026.63-10.316%2029.39-23.991%2013.434-3.479%2022.071-16.074%2022.071-28.91%200-8.396-3.598-16.553-10.076-22.43.6-2.52.96-5.039.96-7.557%200-17.153-13.915-29.99-29.989-29.99-3.239%200-6.358.48-9.477%201.56-5.398-5.278-12.835-8.637-20.992-8.637-14.515%200-26.63%2010.316-29.39%2023.991-13.434%203.48-22.07%2016.074-22.07%2028.91%200%208.396%203.598%2016.553%2010.075%2022.431-.6%202.519-.96%205.038-.96%207.556%200%2017.154%2013.915%2029.989%2029.99%2029.989%203.238%200%206.357-.479%209.476-1.559%205.397%205.278%2012.835%208.637%2020.992%208.637Z%22/%3E%3C/g%3E%3C/g%3E%3Cdefs%3E%3CclipPath%20id=%22a%22%3E%3Cpath%20d=%22M0%200h180v180H0z%22/%3E%3C/clipPath%3E%3CclipPath%20id=%22b%22%3E%3Cpath%20d=%22M29.487%2029.964h121.035v119.954H29.487z%22/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E
231231
// @icon64 data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%22180%22%20height=%22180%22%20fill=%22none%22%3E%3Cstyle%3E:root%7B--primary-fill:%23000;--secondary-fill:%23fff;%7D@media%20(prefers-color-scheme:dark)%7B:root%7B--primary-fill:%23fff;--secondary-fill:%23000;%7D%7D%3C/style%3E%3Cg%20clip-path=%22url(%23a)%22%3E%3Crect%20width=%22180%22%20height=%22180%22%20fill=%22var(--primary-fill)%22%20rx=%2290%22/%3E%3Cg%20clip-path=%22url(%23b)%22%3E%3Cpath%20fill=%22var(--secondary-fill)%22%20d=%22M75.91%2073.628V62.232c0-.96.36-1.68%201.199-2.16l22.912-13.194c3.119-1.8%206.838-2.639%2010.676-2.639%2014.394%200%2023.511%2011.157%2023.511%2023.032%200%20.839%200%201.799-.12%202.758l-23.752-13.914c-1.439-.84-2.879-.84-4.318%200L75.91%2073.627Zm53.499%2044.383v-27.23c0-1.68-.72-2.88-2.159-3.719L97.142%2069.55l9.836-5.638c.839-.48%201.559-.48%202.399%200l22.912%2013.195c6.598%203.839%2011.035%2011.995%2011.035%2019.912%200%209.116-5.397%2017.513-13.915%2020.992v.001Zm-60.577-23.99-9.836-5.758c-.84-.48-1.2-1.2-1.2-2.16v-26.39c0-12.834%209.837-22.55%2023.152-22.55%205.039%200%209.716%201.679%2013.676%204.678L70.993%2055.516c-1.44.84-2.16%202.039-2.16%203.719v34.787-.002Zm21.173%2012.234L75.91%2098.339V81.546l14.095-7.917%2014.094%207.917v16.793l-14.094%207.916Zm9.056%2036.467c-5.038%200-9.716-1.68-13.675-4.678l23.631-13.676c1.439-.839%202.159-2.038%202.159-3.718V85.863l9.956%205.757c.84.48%201.2%201.2%201.2%202.16v26.389c0%2012.835-9.957%2022.552-23.27%2022.552v.001Zm-28.43-26.75L47.72%20102.778c-6.599-3.84-11.036-11.996-11.036-19.913%200-9.236%205.518-17.513%2014.034-20.992v27.35c0%201.68.72%202.879%202.16%203.718l29.989%2017.393-9.837%205.638c-.84.48-1.56.48-2.399%200Zm-1.318%2019.673c-13.555%200-23.512-10.196-23.512-22.792%200-.959.12-1.919.24-2.879l23.63%2013.675c1.44.84%202.88.84%204.32%200l30.108-17.392v11.395c0%20.96-.361%201.68-1.2%202.16l-22.912%2013.194c-3.119%201.8-6.837%202.639-10.675%202.639Zm29.748%2014.274c14.515%200%2026.63-10.316%2029.39-23.991%2013.434-3.479%2022.071-16.074%2022.071-28.91%200-8.396-3.598-16.553-10.076-22.43.6-2.52.96-5.039.96-7.557%200-17.153-13.915-29.99-29.989-29.99-3.239%200-6.358.48-9.477%201.56-5.398-5.278-12.835-8.637-20.992-8.637-14.515%200-26.63%2010.316-29.39%2023.991-13.434%203.48-22.07%2016.074-22.07%2028.91%200%208.396%203.598%2016.553%2010.075%2022.431-.6%202.519-.96%205.038-.96%207.556%200%2017.154%2013.915%2029.989%2029.99%2029.989%203.238%200%206.357-.479%209.476-1.559%205.397%205.278%2012.835%208.637%2020.992%208.637Z%22/%3E%3C/g%3E%3C/g%3E%3Cdefs%3E%3CclipPath%20id=%22a%22%3E%3Cpath%20d=%22M0%200h180v180H0z%22/%3E%3C/clipPath%3E%3CclipPath%20id=%22b%22%3E%3Cpath%20d=%22M29.487%2029.964h121.035v119.954H29.487z%22/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E
@@ -277,7 +277,7 @@
277277
},
278278
ui: { scheme: getScheme() }
279279
}
280-
env.browser.isPortrait = env.browser.isMobile && ( innerWidth < innerHeight )
280+
Object.assign(env.browser, { get isCompact() { return innerWidth <= 480 }})
281281
env.scriptManager.supportsTooltips = env.scriptManager.name == 'Tampermonkey'
282282
&& parseInt(env.scriptManager.version.split('.')[0]) >= 5
283283
window.xhr = typeof GM != 'undefined' && GM.xmlHttpRequest || GM_xmlhttpRequest
@@ -491,7 +491,7 @@
491491
text-align: center ; font-size: 51px ; line-height: 46px ; padding: 15px 0`
492492
aboutModal.querySelector('p').style.cssText = `
493493
text-align: center ; overflow-wrap: anywhere ;
494-
margin: ${ env.browser.isPortrait ? '6px 0 -16px' : '3px 0 29px' }`
494+
margin: ${ env.browser.isCompact ? '6px 0 -16px' : '3px 0 29px' }`
495495

496496
// Hack buttons
497497
aboutModal.querySelectorAll('button').forEach(btn => {

bravegpt/greasemonkey/bravegpt.user.js

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@
148148
// @description:zu Yengeza izimpendulo ze-AI ku-Brave Search (inikwa amandla yi-GPT-4o!)
149149
// @author KudoAI
150150
// @namespace https://kudoai.com
151-
// @version 2025.11.3
151+
// @version 2025.11.5
152152
// @license MIT
153153
// @icon https://assets.bravegpt.com/images/icons/app/icon48.png?v=e8ca7c2
154154
// @icon64 https://assets.bravegpt.com/images/icons/app/icon64.png?v=e8ca7c2
@@ -260,10 +260,7 @@
260260
}
261261
} ; ['Chromium', 'Firefox', 'Chrome', 'Edge', 'Brave', 'Mobile'].forEach(platform =>
262262
env.browser[`is${ platform == 'Firefox' ? 'FF' : platform }`] = chatgpt.browser['is' + platform]())
263-
Object.assign(env.browser, {
264-
get isPortrait() { return env.browser.isMobile && (innerWidth < innerHeight) },
265-
get isCompact() { return innerWidth <= 480 }
266-
})
263+
Object.assign(env.browser, { get isCompact() { return innerWidth <= 480 }})
267264
env.userLocale = env.browser.language.includes('-') ? env.browser.language.split('-')[1].toLowerCase() : ''
268265
env.scriptManager.supportsStreaming = /Tampermonkey|ScriptCat/.test(env.scriptManager.name)
269266
env.scriptManager.supportsTooltips = env.scriptManager.name == 'Tampermonkey'
@@ -2224,8 +2221,8 @@
22242221

22252222
// Init logo
22262223
const settingsIcon = icons.bravegpt.create()
2227-
settingsIcon.style.cssText = `width: ${ env.browser.isPortrait ? 63 : 67 }px ; margin-bottom: 10px ;`
2228-
+ `position: relative ; top: -29px ; right: ${ env.browser.isPortrait ? -5 : 7 }px ;`
2224+
settingsIcon.style.cssText = `width: ${ env.browser.isCompact ? 63 : 67 }px ; margin-bottom: 10px ;`
2225+
+ `position: relative ; top: -29px ; right: ${ env.browser.isCompact ? -5 : 7 }px ;`
22292226
+ 'filter: drop-shadow(5px 5px 15px rgba(0,0,0,0.3))'
22302227

22312228
// Init title
@@ -2240,7 +2237,7 @@
22402237
const settingsLists = [], middleGap = 30 // px
22412238
const settingsListContainer = dom.create.elem('div')
22422239
const settingsListCnt = (
2243-
env.browser.isMobile && ( env.browser.isPortrait || settingsKeys.length < 8 )) ? 1 : 2
2240+
env.browser.isMobile && ( env.browser.isCompact || settingsKeys.length < 8 )) ? 1 : 2
22442241
const settingEntryCap = Math.floor(settingsKeys.length /2)
22452242
for (let i = 0 ; i < settingsListCnt ; i++) settingsLists.push(dom.create.elem('ul'))
22462243
settingsListContainer.style.width = '95%' // pad vs. parent
@@ -2260,7 +2257,7 @@
22602257
{ id: `${key}-settings-entry`, title: setting.helptip || '' })
22612258
const settingLabel = dom.create.elem('label', { textContent: setting.label })
22622259
settingEntry.append(settingLabel);
2263-
(settingsLists[env.browser.isPortrait ? 0 : +(idx >= settingEntryCap)]).append(settingEntry)
2260+
(settingsLists[env.browser.isCompact ? 0 : +(idx >= settingEntryCap)]).append(settingEntry)
22642261

22652262
// Create/prepend icons
22662263
const settingIcon = icons.create({ key: setting.icon })
@@ -2408,7 +2405,7 @@
24082405
this.styles.textContent = `
24092406
#${app.slug}-settings {
24102407
font-family: var(--brand-font) ;
2411-
min-width: ${ env.browser.isPortrait ? 288 : 758 }px ; max-width: 75vw ; margin: 12px 23px ;
2408+
min-width: ${ env.browser.isCompact ? 288 : 758 }px ; max-width: 75vw ; margin: 12px 23px ;
24122409
word-wrap: break-word ; border-radius: 15px ;
24132410
${ appScheme == 'dark' ? 'stroke: white ; fill: white' : 'stroke: black ; fill: black' };
24142411
--shadow: 0 30px 60px rgba(0,0,0,0.12) ; box-shadow: var(--shadow) ;
@@ -2419,13 +2416,13 @@
24192416
margin: 0 ${ env.browser.isMobile ? -31 : -6 }px -3px 0
24202417
}
24212418
#${app.slug}-settings-title h4 {
2422-
font-size: ${ env.browser.isPortrait ? 26 : 30 }px ; font-weight: bold ;
2419+
font-size: ${ env.browser.isCompact ? 26 : 30 }px ; font-weight: bold ;
24232420
margin: -31px 17px 7px 0
24242421
}
24252422
#${app.slug}-settings ul {
24262423
align-content: center ; /* for symmetrized gaps when odd num of entries */
24272424
list-style: none ; padding: 0 ; margin: 0 ; /* hide bullets, override Brave ul margins */
2428-
width: ${ env.browser.isPortrait ? 100 : 50 }% /* set width based on column cnt */
2425+
width: ${ env.browser.isCompact ? 100 : 50 }% /* set width based on column cnt */
24292426
}
24302427
${ env.browser.isCompact ? '' : `#${app.slug}-settings ul:first-of-type { /* color desktop middle sep */
24312428
border-right: 1px dotted ${ appScheme == 'dark' ? 'white' : 'black' }}`}
@@ -2479,7 +2476,7 @@
24792476
}
24802477
#about-settings-entry span { color: ${ appScheme == 'dark' ? '#28ee28' : 'green' }}
24812478
#about-settings-entry > span { /* outer About status span */
2482-
width: ${ env.browser.isPortrait ? '15vw' : '95px' }; height: 20px ; overflow: hidden ;
2479+
width: ${ env.browser.isCompact ? '15vw' : '95px' }; height: 20px ; overflow: hidden ;
24832480
${ config.fgAnimationsDisabled ? '' : // fade edges
24842481
`mask-image: linear-gradient(
24852482
to right, transparent, black 20%, black 89%, transparent) ;

chatgpt-auto-continue/chromium/extension/components/modals.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ window.modals = {
1212
},
1313

1414
about() { // requires lib/i18n.js + <app|env>
15-
const { browser: { isPortrait }, ui: { scheme }} = env
15+
const { browser: { isCompact }, ui: { scheme }} = env
1616

1717
// Init buttons
1818
const modalBtns = [
@@ -49,7 +49,7 @@ window.modals = {
4949
aboutModal.querySelector('h2').style.cssText = `
5050
text-align: center ; font-size: 51px ; line-height: 46px ; padding: 15px 0`
5151
aboutModal.querySelector('p').style.cssText = `
52-
text-align: center ; overflow-wrap: anywhere ; margin: ${ isPortrait ? '6px 0 -16px' : '3px 0 29px' }`
52+
text-align: center ; overflow-wrap: anywhere ; margin: ${ isCompact ? '6px 0 -16px' : '3px 0 29px' }`
5353

5454
// Hack buttons
5555
aboutModal.querySelector('.modal-buttons').style.justifyContent = 'center'

chatgpt-auto-continue/chromium/extension/content.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
// Init ENV context
2828
window.env = { browser: { isMobile: chatgpt.browser.isMobile() }, ui: { scheme: ui.getScheme() }}
29-
env.browser.isPortrait = env.browser.isMobile && ( innerWidth < innerHeight )
29+
Object.assign(env.browser, { get isCompact() { return innerWidth <= 480 }})
3030

3131
// Import APP data
3232
;({ app: window.app } = await chrome.storage.local.get('app'))

0 commit comments

Comments
 (0)