@@ -308,7 +308,7 @@ function transcriptMutationCallback(mutationsList) {
308308 if ( people . length > 1 ) {
309309 // Get the last person
310310 let person = people [ people . length - 2 ]
311- if ( person . childNodes . length < 2 ) {
311+ if ( person && ( person . childNodes . length < 2 ) ) {
312312 person = people [ people . length - 3 ]
313313 }
314314 // CRITICAL DOM DEPENDENCY
@@ -539,28 +539,27 @@ function pulseStatus() {
539539
540540// Grabs updated meeting title, if available
541541function updateMeetingTitle ( ) {
542- try {
543- waitForElement ( ".u6vdEc" ) . then ( ( ) => {
544- // Pick up meeting name after a delay, since Google meet updates meeting name after a delay
545- setTimeout ( ( ) => {
546- // NON CRITICAL DOM DEPENDENCY
547- const meetingTitleElement = document . querySelector ( ".u6vdEc" )
548- if ( meetingTitleElement ?. textContent ) {
549- meetingTitle = meetingTitleElement . textContent
550- overWriteChromeStorage ( [ "meetingTitle" ] , false )
551- } else {
552- throw new Error ( "Meeting title element not found in DOM" )
553- }
554- } , 5000 )
555- } )
556- } catch ( err ) {
557- console . error ( err )
542+ waitForElement ( ".u6vdEc" ) . then ( ( element ) => {
543+ const meetingTitleElement = /** @type {HTMLDivElement } */ ( element )
544+ meetingTitleElement ?. setAttribute ( "contenteditable" , "true" )
545+
546+ meetingTitleElement ?. addEventListener ( "input" , handleMeetingTitleElementChange )
547+
548+ // Pick up meeting name after a delay, since Google meet updates meeting name after a delay
549+ setTimeout ( ( ) => {
550+ handleMeetingTitleElementChange ( )
551+ meetingTitleElement . title = "Edit meeting title for TranscripTonic"
552+ meetingTitleElement . style . cssText = `text-decoration: underline white; text-underline-offset: 4px;`
553+ if ( location . pathname === `/${ meetingTitleElement . innerText } ` ) {
554+ showNotification ( { status : 200 , message : "<b>Give this meeting a title?</b><br/>Edit the underlined text in the bottom left corner" } )
555+ }
556+ } , 5000 )
558557
559- if ( ! hasMeetingEnded ) {
560- logError ( "007" , err )
558+ function handleMeetingTitleElementChange ( ) {
559+ meetingTitle = meetingTitleElement . innerText
560+ overWriteChromeStorage ( [ "meetingTitle" ] , false )
561561 }
562- }
563-
562+ } )
564563}
565564
566565// Returns all elements of the specified selector type and specified textContent. Return array contains the actual element as well as all the parents.
@@ -702,7 +701,7 @@ function checkExtensionStatus() {
702701 // Disable extension if version is below the min version
703702 if ( ! meetsMinVersion ( chrome . runtime . getManifest ( ) . version , minVersion ) ) {
704703 extensionStatusJSON . status = 400
705- extensionStatusJSON . message = `<strong>TranscripTonic is not running</strong> <br /> Please update to v${ minVersion } by following <a href="https://github.com/vivek-nexus/transcriptonic/wiki/Manually-update-TranscripTonic" target="_blank">these instructions</a>`
704+ extensionStatusJSON . message = `<strong>TranscripTonic is not running</strong> <br /> Please force update to v${ minVersion } by following <a href="https://github.com/vivek-nexus/transcriptonic/wiki/Manually-update-TranscripTonic" target="_blank">these instructions</a>`
706705 }
707706 else {
708707 // Update status based on response
0 commit comments