diff --git a/index.html b/index.html
index ce53715..cd06da6 100644
--- a/index.html
+++ b/index.html
@@ -2,12 +2,65 @@
-
+
Scratch Teacher Tools
+
-
+
+ Scratch Plagiarism Checker
+
+
+
+
diff --git a/public/favicon.ico b/public/favicon.ico
deleted file mode 100644
index 92d2a5b..0000000
Binary files a/public/favicon.ico and /dev/null differ
diff --git a/public/favicon.svg b/public/favicon.svg
new file mode 100644
index 0000000..039969f
--- /dev/null
+++ b/public/favicon.svg
@@ -0,0 +1,177 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+ Openclipart
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Clipart by Nicu Buculei - jigsaw_red_10
+
+
+ Nicu Buculei
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/App.svelte b/src/App.svelte
index 09f0a63..bb8b793 100644
--- a/src/App.svelte
+++ b/src/App.svelte
@@ -26,7 +26,6 @@
};
const uploadAndCheckZipFile = async (e: Event) => {
- e.preventDefault();
const inputFiles = (e.target as HTMLInputElement).files;
if (inputFiles != null && inputFiles.length > 0) {
file = inputFiles[0];
@@ -36,7 +35,6 @@
};
const fetchAndCheckRemoteZipFile = async (e: Event) => {
- e.preventDefault();
const url = prompt("Enter the URL of the ZIP file", EXAMPLE_ZIP_FILE_URL);
if (url) {
fetchStatus = `Fetching ${url}..`;
@@ -61,164 +59,128 @@
};
-
- Scratch Plagiarism Checker
-
- A tool for detecting plagiarism in Scratch projects .
-
-
-
- Checks to make
+
+
+ Checks to make
- {#each CHECKERS as checker}
-
-
- {checker.label}
-
- {/each}
- (checkerIds = DEFAULT_CHECKER_IDS.slice())}
- style:float="right">Reset
-
-
- Target to check
-
- Pick a folder or a ZIP file containing projects in
Scratch File Format ( ending in ".sb3").
-
- Try
- uploading
- the
- example ZIP file.
-
+ {#each CHECKERS as checker}
- Pick local folder:
- Choose Folder
+ {checker.label}
- {strategy == "folder" && file ? file?.name : "No folder chosen"}
-
- Upload ZIP file:
-
-
-
- Fetch ZIP URL:
- Choose URL
- {fetchStatus || "No URL chosen"}
-
-
- Rerun check (checkerIds = DEFAULT_CHECKER_IDS.slice())}
+ style:float="right">Reset
+
+
+ Target to check
+
+
Pick local folder:
+
Choose Folder
-
- {#if checkedProjects !== undefined}
-
- Plagiarism checks
- {#each checkedProjects as project}
-
-
- {project.path}
- {project.date.toLocaleString()}
-
- Plagiarists: {project.plagiarists.length}
-
-
- {#if project.plagiarists.length > 0}
- {#each project.plagiarists as plagiarist}
-
-
- {plagiarist.project.path}
-
- {plagiarist.project.date.toLocaleString()}
-
-
- Score: {plagiarist.score}/{plagiarist.maxScore}
-
-
-
- {#each plagiarist.checks as check}
- {check.label}:
-
{check.score}/{check.maxScore}
-
-
- Original
-
{JSON.stringify(
- check.values.older,
- undefined,
- 2
- )}
-
-
- Copy
-
{JSON.stringify(
- check.values.newer,
- undefined,
- 2
- )}
-
-
- {/each}
+ {strategy == "folder" && file instanceof FileSystemDirectoryHandle
+ ? file?.name
+ : "No folder chosen"}
+
+
+ Upload ZIP file:
+
+
+
+ Fetch ZIP URL:
+ Choose URL
+ {fetchStatus || "No URL chosen"}
+
+ Rerun check
+
+ {#if checkedProjects !== undefined}
+
+ Plagiarism checks
+ {#each checkedProjects as project}
+
+
+ {project.path}
+ {project.date.toLocaleString()}
+
+ Plagiarists: {project.plagiarists.length}
+
+
+ {#if project.plagiarists.length > 0}
+ {#each project.plagiarists as plagiarist}
+
+
+ {plagiarist.project.path}
+
+ {plagiarist.project.date.toLocaleString()}
+
+
+ Score: {plagiarist.score}/{plagiarist.maxScore}
-
- {/each}
- {:else}
- No plagiarists
- {/if}
-
- {/each}
-
-
- Scratch project.json documents
- {#each projects as project}
-
- {project.path}
-
+
+
+ {#each plagiarist.checks as check}
+ {check.label}:
+
{check.score}/{check.maxScore}
+
+
+ Original
+
{JSON.stringify(
+ check.values.older,
+ undefined,
+ 2
+ )}
+
+
+ Copy
+
{JSON.stringify(
+ check.values.newer,
+ undefined,
+ 2
+ )}
+
+
+ {/each}
+
+
+ {/each}
+ {:else}
+ No plagiarists
+ {/if}
+
+ {/each}
+
+
+ Scratch project.json documents
+ {#each projects as project}
+
+ {project.path}
+
{JSON.stringify(project.scratch, undefined, 2)}
-
- {/each}
-
- {/if}
-
-
+
+ {/each}
+
+ {/if}
+