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:
11
src/utils.js
11
src/utils.js
@@ -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 {
|
||||
|
Reference in New Issue
Block a user