Skip to content

Commit

Permalink
πŸ”Š chore: Add downloadID logging for debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
khk4912 committed Jun 29, 2024
1 parent d62a8e2 commit e2d2963
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/scripts/download_clip.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
void (async () => {
const { clipDownloadURL, title } = await chrome.storage.local.get(['clipDownloadURL', 'title']) as { clipDownloadURL: string, title: string }

chrome.downloads.download({
url: clipDownloadURL,
filename: `${title.replace(/[/\\?%*:|"<>]/g, '_')}.mp4`
}, () => {
}, (downloadID) => {
console.log(`Download started with ID: ${downloadID}`)
window.close()
})
})()

0 comments on commit e2d2963

Please sign in to comment.