diff --git a/modern/src/Actions.ts b/modern/src/Actions.ts index eb20a086..c18e65a6 100644 --- a/modern/src/Actions.ts +++ b/modern/src/Actions.ts @@ -57,7 +57,7 @@ export function gotSkinZip(zip: JSZip, store: ModernStore) { const makiTree = await initialize(zip, xmlTree, store); // Execute scripts - await Utils.asyncTreeFlatMap(makiTree, node => { + await Utils.asyncTreeFlatMap(makiTree, async node => { switch (node.name) { case "groupdef": { // removes groupdefs from consideration (only run scripts when actually referenced by group) @@ -73,9 +73,10 @@ export function gotSkinZip(zip: JSZip, store: ModernStore) { new Set(["group", "WinampAbstractionLayer", "WasabiXML"]) ); const system = new System(scriptGroup, store); + const script = await Utils.readUint8array(zip, node.attributes.file); run({ runtime, - data: node.js_annotations.script, + data: script, system, log: false, }); diff --git a/modern/src/initialize.js b/modern/src/initialize.js index 91557660..623628f8 100644 --- a/modern/src/initialize.js +++ b/modern/src/initialize.js @@ -121,10 +121,7 @@ const parsers = { menu: noop, albumart: noop, playlistplus: noop, - async script(node, parent, zip, store) { - const script = await Utils.readUint8array(zip, node.attributes.file); - return new MakiObject(node, parent, { script }, store); - }, + script: noop, }; async function parseChildren(node, children, zip, store) {