summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian <stayawake@lavabit.com>2014-02-14 19:35:23 +0100
committerFlorian <stayawake@lavabit.com>2014-02-14 19:35:23 +0100
commit70506cc35a86b9f18e5076ec5137c1d22ee77f76 (patch)
treeb01f1f14eb4b4426398d596dbe3dd6209deea4e0
parentf51686fe129649a524d839f27d6b3dd5d0e80fda (diff)
new init-function
-rw-r--r--js/cctv-control.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/js/cctv-control.js b/js/cctv-control.js
index 75dc5cf..0dfd1d0 100644
--- a/js/cctv-control.js
+++ b/js/cctv-control.js
@@ -21,7 +21,7 @@ var formActive = false;
window.onDomReady = initReady;
//change from testbild to default cam when DOM is ready
-window.onDomReady(changeCam);
+window.onDomReady(initViewer);
function initReady(fn) {
if(document.addEventListener) {
@@ -29,11 +29,15 @@ function initReady(fn) {
}
}
+//hide the form, and switch on camera
+function initViewer() {
+ document.getElementById('form').style.visibility = "hidden";
+ changeCam();
+ }
+
//change currently displayed camera to the one in cam variable
function changeCam() {
- document.getElementById('form').style.visibility = "hidden";
-
var display = document.getElementById('screen');
if (cam <= 7 && cam >= 0) {
camDisplay = cam + 1;