Created
April 28, 2020 22:59
-
-
Save raspberrypisig/64c4079479295043fb8a77d07005af73 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>A simple clock</title> | |
</head> | |
<body translate="no" > | |
<div id="output"></div> | |
<script> | |
var c; | |
setInterval( | |
c = function() { | |
//output.innerText = moment().format(urlParams["format"] || ''); | |
//output.innerText = moment().format("H:MM:SS A") | |
const d = new Date(); | |
const h = d.getHours(); | |
const m = d.getMinutes(); | |
let mm = m.toString(); | |
if (m<9) { | |
mm = "0" + m | |
} | |
const am = (h>12)?"PM":"AM"; | |
output.innerText = h.toString() + ":" + mm + " " + am; | |
}, 100); | |
c(); | |
</script> | |
</body> | |
</html> | |
<!-- | |
OBS->Browser->Custom CSS | |
body { | |
color: white; | |
font-size: 100px; | |
} | |
--> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment