Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added injuries field #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions doesscreens.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@ var DoES = (function() {
clearInterval(page_timeout_interval);
}
}, 60000);

var last_explosion = new Date('2016/10/05 16:07');
var last_flood = new Date('2016/01/05 17:15');
var last_injury = new Date('2017/02/27 10:05');

function seasonalUpdates() {
if (page_load_time.getMonth() == 11 || ( page_load_time.getMonth() == 0 && page_load_time.getDate() < 7)) {
document.write('<script type="text/javascript" src="snow.js"></script>');
Expand Down Expand Up @@ -295,6 +298,8 @@ var DoES = (function() {
$('.explosions .days').text(days);
days = Math.floor((now - last_flood) / 86400000)
$('.floods .days').text(days);
days = Math.floor((now - last_injury) / 86400000);
$('.injuries .days').text(days);
}

$(function(){
Expand Down
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<h1 class="welcome">Welcome to <span class="doesname">DoES Liverpool</span></h1>
<h2 class="explosions">Days since last explosion: <span class="days">?</span></h2>
<h2 class="floods">Days since last flood: <span class="days">?</span></h2>
<h2 class="injuries">Days since last injury: <span class="days">?</span></h2>
<!--
<h1>Welcome Open Labs Developer Breakfast and Ada Lovelace Open Day attendees!</h1>
-->
Expand Down