![]() Send an action message result with summary payload using to notify popup.js to display the summarized text.The max file size is about 300MB, so it may download multiple files and you will need to allow YouTube to allow multiple files. Please NOTE: There is an updated video of this for 2022: 2022 Easiest Wa. In call back function, extract the URL of the current tab and make a GET HTTP request using XMLHTTPRequest Web API to the backend to receive summarized text as a response. Transcripts are downloaded as JSON files for later use. Learn how to download your YouTube transcript or subtitles as plain text with Show more.Add event listener to listen message generate which will execute the generateSummary callback function.In callback function, display the summary in the div element programmatically using Javascript.Īdd the line below to content_scripts in the manifest file which will inject the content script contentScript.js declaratively and execute the script automatically on a particular page.Add event listener to listen message result from contentScript.js which will execute the outputSummary callback function. ![]() In anonymous function, send an action message generate using method to notify contentScript.js to execute summary generation.When DOM is ready, attach event listener with event type as "click" to the Summarize button and pass second parameter as an anonymous callback function.
0 Comments
Leave a Reply. |