File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -1368,7 +1368,7 @@ const chatgpt = {
1368
1368
notificationDiv . style . right = notificationDiv . isRight ? vpXoffset . toString ( ) + 'px' : ''
1369
1369
notificationDiv . style . left = ! notificationDiv . isRight ? vpXoffset . toString ( ) + 'px' : ''
1370
1370
1371
- // Reposition old notifications
1371
+ // Re-position old notifications
1372
1372
const thisQuadrantQueue = notifyProps . queue [ notificationDiv . quadrant ]
1373
1373
if ( thisQuadrantQueue . length > 1 ) {
1374
1374
try { // to move old notifications
@@ -1378,7 +1378,7 @@ const chatgpt = {
1378
1378
vOffset = + parseInt ( oldDiv . style [ offsetProp ] ) + 5 + oldDiv . getBoundingClientRect ( ) . height
1379
1379
oldDiv . style [ offsetProp ] = `${ vOffset } px` // change prop
1380
1380
}
1381
- } catch ( err ) { }
1381
+ } catch ( err ) { console . warn ( 'Failed to re-position notification:' , err ) }
1382
1382
}
1383
1383
1384
1384
// Show notification
@@ -1762,8 +1762,7 @@ const chatgpt = {
1762
1762
activateObserver ( ) {
1763
1763
1764
1764
// 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 ( )
1767
1766
1768
1767
if ( ! this . elems . length ) return console . error ( '🤖 chatgpt.js >> No elems to append!' )
1769
1768
You can’t perform that action at this time.
0 commit comments