Skip to content

Commit e92da67

Browse files
committed
Added logging to empty catch block, removed unneeded one ↞ [auto-sync from https://github.com/KudoAI/chatgpt.js]
1 parent 948b641 commit e92da67

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

extension/lib/chatgpt.js

+3-4
Original file line numberDiff line numberDiff line change
@@ -1368,7 +1368,7 @@ const chatgpt = {
13681368
notificationDiv.style.right = notificationDiv.isRight ? vpXoffset.toString() + 'px' : ''
13691369
notificationDiv.style.left = !notificationDiv.isRight ? vpXoffset.toString() + 'px' : ''
13701370

1371-
// Reposition old notifications
1371+
// Re-position old notifications
13721372
const thisQuadrantQueue = notifyProps.queue[notificationDiv.quadrant]
13731373
if (thisQuadrantQueue.length > 1) {
13741374
try { // to move old notifications
@@ -1378,7 +1378,7 @@ const chatgpt = {
13781378
vOffset = +parseInt(oldDiv.style[offsetProp]) +5 + oldDiv.getBoundingClientRect().height
13791379
oldDiv.style[offsetProp] = `${ vOffset }px` // change prop
13801380
}
1381-
} catch (err) {}
1381+
} catch (err) { console.warn('Failed to re-position notification:', err) }
13821382
}
13831383

13841384
// Show notification
@@ -1762,8 +1762,7 @@ const chatgpt = {
17621762
activateObserver() {
17631763

17641764
// Stop the previous observer to preserve resources
1765-
if (this.observer instanceof MutationObserver)
1766-
try { this.observer.disconnect() } catch (e) {}
1765+
if (this.observer instanceof MutationObserver) this.observer.disconnect()
17671766

17681767
if (!this.elems.length) return console.error('🤖 chatgpt.js >> No elems to append!')
17691768

extension/manifest.json

+1-1
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.4.29",
6+
"version": "2025.4.30",
77
"author": "KudoAI",
88
"homepage_url": "https://github.com/KudoAI/chatgpt.js-chrome-starter",
99
"icons": { "16": "icons/icon16.png", "32": "icons/icon32.png", "64": "icons/icon64.png", "128": "icons/icon128.png" },

0 commit comments

Comments
 (0)