Add files via upload

This commit is contained in:
Keb Helion 2020-02-14 00:49:38 -05:00 committed by GitHub
parent eb99be380a
commit b95d9f84ba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -56,15 +56,14 @@
EventBridge.emitWebEvent(JSON.stringify(readyEvent));
}
var currentlyRunningScripts = {};
EventBridge.scriptEventReceived.connect(function(message){
currentlyRunningScripts = JSON.parse(message);
//update the buttons
buttonList.forEach(function(item){
var btn = "";
if(CheckRunning(item.url) != false){
if(message.indexOf(item.url) != -1){
//Means already running
btn = "<button class='uninstall' onclick='uninstall(" + item.url + ", " + item.id + ");'>Uninstall</button>";
}else{
@ -107,15 +106,7 @@
}
function CheckRunning(scriptUrl){
alert("checkrunning!");
if(currentlyRunningScripts.some(currentlyRunningScripts => currentlyRunningScripts.path === scriptUrl)){
return true;
} else{
return false;
}
}
</script>
<style>