Skip to content

Commit

Permalink
Shortened regex
Browse files Browse the repository at this point in the history
  • Loading branch information
adamlui committed Nov 14, 2024
1 parent ace0512 commit 5dc8660
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions chatgpt.js
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ const chatgpt = {
} else { // auto-save to file

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

0 comments on commit 5dc8660

Please sign in to comment.