From 4fa4d8da5387dd6fcc24d06a75878c1246a815ab Mon Sep 17 00:00:00 2001 From: Jorge Barata Date: Fri, 1 Dec 2023 13:37:44 +0100 Subject: [PATCH] SEO --- index.html | 57 +++++++++- public/favicon.ico | Bin 4286 -> 0 bytes public/favicon.svg | 177 ++++++++++++++++++++++++++++++ src/App.svelte | 262 +++++++++++++++++++-------------------------- 4 files changed, 344 insertions(+), 152 deletions(-) delete mode 100644 public/favicon.ico create mode 100644 public/favicon.svg 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

+
+

+ A tool for detecting plagiarism in + Scratch projects. +

+ +

+ Provide a folder or a ZIP file containing projects in the + Scratch File Format + (".sb3"). The tool will compare the + blocks + and + targets + and give a score based on its similarity. +

+

+ Try + uploading an example. +

+
+
+
+ diff --git a/public/favicon.ico b/public/favicon.ico deleted file mode 100644 index 92d2a5b00240dabf8a4ce4c3be6c9b431dbce1dd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4286 zcmb7HYfM~46uxL{fAo(U-!ZoFk?0>|)M!jhs=w4kf0}4*dA3qY4Czb3N`XpZh*E74 zYlxwiKq;0!q%ke@Nn317Ng81nShm3OSl$clvR!uf-reJOX7>*C?xpM=@^SCXJ#)S} zbIzQZRg@(BtzE0|f92@Iit>b_C@%x(Qr-i&KT#o~Bw#i00dOQ74v*le;yDR4;yoF7 zEK$4h>cjS{p-`v_TzB!ll-$6FPk{G<*MX;j2jb;eN)I+(jQXhIeK`q1cMj+RYN4D3 zJinCfc=|E^Bp|t6fk`?)(L~2aj?kI$(=_B8pl~<@l^DSk!fy0l06vR{%cz5Kp8`QZ zh;7b7#r6Wqw4_sd$41(0Nu`}#+o;oR!5qR-t(XT-&I#lI3B?08PwCdC{Nq&G_X8!j ze;$LB_KlQn&7_>pZ2Gacm~KwDkYDrNGpFcUY=FHaqn~DNo-6R5&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UWxJI0Pn=NV4yLlSr zcJHL#IZk&eKD>Rn*mk_{821Xmzy0R$lxG6orMPhhHIDy-J76s};XddN@Xrq^T=zK; z&&11V)Wg^pfC7MH$amRzg=<&~@RreLqHWmV-@&{m`1j07tcL|L9l|^NXC@kSIOcBv z3B`S>xxo(K%^m?>Q&sh2Jkx+?@bKN5eP!H5y9;y6#rsRZvcJ7FR9j71MSkT$Ac + + + + + + + + + + + + + + + + + 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} -
- -
- {/each} - -
-
- 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}
- - + {checker.label} - {strategy == "folder" && file ? file?.name : "No folder chosen"}
-
- - -
-
- - - {fetchStatus || "No URL chosen"} -
-
- (checkerIds = DEFAULT_CHECKER_IDS.slice())} + style:float="right">Reset +
+
+ Target to 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 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"} +
+
+ + +
+
+ + + {fetchStatus || "No URL chosen"} +
+ +
+ {#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} +