diff --git a/BottomSpace/DeleteTradingHistory.js b/BottomSpace/DeleteTradingHistory.js index 7b6d1a640..11df08eee 100644 --- a/BottomSpace/DeleteTradingHistory.js +++ b/BottomSpace/DeleteTradingHistory.js @@ -65,7 +65,9 @@ function newDeleteTradingHistory() { if (INFO_LOG === true) { logger.write("[INFO] onClick -> Entering function."); } - if (window.CURRENT_BOT_DISPLAY_NAME === "") { return; } + let user = window.localStorage.getItem("user"); + + if (user === null) { return; } /* @@ -286,7 +288,9 @@ function newDeleteTradingHistory() { if (INFO_LOG === true) { logger.write("[INFO] draw -> Entering function."); } - if (window.CURRENT_BOT_DISPLAY_NAME === "") { return; } + let user = window.localStorage.getItem("user"); + + if (user === null) { return; } thisObject.container.frame.draw(false, false); diff --git a/BottomSpace/PlayStopButton.js b/BottomSpace/PlayStopButton.js index 37b4a8b7b..558633a2c 100644 --- a/BottomSpace/PlayStopButton.js +++ b/BottomSpace/PlayStopButton.js @@ -59,7 +59,9 @@ function newPlayStopButton() { function onClick() { - if (window.CURRENT_BOT_DISPLAY_NAME === "") { return; } + let user = window.localStorage.getItem("user"); + + if (user === null) { return; } switch (showing) { @@ -122,7 +124,9 @@ function newPlayStopButton() { function draw() { - if (window.CURRENT_BOT_DISPLAY_NAME === "") { return; } + let user = window.localStorage.getItem("user"); + + if (user === null) { return; } thisObject.container.frame.draw(false, false);