mirror of
https://github.com/captbaritone/webamp.git
synced 2026-07-21 09:09:01 +00:00
Remove script loading from initialize (#889)
This commit is contained in:
parent
f10ca23501
commit
eb2b318af8
2 changed files with 4 additions and 6 deletions
|
|
@ -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,
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue