Skip to content

Commit db406af

Browse files
committed
Shortened regex ↞ [auto-sync from KudoAI/chatgpt.js]
1 parent 5dc8660 commit db406af

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

starters/chrome/extension/lib/chatgpt.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,7 @@ const chatgpt = {
606606
} else { // auto-save to file
607607

608608
if (format == 'md') { // remove extraneous HTML + fix file extension
609-
const mdMatch = /<.*(?:<h1(.|\n)*?href=".*?continue[^"]*".*?\/a>.*?)<[^/]/.exec(transcript)[1];
609+
const mdMatch = /<.*<h1(.|\n)*?href=".*?continue[^"]*".*?\/a>.*?<[^/]/.exec(transcript)[1];
610610
transcript = mdMatch || transcript; filename = filename.replace('.html', '.md');
611611
}
612612
const blob = new Blob([transcript],
@@ -1255,7 +1255,7 @@ const chatgpt = {
12551255
+ 'opacity: 0 ; position: fixed ; z-index: 9999 ; font-size: 1.8rem ; color: white ;' // visibility
12561256
+ '-webkit-user-select: none ; -moz-user-select: none ; -ms-user-select: none ; user-select: none ;'
12571257
+ `transform: translateX(${ !notificationDiv.isRight ? '-' : '' }35px) ;` // init off-screen for transition fx
1258-
+ ( shadow ? ( 'box-shadow: -8px 13px 25px 0 ' + ( /\b(?:shadow|on)\b/gi.test(shadow) ? 'gray' : shadow )) : '' ) + '}'
1258+
+ ( shadow ? ( 'box-shadow: -8px 13px 25px 0 ' + ( /\b(?:shadow|on)\b/i.test(shadow) ? 'gray' : shadow )) : '' ) + '}'
12591259
+ '.notif-close-btn { cursor: pointer ; float: right ; position: relative ; right: -4px ; margin-left: -3px ;'
12601260
+ 'display: grid }' // top-align for non-OpenAI sites
12611261
+ '@keyframes notif-zoom-fade-out { 0% { opacity: 1 ; transform: scale(1) }' // transition out keyframes

0 commit comments

Comments
 (0)