Skip to content

Commit 39d2a1c

Browse files
authored
Merge pull request #35 from vivek-nexus/v2.3.5
v2.3.5
2 parents 8d2593c + 8535d4d commit 39d2a1c

4 files changed

Lines changed: 13 additions & 14 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Simple Google Meet transcripts. Private and open source.
33

44
![marquee-large](/assets/marquee-large.png)
55

6-
Extension status: 🟢 OPERATIONAL (v2.3.4)
6+
Extension status: 🟢 OPERATIONAL (v2.3.5)
77

88
<br />
99
<br />

extension/background.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ function downloadTranscript() {
108108
})
109109
console.log("Invalid file name. Transcript downloaded to TranscripTonic directory with simple file name.")
110110
// Logs anonymous errors to a Google sheet for swift debugging
111-
fetch(`https://script.google.com/macros/s/AKfycbxiyQSDmJuC2onXL7pKjXgELK1vA3aLGZL5_BLjzCp7fMoQ8opTzJBNfEHQX_QIzZ-j4Q/exec?version=${chrome.runtime.getManifest().version}&code=009error=${encodeURIComponent(err)}`, { mode: "no-cors" })
111+
fetch(`https://script.google.com/macros/s/AKfycbxiyQSDmJuC2onXL7pKjXgELK1vA3aLGZL5_BLjzCp7fMoQ8opTzJBNfEHQX_QIzZ-j4Q/exec?version=${chrome.runtime.getManifest().version}&code=009&error=${encodeURIComponent(err)}`, { mode: "no-cors" })
112112
})
113113
}
114114

extension/content.js

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -145,12 +145,9 @@ function meetingRoutines(uiType) {
145145
})
146146

147147
// CRITICAL DOM DEPENDENCY. Grab the transcript element. This element is present, irrespective of captions ON/OFF, so this executes independent of operation mode.
148-
let transcriptTargetNode
149-
// Expect two elements with role=region in the DOM: captions region and meeting controls region. Captions region is the new addition. Meeting controls region was always present. So check if both exist and only then pick the first.
150-
if (document.querySelectorAll('div[role="region"]').length > 1) {
151-
transcriptTargetNode = document.querySelectorAll('div[role="region"]')[0]
152-
}
153-
else {
148+
let transcriptTargetNode = document.querySelector('div[role="region"][tabindex="0"]')
149+
// For old captions UI
150+
if (!transcriptTargetNode) {
154151
transcriptTargetNode = document.querySelector('.a4cQT')
155152
canUseAriaBasedTranscriptSelector = false
156153
}
@@ -181,7 +178,7 @@ function meetingRoutines(uiType) {
181178
chatMessagesButton.click()
182179

183180
// Allow DOM to be updated and then register chatMessage mutation observer
184-
setTimeout(() => {
181+
checkElement('div[aria-live="polite"].Ge9Kpc').then(() => {
185182
chatMessagesButton.click()
186183
// CRITICAL DOM DEPENDENCY. Grab the chat messages element. This element is present, irrespective of chat ON/OFF, once it appears for this first time.
187184
try {
@@ -197,7 +194,7 @@ function meetingRoutines(uiType) {
197194

198195
logError("002", err)
199196
}
200-
}, 1000)
197+
})
201198
} catch (err) {
202199
console.error(err)
203200
isChatMessagesDomErrorCaptured = true
@@ -209,10 +206,12 @@ function meetingRoutines(uiType) {
209206
// Show confirmation message from extensionStatusJSON, once observation has started, based on operation mode
210207
if (!isTranscriptDomErrorCaptured && !isChatMessagesDomErrorCaptured) {
211208
chrome.storage.sync.get(["operationMode"], function (result) {
212-
if (result.operationMode == "manual")
209+
if (result.operationMode == "manual") {
213210
showNotification({ status: 400, message: "<strong>TranscripTonic is not running</strong> <br /> Turn on captions using the CC icon, if needed" })
214-
else
211+
}
212+
else {
215213
showNotification(extensionStatusJSON)
214+
}
216215
})
217216
}
218217

@@ -255,7 +254,7 @@ function transcriptMutationCallback(mutationsList, observer) {
255254
try {
256255
// CRITICAL DOM DEPENDENCY. Get all people in the transcript
257256
const people = canUseAriaBasedTranscriptSelector
258-
? document.querySelectorAll('div[role="region"]')[0].children
257+
? document.querySelector('div[role="region"][tabindex="0"]').children
259258
: document.querySelector('.a4cQT').childNodes[1].firstChild.childNodes
260259

261260
// Begin parsing transcript

extension/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "TranscripTonic",
3-
"version": "2.3.4",
3+
"version": "2.3.5",
44
"manifest_version": 3,
55
"description": "Simple Google Meet transcripts. Private and open source.",
66
"action": {

0 commit comments

Comments
 (0)