-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move autoDoenload.js from public/ to src/ and update to use typescript
- Loading branch information
1 parent
c159054
commit e223530
Showing
4 changed files
with
17 additions
and
16 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
export function readyForAutoDownload(fn: () => void): void { | ||
if (document.readyState != "loading") { | ||
fn(); | ||
} else { | ||
document.addEventListener("DOMContentLoaded", fn); | ||
} | ||
} | ||
|
||
export function mainForAutoDownload(): void { | ||
generateZIP((window as any).targetDeviceId); | ||
} | ||
|
||
readyForAutoDownload(mainForAutoDownload); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.