From: Vincent Date: Thu, 20 May 2021 07:06:26 +0000 (+0200) Subject: . X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=f5a589bc35f96412c0b631d71305bdfc8247d052;p=tortuga-home.git . --- diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 2927002..f547f7e 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -3,6 +3,8 @@ + + diff --git a/js/home.js b/js/home.js index 4d1574c..330abab 100644 --- a/js/home.js +++ b/js/home.js @@ -414,8 +414,8 @@ $(function () { }); function checkPower() { - $.ajax('scripts/state.php?key=' + CONFIG.ROOM + '_power&default=0', function (data) { - power = (data == 1); + $.get('scripts/state.php?key=' + CONFIG.ROOM + '_power&default=0', function (data) { + window.power = (data == '1'); }); } @@ -649,7 +649,7 @@ function showScreenSaver() { if ($('main section:visible').data('section') === 'remote') { return; } - if (androidApp && !power) { + if (androidApp && !window.power) { return; } diff --git a/scripts/state.php b/scripts/state.php index 21be43c..df13647 100644 --- a/scripts/state.php +++ b/scripts/state.php @@ -1,3 +1,5 @@