Skip to content

Commit abd5243

Browse files
committed
Condensed ChatGPT chatbar.nativeWidth init ↞ [auto-sync from https://github.com/adamlui/ai-web-extensions/tree/main/chatgpt-widescreen]
1 parent d8da452 commit abd5243

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

chromium/extension/content.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@
293293
const wideScreenStyle = dom.create.style(null, { id: 'wideScreen-mode' })
294294
if (!chatbar.get()) await dom.get.loadedElem(sites[env.site].selectors.input)
295295
if (env.site == 'chatgpt') // store native chatbar width for Wider Chatbox style
296-
chatbar.nativeWidth = /\d+/.exec(getComputedStyle(document.querySelector('main form')).width)[0]
296+
chatbar.nativeWidth = dom.get.computedWidth(document.querySelector('main form'))
297297
update.style.wideScreen()
298298

299299
// Create FULL-WINDOW style

firefox/extension/content.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@
293293
const wideScreenStyle = dom.create.style(null, { id: 'wideScreen-mode' })
294294
if (!chatbar.get()) await dom.get.loadedElem(sites[env.site].selectors.input)
295295
if (env.site == 'chatgpt') // store native chatbar width for Wider Chatbox style
296-
chatbar.nativeWidth = /\d+/.exec(getComputedStyle(document.querySelector('main form')).width)[0]
296+
chatbar.nativeWidth = dom.get.computedWidth(document.querySelector('main form'))
297297
update.style.wideScreen()
298298

299299
// Create FULL-WINDOW style

greasemonkey/chatgpt-widescreen-mode.user.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@
235235
// @description:zu Thuthukisa iChatGPT ngemodi zesikrini ezibanzi/egcwele/ephezulu + imodi yokuvimbela i-spam. Futhi isebenza ku-perplexity.ai + poe.com!
236236
// @author Adam Lui
237237
// @namespace https://github.com/adamlui
238-
// @version 2025.3.1.13
238+
// @version 2025.3.2
239239
// @license MIT
240240
// @icon https://assets.chatgptwidescreen.com/images/icons/widescreen-robot-emoji/icon48.png?v=844b16e
241241
// @icon64 https://assets.chatgptwidescreen.com/images/icons/widescreen-robot-emoji/icon64.png?v=844b16e
@@ -877,7 +877,7 @@
877877
const wideScreenStyle = dom.create.style(null, { id: 'wideScreen-mode' })
878878
if (!chatbar.get()) await dom.get.loadedElem(sites[env.site].selectors.input)
879879
if (env.site == 'chatgpt') // store native chatbar width for Wider Chatbox style
880-
chatbar.nativeWidth = /\d+/.exec(getComputedStyle(document.querySelector('main form')).width)[0]
880+
chatbar.nativeWidth = dom.get.computedWidth(document.querySelector('main form'))
881881
update.style.wideScreen()
882882

883883
// Create FULL-WINDOW style

0 commit comments

Comments
 (0)