Skip to content

Commit

Permalink
add wk file-end recognition
Browse files Browse the repository at this point in the history
allows for wk (watermelon katana) configuration files to be hosted for your projects on your repo without needing a deploy link to serve the files
  • Loading branch information
Varrience authored Jan 24, 2025
1 parent 2f879a5 commit 8ac4b80
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions API/Project/project.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ processLink(link,thumbnail) {
const iscdo = link.match(/^https?:\/\/studio\.code\.org\/projects\/(applab|gamelab)\/([^/]+)/);
const isscratch = link.match(/^https?:\/\/scratch\.mit\.edu\/projects\/(\d+)/) || link.match(/^https?:\/\/turbowarp\.org\/(\d+)/);
const iskhan = link.match(/^https?:\/\/www\.khanacademy\.org\/computer-programming\/([^/]+\/\d+)/);
const isjsfile = link.match(/^https?:\/\/[^\s]*\.js$/);
const iswk = link.match(/^https?:\/\/[^\s]*\.wk$/);
const isswf = link.match(/^https?:\/\/[^\s]*\.swf$/);
if (!thumbnail && iscdo) thumbnail = `https://studio.code.org/v3/files/${iscdo[2]}/.metadata/thumbnail.png`;
if (!thumbnail && isscratch) thumbnail = `https://uploads.scratch.mit.edu/get_image/project/${isscratch[1]}_432x288.png`;
Expand All @@ -28,9 +28,9 @@ processLink(link,thumbnail) {
link = iskhan[0];
platform = "khan";
}
if (isjsfile) {
link = isjsfile[0];
platform = "js";
if (iswk) {
link = iswk[0];
platform = "wk";
}
if (isswf) {
link = isswf[0];
Expand Down

0 comments on commit 8ac4b80

Please sign in to comment.