diff --git a/static/js/index.js b/static/js/index.js
index 0c3106a..5fef39f 100644
--- a/static/js/index.js
+++ b/static/js/index.js
@@ -336,8 +336,10 @@ function showApps() {
console.log(api.toString());
});
});
- $(".mdl-layout__header-row").append($("
", {html:$("

"), class: 'cancel-current', id: 'quitCurrentApp'}).append($("
", {html: 'Quit Current App', class:"game-title"})));
- $('#quitCurrentApp').on('click', function() {api.quitApp(); api.refreshServerInfo(); });
+ if($('#quitCurrentApp').length === 0) {
+ $(".mdl-layout__header-row").append($("", {html:$("

"), class: 'cancel-current', id: 'quitCurrentApp'}).append($("
", {html: 'Quit Current App', class:"game-title"})));
+ $('#quitCurrentApp').on('click', function() {api.quitApp(); api.refreshServerInfo(); });
+ }
}, function (failedAppList) {
console.log('Failed to get applist from host: ' + api.address);