Skip to content

Commit

Permalink
Fix Lint wrong
Browse files Browse the repository at this point in the history
  • Loading branch information
0832k12 authored Jun 24, 2023
1 parent 4a5eacc commit 166baae
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions extensions/0832/LazyAudio.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,38 +102,39 @@
}
//动态菜单
_getMusic() {
const vars = vm.runtime.getAllVarNamesOfType('')
return vars.length == 0 ? [" "] : vars
const vars = vm.runtime.getAllVarNamesOfType('');
return vars.length == 0 ? [" "] : vars;
}

loadplay({ URL }) {
new Audio(URL).play();
async loadplay({ URL }) {
if (await Scratch.canFetch(URL))
{new Audio(URL).play();}
}

load({ URL, TEXT }) {
const vara = vm.runtime.getTargetForStage().lookupVariableByNameAndType(TEXT, '');
if (!vara) { return; }
if (!vara)
{return;};
vara.value = URL;
}

play({ MUSIC }) {
async play({ MUSIC }) {
const vara = vm.runtime.getTargetForStage().lookupVariableByNameAndType(MUSIC, '');
var varb = new Audio(vara.value)
vara.value = varb
if (await Scratch.canFetch(vara.value))
{var varb = new Audio(vara.value);}
vara.value = varb;
varb.play();
}
playjx({ MUSIC }) {
const vara = vm.runtime.getTargetForStage().lookupVariableByNameAndType(MUSIC, '');
var varb = vara.value
var varb = vara.value;
varb.play();
}
pause({ MUSIC }) {
const vara = vm.runtime.getTargetForStage().lookupVariableByNameAndType(MUSIC, '');
var varb = vara.value
var varb = vara.value;
varb.pause();
}

}

Scratch.extensions.register(new 懒音乐());
})(Scratch);
})(Scratch);

0 comments on commit 166baae

Please sign in to comment.