Skip to content

Commit 8e0efef

Browse files
committed
Fix credentials download for manifest v3
1 parent 48e2837 commit 8e0efef

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

background/script.js

+6-5
Original file line numberDiff line numberDiff line change
@@ -298,12 +298,13 @@ function outputDocAsDownload(docContent) {
298298
console.log('DEBUG: Now going to download credentials file. Document content:');
299299
console.log(docContent);
300300
}
301-
let doc = URL.createObjectURL( new Blob([docContent], {type: 'application/octet-binary'}) );
302-
if (DebugLogs) {
303-
console.log('DEBUG: Blob URL:' + doc);
304-
}
305301
// Triggers download of the generated file
306-
chrome.downloads.download({ url: doc, filename: FileName, conflictAction: 'overwrite', saveAs: false });
302+
chrome.downloads.download({
303+
url: 'data:text/plain,' + docContent,
304+
filename: FileName,
305+
conflictAction: 'overwrite',
306+
saveAs: false
307+
});
307308
}
308309

309310

0 commit comments

Comments
 (0)