Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html>
<head>
<title>Turm Fort Stahlberg</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="style.css">
<script src></script>
</head>
<body>
@Beneboe
Beneboe / countdown.js
Created January 29, 2013 20:00
Flexible countdown that can find out the countdown time automatically
function countdowntimer(element, secs) {
var i = (secs) ? secs : element.innerHTML;
var t1 = setInterval(function() {
if(i != 0){
i--;
}
else{
clearInterval(t1);
//timer ends here
}
@Beneboe
Beneboe / Keyinput.js
Created January 29, 2013 19:22
comes in handy when working with html5 canvas
var keyPressed;
document.onkeyup = function(event) {
keyPressed = String.fromCharCode(('which' in event) ? event.which : event.keyCode);
input();
};
function input() {
if(keyPressed == "D") document.write("hi");
}
@Beneboe
Beneboe / footer.css
Last active December 11, 2015 15:29
Makes the footer stick to the bottom of the page, even if the content doesn't fill the screen