Skip to content

Commit 826f834

Browse files
authored
Merge pull request #32 from vivek-nexus/v2.3.3
v2.3.3
2 parents 2cb414b + b1aad99 commit 826f834

6 files changed

Lines changed: 51 additions & 20 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.2)
6+
Extension status: 🟢 OPERATIONAL (v2.3.3)
77

88
<br />
99
<br />

extension/background.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,14 +95,20 @@ function downloadTranscript() {
9595
conflictAction: "uniquify"
9696
}).then(() => {
9797
console.log("Transcript downloaded to TranscripTonic directory")
98-
}).catch((error) => {
99-
console.log(error)
98+
// Increment anonymous transcript generated count to a Google sheet
99+
fetch("https://script.google.com/macros/s/AKfycbzjyUMJ6kn4afWcmyEZYaMayA2GKgDEJB7zTXpRFoJcYvoCjfftWBYeRKyIUEUBCE1KMQ/exec", {
100+
mode: "no-cors"
101+
})
102+
}).catch((err) => {
103+
console.error(err)
100104
chrome.downloads.download({
101105
url: dataUrl,
102106
filename: "TranscripTonic/Transcript.txt",
103107
conflictAction: "uniquify"
104108
})
105109
console.log("Invalid file name. Transcript downloaded to TranscripTonic directory with simple file name.")
110+
// Logs anonymous errors to a Google sheet for swift debugging
111+
fetch(`https://script.google.com/macros/s/AKfycbydJjDgaRMTccagvK04U80um1rfAdgzz1VunCjDS799UqyGTFrvKLOz0ED8btnvA7Pxvw/exec?version=${chrome.runtime.getManifest().version}&error=${encodeURIComponent(err)}`, { mode: "no-cors" })
106112
})
107113
}
108114

extension/content.js

Lines changed: 38 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -163,10 +163,12 @@ function meetingRoutines(uiType) {
163163

164164
// Start observing the transcript element and chat messages element for configured mutations
165165
transcriptObserver.observe(transcriptTargetNode, mutationConfig)
166-
} catch (error) {
167-
console.error(error)
166+
} catch (err) {
167+
console.error(err)
168168
isTranscriptDomErrorCaptured = true
169169
showNotification(extensionStatusJSON_bug)
170+
171+
logError(err)
170172
}
171173

172174
// **** REGISTER CHAT MESSAGES LISTENER **** //
@@ -186,15 +188,19 @@ function meetingRoutines(uiType) {
186188
chatMessagesObserver = new MutationObserver(chatMessagesMutationCallback)
187189

188190
chatMessagesObserver.observe(chatMessagesTargetNode, mutationConfig)
189-
} catch (error) {
190-
console.error(error)
191+
} catch (err) {
192+
console.error(err)
191193
showNotification(extensionStatusJSON_bug)
194+
195+
logError(err)
192196
}
193197
}, 1000)
194-
} catch (error) {
195-
console.error(error)
198+
} catch (err) {
199+
console.error(err)
196200
isChatMessagesDomErrorCaptured = true
197201
showNotification(extensionStatusJSON_bug)
202+
203+
logError(err)
198204
}
199205

200206
// Show confirmation message from extensionStatusJSON, once observation has started, based on operation mode
@@ -226,9 +232,11 @@ function meetingRoutines(uiType) {
226232
// Save to chrome storage and send message to download transcript from background script
227233
overWriteChromeStorage(["transcript", "chatMessages"], true)
228234
})
229-
} catch (error) {
230-
console.error(error)
235+
} catch (err) {
236+
console.error(err)
231237
showNotification(extensionStatusJSON_bug)
238+
239+
logError(err)
232240
}
233241
})
234242
}
@@ -308,11 +316,13 @@ function transcriptMutationCallback(mutationsList, observer) {
308316
}
309317
console.log(transcriptTextBuffer)
310318
// console.log(transcript)
311-
} catch (error) {
312-
console.error(error)
319+
} catch (err) {
320+
console.error(err)
313321
if (isTranscriptDomErrorCaptured == false && hasMeetingEnded == false) {
314322
console.log(reportErrorMessage)
315323
showNotification(extensionStatusJSON_bug)
324+
325+
logError(err)
316326
}
317327
isTranscriptDomErrorCaptured = true
318328
}
@@ -347,11 +357,13 @@ function chatMessagesMutationCallback(mutationsList, observer) {
347357
console.log(chatMessages)
348358
}
349359
}
350-
catch (error) {
351-
console.error(error)
360+
catch (err) {
361+
console.error(err)
352362
if (isChatMessagesDomErrorCaptured == false && hasMeetingEnded == false) {
353363
console.log(reportErrorMessage)
354364
showNotification(extensionStatusJSON_bug)
365+
366+
logError(err)
355367
}
356368
isChatMessagesDomErrorCaptured = true
357369
}
@@ -421,8 +433,10 @@ function updateMeetingTitle() {
421433
const invalidFilenameRegex = /[^\w\-_.() ]/g
422434
meetingTitle = title.replace(invalidFilenameRegex, '_')
423435
overWriteChromeStorage(["meetingTitle"], false)
424-
} catch (error) {
425-
console.error(error)
436+
} catch (err) {
437+
console.error(err)
438+
439+
logError(err)
426440
}
427441
}
428442

@@ -509,6 +523,13 @@ const commonCSS = `background: rgb(255 255 255 / 10%);
509523
font-family: 'Google Sans',Roboto,Arial,sans-serif;
510524
box-shadow: rgba(0, 0, 0, 0.16) 0px 10px 36px 0px, rgba(0, 0, 0, 0.06) 0px 0px 0px 1px;`;
511525

526+
527+
// Logs anonymous errors to a Google sheet for swift debugging
528+
function logError(err) {
529+
fetch(`https://script.google.com/macros/s/AKfycbydJjDgaRMTccagvK04U80um1rfAdgzz1VunCjDS799UqyGTFrvKLOz0ED8btnvA7Pxvw/exec?version=${chrome.runtime.getManifest().version}&error=${encodeURIComponent(err)}`, { mode: "no-cors" })
530+
}
531+
532+
512533
// Fetches extension status from GitHub and saves to chrome storage. Defaults to 200, if remote server is unavailable.
513534
async function checkExtensionStatus() {
514535
// Set default value as 200
@@ -529,7 +550,9 @@ async function checkExtensionStatus() {
529550
});
530551
})
531552
.catch((err) => {
532-
console.log(err);
553+
console.error(err);
554+
555+
logError(err)
533556
});
534557
}
535558

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.2",
3+
"version": "2.3.3",
44
"manifest_version": 3,
55
"description": "Simple Google Meet transcripts. Private and open source.",
66
"action": {

extension/popup.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ <h1 style="margin: 0px;">TranscripTonic</h1>
120120
&nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp;
121121
<a href="https://github.com/vivek-nexus/transcriptonic/issues" target="_blank">Report a bug</a>
122122
</div>
123-
<p style="font-size: small;">Another
123+
<p style="font-size: small;"><span id="version"></span> &nbsp; &nbsp; | &nbsp; &nbsp; Another
124124
project by <span><a href="https://vivek-nexus.github.io" target="_blank"
125125
style="font-size: small; margin: 0px;">Vivek</a></span>. Background by SVGBackgrounds.com.</p>
126126
</div>

extension/popup.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ window.onload = function () {
33
const manualModeRadio = document.querySelector('#manual-mode')
44
const lastMeetingTranscriptLink = document.querySelector("#last-meeting-transcript")
55

6+
document.querySelector("#version").innerHTML = `v${chrome.runtime.getManifest().version}`
7+
68
chrome.storage.sync.get(["operationMode"], function (result) {
79
if (result.operationMode == undefined)
810
autoModeRadio.checked = true

0 commit comments

Comments
 (0)