mirror of http://git.sublab.org/cctv-control/
42 lines
912 B
JavaScript
42 lines
912 B
JavaScript
// 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"),
|
|
body = document.getElementById("formBackground"),
|
|
stor = localStorage.getItem("snapShot");
|
|
|
|
if (stor) {
|
|
display.setAttribute("src", stor);
|
|
document.body.style.background="#f3f3f3 url('"+ stor + "') no-repeat";
|
|
display.setAttribute("src", stor);
|
|
}
|
|
|
|
|
|
}
|