Skip to content

Commit 429c513

Browse files
committed
allow zip as image url
1 parent 1e9fcaf commit 429c513

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

squeak.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1366,6 +1366,11 @@ SqueakJS.runSqueak = function(imageUrl, canvas, options={}) {
13661366
}
13671367
// we need to fetch all files first, then run the image
13681368
processOptions(options);
1369+
if (imageUrl && imageUrl.endsWith(".zip")) {
1370+
options.zip = imageUrl.match(/[^\/]*$/)[0];
1371+
options.url = imageUrl.replace(/[^\/]*$/, "");
1372+
imageUrl = null;
1373+
}
13691374
if (!imageUrl && options.image) imageUrl = options.image;
13701375
var baseUrl = options.url || "";
13711376
if (!baseUrl && imageUrl && imageUrl.replace(/[^\/]*$/, "")) {

0 commit comments

Comments
 (0)