1
0
mirror of https://github.com/chinchang/web-maker.git synced 2025-07-26 08:11:17 +02:00

add correct files to zip and test zip download

This commit is contained in:
Kushagra Gour
2018-07-29 21:04:57 +05:30
parent eb7732ccb5
commit cd1c82956e
2 changed files with 24 additions and 6 deletions

View File

@@ -445,6 +445,17 @@ export function handleDownloadsPermission() {
return d.promise;
}
/**
* Return the filename from a passed url.
* http://a.com/path/file.png -> file.png
*/
export function getFilenameFromUrl(url) {
if (!url) {
return '';
}
return url.match(/\/([^/]*)$/)[1];
}
if (window.IS_EXTENSION) {
document.body.classList.add('is-extension');
} else {