Skip to content

Commit 2348b15

Browse files
committed
Condensed vOffset init in chatgpt.notify()
1 parent 2525983 commit 2348b15

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

chatgpt.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1367,7 +1367,7 @@ const chatgpt = {
13671367
for (const divId of thisQuadrantQueue.slice(0, -1)) { // exclude new div
13681368
const oldDiv = document.getElementById(divId),
13691369
offsetProp = oldDiv.style.top ? 'top' : 'bottom', // pick property to change
1370-
vOffset = +/\d+/.exec(oldDiv.style[offsetProp])[0] + 5 + oldDiv.getBoundingClientRect().height
1370+
vOffset = +parseInt(oldDiv.style[offsetProp]) +5 + oldDiv.getBoundingClientRect().height
13711371
oldDiv.style[offsetProp] = `${ vOffset }px` // change prop
13721372
}
13731373
} catch (err) {}

0 commit comments

Comments
 (0)