mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-20 14:56:19 -04:00
Added module and threading support for the inline version.
This commit is contained in:
parent
a61cf6a68a
commit
a4aee761c2
5 changed files with 100 additions and 20 deletions
|
@ -46,6 +46,11 @@ self.addEventListener("message", function(e) {
|
|||
case "silentBake":
|
||||
silentBake(e.data.data);
|
||||
break;
|
||||
case "docURL":
|
||||
// Used to set the URL of the current document so that scripts can be
|
||||
// imported into an inline worker.
|
||||
self.docURL = e.data.data;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -107,7 +112,7 @@ function loadRequiredModules(recipeConfig) {
|
|||
|
||||
if (!OpModules.hasOwnProperty(module)) {
|
||||
console.log("Loading module " + module);
|
||||
self.importScripts(module + ".js");
|
||||
self.importScripts(self.docURL + "/" + module + ".js");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue