You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

68 lines
1.5 KiB

<script src="//"></script>
<script src="//"></script>
<script src="lazyload.js"></script>
img.lazy {
border: 1px solid black;
margin-right: 100px;
$(function() {
function refresh() {
$("#cam").attr('src', $("#cam").attr('src') + "?" + new Date().getTime());
function createImageTag(file) {
var time = moment(file.time).format();
return $("<img class='lazy' width='640' height='480'>")
.attr('style', 'display:inline')
.attr('alt', 'time: ' + time)
.attr('title', 'time: ' + time)
function fetchHistory() {
$.getJSON("index.json", function(data) {
data.files.forEach(function(file) {
effect: "fadeIn"
setTimeout(refresh, 1000 * 60);
<h2>Cam capture live feed</h2>
<img src="image.jpg" alt="cam" id="cam">
<strong>DO NOT REFRESH</strong> page, happens automatically every 60 seconds.<br>
Last update: <h3 id="update"></h3>
<h2>HOURLY Cam history</h2>
<div id="history">
Fetching... Please wait.