Skip to content

Commit a89bb75

Browse files
committed
Replaced cached env.browser.isPortrait w/ live .isCompact ↞ [auto-sync from https://github.com/KudoAI/chatgpt.js-chrome-starter]
1 parent aeb929d commit a89bb75

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

starters/chrome/extension/components/modals.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ window.modals = {
66
get class() { return `${app.cssPrefix}-modal` },
77

88
about() {
9-
const { ui: { scheme }, browser: { isPortrait }} = env
9+
const { ui: { scheme }, browser: { isCompact }} = env
1010

1111
// Show modal
1212
const labelStyles = 'text-transform: uppercase ; font-size: 17px ; font-weight: bold ;'
@@ -35,7 +35,7 @@ window.modals = {
3535
text-align: center ; font-size: 51px ; line-height: 46px ; padding: 15px 0`
3636
aboutModal.querySelector('p').style.cssText = (
3737
'text-align: center ; overflow-wrap: anywhere ;'
38-
+ `margin: ${ isPortrait ? '6px 0 -16px' : '3px 0 0' }` )
38+
+ `margin: ${ isCompact ? '6px 0 -16px' : '3px 0 0' }` )
3939

4040
// Hack buttons
4141
aboutModal.querySelector('.modal-buttons').style.justifyContent = 'center'

starters/chrome/extension/content.js

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

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

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

starters/chrome/extension/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"name": "ChatGPT Extension",
44
"short_name": "ChatGPT 🧩",
55
"description": "A Chromium extension template to start using chatgpt.js like a boss!",
6-
"version": "2025.10.20",
6+
"version": "2025.11.5",
77
"homepage_url": "https://github.com/KudoAI/chatgpt.js-chrome-starter",
88
"icons": { "16": "icons/icon16.png", "32": "icons/icon32.png", "64": "icons/icon64.png", "128": "icons/icon128.png" },
99
"permissions": ["activeTab", "storage"],

0 commit comments

Comments
 (0)