Skip to content

Commit 48b341b

Browse files
committed
Deleted no-longer used chat.openai.com match ↞ [auto-sync from https://github.com/adamlui/userscripts/tree/master/chatgpt/chatgpt-widescreen]
1 parent c4aee9c commit 48b341b

File tree

1 file changed

+13
-15
lines changed

1 file changed

+13
-15
lines changed

chatgpt-widescreen/greasemonkey/chatgpt-widescreen-mode.user.js

Lines changed: 13 additions & 15 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.1.20
238+
// @version 2025.1.20.1
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
@@ -249,7 +249,6 @@
249249
// @compatible ghost
250250
// @compatible qq
251251
// @match *://chatgpt.com/*
252-
// @match *://chat.openai.com/*
253252
// @match *://*.perplexity.ai/*
254253
// @match *://poe.com/*
255254
// @connect cdn.jsdelivr.net
@@ -417,7 +416,6 @@
417416
method: 'GET', url: `${app.urls.resourceHost}/assets/data/sites.json`,
418417
onload: resp => resolve(JSON.parse(resp.responseText))
419418
})))
420-
sites.openai = { ...sites.chatgpt } // shallow copy to cover old domain
421419

422420
// Export DEPENDENCIES to imported resources
423421
dom.imports.import({ env }) // for env.ui.scheme
@@ -523,13 +521,13 @@
523521

524522
get() {
525523
let chatbar = document.querySelector(sites[env.site].selectors.input)
526-
const lvlsToParent = /chatgpt|openai/.test(env.site) ? 3 : 2
524+
const lvlsToParent = env.site == 'chatgpt' ? 3 : 2
527525
for (let i = 0 ; i < lvlsToParent ; i++) chatbar = chatbar?.parentNode
528526
return chatbar
529527
},
530528

531529
tweak() {
532-
if (!/chatgpt|openai/.test(env.site)) return
530+
if (!env.site == 'chatgpt') return
533531
const chatbarDiv = chatbar.get() ; if (!chatbarDiv) return
534532
const inputArea = chatbarDiv.querySelector(sites[env.site].selectors.input) ; if (!inputArea) return
535533
if (chatgpt.canvasIsOpen()) inputArea.parentNode.style.width = '100%'
@@ -600,7 +598,7 @@
600598

601599
chatbar() {
602600
chatbarStyle.innerText = (
603-
/chatgpt|openai/.test(env.site) ? ( config.widerChatbox ? ''
601+
env.site == 'chatgpt' ? ( config.widerChatbox ? ''
604602
: `main form { max-width: ${chatbar.nativeWidth}px !important ; margin: auto }` )
605603
: env.site == 'poe' ? ( config.widerChatbox && config.wideScreen ?
606604
'[class^=ChatPageMainFooter_footerInner] { width: 98% ; margin-right: 15px }' : '' )
@@ -609,7 +607,7 @@
609607

610608
tweaks() {
611609
tweaksStyle.innerText = (
612-
( /chatgpt|openai/.test(env.site) ? (
610+
( env.site == 'chatgpt' ? (
613611
'[id$=-btn]:hover { opacity: 100% !important }' // prevent chatbar btn dim on hover
614612
+ 'main { overflow: clip !important }' // prevent h-scrollbar...
615613
// ...on sync.mode('fullWindow) => delayed chatbar.tweak()
@@ -632,7 +630,7 @@
632630

633631
wideScreen() {
634632
wideScreenStyle.innerText = (
635-
/chatgpt|openai/.test(env.site) ? (
633+
env.site == 'chatgpt' ? (
636634
'.text-base { max-width: 100% !important }' // widen outer container
637635
+ ( !env.tallChatbar ? '.text-base:nth-of-type(2) { max-width: 97% !important }' : '' )
638636
) : env.site == 'perplexity' ? (
@@ -689,7 +687,7 @@
689687
: chatgpt.isFullScreen() )
690688
settings.save(mode, state) ; buttons.update.svg(mode) ; update.tooltip(mode)
691689
if (mode == 'fullWindow') sync.fullerWin()
692-
if (/chatgpt|openai/.test(env.site)) setTimeout(() => chatbar.tweak(), // update inner width
690+
if (env.site == 'chatgpt') setTimeout(() => chatbar.tweak(), // update inner width
693691
mode == 'fullWindow' && ( config.wideScreen || config.fullerWindows )
694692
&& config.widerChatbox ? 111 : 0) // delay if toggled to/from active WCB to avoid wrong width
695693
else if (env.site == 'poe' && config.widerChatbox) update.style.chatbar() // sync WCB
@@ -739,7 +737,7 @@
739737
menu.register() ; if (env.extensionInstalled) return
740738

741739
// Init UI props
742-
if (/chatgpt|openai/.test(env.site)) {
740+
if (env.site == 'chatgpt') {
743741
sites[env.site].hasSidebar = !!await Promise.race([
744742
dom.getLoadedElem(sites.chatgpt.selectors.btns.sidebarToggle), // DOM element if sidebar toggle loads
745743
dom.getLoadedElem(sites.chatgpt.selectors.btns.login).then(() => false), // null if login button loads
@@ -776,11 +774,11 @@
776774

777775
// Apply general style TWEAKS
778776
const tcbStyle = ( // heighten chatbox
779-
/chatgpt|openai/.test(env.site) ? `div[class*=prose]:has(${sites[env.site].selectors.input})`
777+
env.site == 'chatgpt' ? `div[class*=prose]:has(${sites[env.site].selectors.input})`
780778
: sites[env.site].selectors.input )
781779
+ '{ max-height: 68vh }'
782780
const hhStyle = sites[env.site].selectors.header + '{ display: none !important }' // hide header
783-
+ ( /chatgpt|openai/.test(env.site) ? 'main { padding-top: 12px }' : '' ) // increase top-padding
781+
+ ( env.site == 'chatgpt' ? 'main { padding-top: 12px }' : '' ) // increase top-padding
784782
const hfStyle = sites[env.site].selectors.footer + '{ display: none }' // hide footer
785783

786784
update.style.tweaks() ; document.head.append(tweaksStyle);
@@ -792,7 +790,7 @@
792790
const wideScreenStyle = dom.create.style()
793791
wideScreenStyle.id = 'wideScreen-mode' // for sync.mode()
794792
if (!chatbar.get()) await dom.getLoadedElem(sites[env.site].selectors.input)
795-
if (/chatgpt|openai/.test(env.site)) // store native chatbar width for Wider Chatbox style
793+
if (env.site == 'chatgpt') // store native chatbar width for Wider Chatbox style
796794
chatbar.nativeWidth = /\d+/.exec(getComputedStyle(document.querySelector('main form')).width)[0]
797795
update.style.wideScreen()
798796

@@ -825,7 +823,7 @@
825823
buttons.state.status = 'missing' ; buttons.insert() }
826824

827825
// Maintain button colors + Widescreen button visibility on snowflake chatgpt.com
828-
if (/chatgpt|openai/.test(env.site)) {
826+
if (env.site == 'chatgpt') {
829827

830828
// Update button colors on temp chat toggle
831829
const chatbarIsBlack = !!document.querySelector('div[class*=bg-black]:not([id$=-btn])')
@@ -870,7 +868,7 @@
870868
sync.mode('fullScreen') ; config.f11 = false }
871869
else if (!config.fullScreen && fullScreenState) // entering full screen
872870
sync.mode('fullScreen')
873-
if (/chatgpt|openai/.test(env.site)) chatbar.tweak() // update ChatGPT chatbar inner width
871+
if (env.site == 'chatgpt') chatbar.tweak() // update ChatGPT chatbar inner width
874872
})
875873

876874
// Add KEY LISTENER to enable flag on F11 + stop generating text on ESC

0 commit comments

Comments
 (0)