summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorFlorian <stayawake@lavabit.com>2014-02-07 18:18:50 +0100
committerFlorian <stayawake@lavabit.com>2014-02-07 18:18:50 +0100
commitc7c87eccc2d7deb05826ead8d15f4ddbb5ce4908 (patch)
tree13ea3b2e9e31d89d0021f5d9ebcad237fe84b67a /js
parente75c7a5cb28307509b68c2a0832d704abdd7c565 (diff)
added localstorage test file
Diffstat (limited to 'js')
-rw-r--r--js/load-local-storage.js38
1 files changed, 38 insertions, 0 deletions
diff --git a/js/load-local-storage.js b/js/load-local-storage.js
new file mode 100644
index 0000000..b3c26e8
--- /dev/null
+++ b/js/load-local-storage.js
@@ -0,0 +1,38 @@
+// CCTV Control
+//
+// Author: Florian Raemisch
+// Email: olf@subsignal.org
+//
+// cctv-control is a webinterface to control and view
+// mjpeg encoded videos by cctv cameras which are
+// proxied by mjpegplexer. camera control is possible
+// with arrow-keys, if mjpegplexer is configured
+// properly.
+//
+// This Software is licensed under the GPL Version 3, 29 June 2007
+
+
+window.onDomReady = initReady;
+
+
+window.onDomReady(loadImg);
+
+
+function initReady(fn) {
+ if(document.addEventListener) {
+ document.addEventListener("DOMContentLoaded", fn, false);
+ }
+}
+
+
+function loadImg() {
+
+ var display = document.getElementById("storImage"),
+ stor = localStorage.getItem("snapShot")
+
+ if (stor) {
+ display.setAttribute("src", stor);
+ }
+
+
+}