Skip to content

Commit

Permalink
Merge pull request #1 from headshot2017/main
Browse files Browse the repository at this point in the history
add character SFX (blip, SoundN, FrameSFX) to the zip file
  • Loading branch information
stonedDiscord authored Nov 21, 2023
2 parents 4d46cb2 + a372b12 commit 1ba9b76
Show file tree
Hide file tree
Showing 5 changed files with 2,304 additions and 1,190 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Web Downloader
Have you ever wanted to download your favorite character from WebAO? Now you can! Type in the name of the character you want and it will zip up all of theri animations.
Have you ever wanted to download your favorite character from WebAO? Now you can! Type in the name of the character you want and it will zip up all of their animations and sounds.

## Development
### Setting up your environment
Expand Down
5 changes: 3 additions & 2 deletions downloadandzip.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// stolen from https://huynvk.dev/blog/download-files-and-zip-them-in-your-browsers-using-javascript
import JsZip from 'jszip';
import FileSaver from 'file-saver';
import { BASE_CHARACTERS_URL } from './public/index';
import { BASE_URL } from './public/index';

const download = async (url) => {
return fetch(url).then(resp => {
const filename = url.slice(BASE_CHARACTERS_URL.length);
const filename = url.slice(BASE_URL.length);
return {
filename: filename,
blob: resp.blob()
Expand All @@ -20,6 +20,7 @@ const exportZip = (specificName, blobData) => {
blobData.forEach((blob) => {
zip.file(`${decodeURI(blob.filename)}`, blob.blob);
});

zip.generateAsync({type: 'blob'}).then(zipFile => {
const currentDate = new Date().getTime();
const fileName = `${charname}.zip`;
Expand Down
Loading

0 comments on commit 1ba9b76

Please sign in to comment.