Differences
This shows you the differences between two versions of the page.
|
on_screen_clock [2021/07/30 11:39] bgfdsuperadmin created |
on_screen_clock [2021/07/30 11:51] (current) bgfdsuperadmin |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ===== On Screen Clock ===== | ===== On Screen Clock ===== | ||
| This short php script generates an on screen clock with a green chroma-key background that can be used in OBS... | This short php script generates an on screen clock with a green chroma-key background that can be used in OBS... | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | html, body { | ||
| + | background-color: | ||
| + | font-family: | ||
| + | color: | ||
| + | text-shadow: | ||
| + | font-size: | ||
| + | } | ||
| + | .center { | ||
| + | display: flex; | ||
| + | justify-content: | ||
| + | align-items: | ||
| + | height: 100%; | ||
| + | } | ||
| + | </ | ||
| + | < | ||
| + | function startTime() { | ||
| + | const today = new Date(); | ||
| + | let h = today.getHours(); | ||
| + | let m = today.getMinutes(); | ||
| + | let s = today.getSeconds(); | ||
| + | m = checkTime(m); | ||
| + | s = checkTime(s); | ||
| + | document.getElementById(' | ||
| + | setTimeout(startTime, | ||
| + | } | ||
| + | |||
| + | function checkTime(i) { | ||
| + | if (i < 10) {i = " | ||
| + | return i; | ||
| + | } | ||
| + | </ | ||
| + | </ | ||
| + | <body onload=" | ||
| + | <div id=" | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | </ | ||