File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -47,15 +47,15 @@ function downloadTranscript() {
4747 // Create a download
4848 // Use Chrome Download API
4949 chrome . downloads . download ( {
50- url : 'data:text/plain;base64,' + btoa ( textContent ) ,
50+ url : 'data:text/plain;base64,' + encodeUnicodeString ( textContent ) ,
5151 filename : fileName ,
5252 conflictAction : 'uniquify' // Automatically rename the file if it already exists
5353 } ) . then ( ( ) => {
5454 console . log ( "Transcript downloaded to TranscripTonic directory" )
5555 } ) . catch ( ( error ) => {
5656 console . log ( error )
5757 chrome . downloads . download ( {
58- url : 'data:text/plain;base64,' + btoa ( textContent ) ,
58+ url : 'data:text/plain;base64,' + encodeUnicodeString ( textContent ) ,
5959 filename : "TranscripTonic/Transcript.txt" ,
6060 conflictAction : 'uniquify' // Automatically rename the file if it already exists
6161 } )
@@ -65,4 +65,11 @@ function downloadTranscript() {
6565 else
6666 console . log ( "No transcript found" )
6767 } )
68- }
68+ }
69+
70+ // Thanks to @ifTNT (https://github.com/vivek-nexus/transcriptonic/pull/4)
71+ function encodeUnicodeString ( text ) {
72+ const utf8Bytes = new TextEncoder ( ) . encode ( text )
73+ const binaryString = String . fromCodePoint ( ...utf8Bytes ) ;
74+ return btoa ( binaryString ) ;
75+ }
Original file line number Diff line number Diff line change 11{
22 "name" : " TranscripTonic" ,
3- "version" : " 2.0.0 " ,
3+ "version" : " 2.0.1 " ,
44 "manifest_version" : 3 ,
55 "description" : " Simple Google Meet transcripts. Private and open source." ,
66 "action" : {
You can’t perform that action at this time.
0 commit comments