Skip to content

Commit

Permalink
allow saved tempo to be deleted via context menu
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Grahn committed Dec 3, 2023
1 parent dd11d7d commit f8bd041
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -693,9 +693,22 @@ var onContextTap=function(e){
storageWriteKeyVal("ab."+vidId,JSON.stringify(entry));
}
}
else if(tempo==""){
beatNormal=undefined;
e.target.innerHTML="tap";
if(vidId) {
let entry={}, old;
if(storage.getItem("ab."+vidId)) old=JSON.parse(storage.getItem("ab."+vidId));
if(old && old.bmks) {
entry.bmks=old.bmks;
storageWriteKeyVal("ab."+vidId,JSON.stringify(entry));
}
else storage.removeItem("ab."+vidId);
}
}
},
null, "Enter tempo (BPM):", (beatNormal ? null : "<a number, e. g. 120.345>"), curTempo,
{r:1, c:24}
{r:1, c:28}
);
}

Expand Down
Binary file modified zip/ABLoopPlayer.zip
Binary file not shown.

0 comments on commit f8bd041

Please sign in to comment.