|
|
@ -900,7 +900,7 @@ const Popup = {
|
|
|
|
i18n()
|
|
|
|
i18n()
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
downloadCsv(event) {
|
|
|
|
async downloadCsv(event) {
|
|
|
|
event.preventDefault()
|
|
|
|
event.preventDefault()
|
|
|
|
|
|
|
|
|
|
|
|
const { csv, filename } = getCsv()
|
|
|
|
const { csv, filename } = getCsv()
|
|
|
@ -909,10 +909,16 @@ const Popup = {
|
|
|
|
new Blob([csv.join('\n')], { type: 'text/csv;charset=utf-8' })
|
|
|
|
new Blob([csv.join('\n')], { type: 'text/csv;charset=utf-8' })
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const granted = await promisify(chrome.permissions, 'request', {
|
|
|
|
|
|
|
|
permissions: ['downloads'],
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (granted) {
|
|
|
|
chrome.downloads.download({
|
|
|
|
chrome.downloads.download({
|
|
|
|
url: file,
|
|
|
|
url: file,
|
|
|
|
filename,
|
|
|
|
filename,
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return false
|
|
|
|
return false
|
|
|
|
},
|
|
|
|
},
|
|
|
|