@@ -20,6 +20,7 @@ overWriteChromeStorage(["userName"], false)
2020// Transcript array that holds one or more transcript blocks
2121// Each transcript block (object) has personName, timeStamp and transcriptText key value pairs
2222let transcript = [ ]
23+ overWriteChromeStorage ( [ "transcript" ] , false )
2324// Buffer variables to dump values, which get pushed to transcript array as transcript blocks, at defined conditions
2425let personNameBuffer = "" , transcriptTextBuffer = "" , timeStampBuffer = undefined
2526// Buffer variables for deciding when to push a transcript block
@@ -162,7 +163,7 @@ function meetingRoutines(uiType) {
162163 const transcriptTargetNode = document . querySelector ( '.a4cQT' )
163164 // Attempt to dim down the transcript
164165 try {
165- transcriptTargetNode . childNodes [ 1 ] . style . opacity = 0.2
166+ transcriptTargetNode . childNodes [ 1 ] . setAttribute ( " style" , "opacity: 0.2" )
166167 } catch ( error ) {
167168 console . error ( error )
168169 }
@@ -183,7 +184,7 @@ function meetingRoutines(uiType) {
183184 chatMessagesButton . click ( )
184185 // CRITICAL DOM DEPENDENCY. Grab the chat messages element. This element is present, irrespective of chat ON/OFF, once it appears for this first time.
185186 try {
186- const chatMessagesTargetNode = document . querySelectorAll ( 'div[aria-live="polite"]' ) [ 0 ]
187+ const chatMessagesTargetNode = document . querySelector ( 'div[aria-live="polite"].Ge9Kpc' )
187188
188189 // Create chat messages observer instance linked to the callback function. Registered irrespective of operation mode.
189190 chatMessagesObserver = new MutationObserver ( chatMessagesRecorder )
@@ -193,7 +194,7 @@ function meetingRoutines(uiType) {
193194 console . error ( error )
194195 showNotification ( extensionStatusJSON_bug )
195196 }
196- } , 500 )
197+ } , 1000 )
197198
198199 // Show confirmation message from extensionStatusJSON, once observation has started, based on operation mode
199200 chrome . storage . sync . get ( [ "operationMode" ] , function ( result ) {
@@ -389,7 +390,7 @@ function chatMessagesRecorder(mutationsList, observer) {
389390 mutationsList . forEach ( mutation => {
390391 try {
391392 // CRITICAL DOM DEPENDENCY. Get all people in the transcript
392- const chatMessagesElement = document . querySelectorAll ( 'div[aria-live="polite"]' ) [ 0 ]
393+ const chatMessagesElement = document . querySelector ( 'div[aria-live="polite"].Ge9Kpc' )
393394 // Attempt to parse messages only if at least one message exists
394395 if ( chatMessagesElement . children . length > 0 ) {
395396 // CRITICAL DOM DEPENDENCY. Get the last message that was sent/received.
@@ -461,11 +462,9 @@ function overWriteChromeStorage(keys, sendDownloadMessage) {
461462 chrome . storage . local . set ( objectToSave , function ( ) {
462463 if ( sendDownloadMessage ) {
463464 // Download only if any transcript is present, irrespective of chat messages
464- if ( transcript . length > 0 ) {
465- chrome . runtime . sendMessage ( { type : "download" } , function ( response ) {
466- console . log ( response ) ;
467- } )
468- }
465+ chrome . runtime . sendMessage ( { type : "download" } , function ( response ) {
466+ console . log ( response ) ;
467+ } )
469468 }
470469 } )
471470}
0 commit comments