add conv and dark anchors
This commit is contained in:
parent
b79d2f879c
commit
5657b28280
|
@ -7,9 +7,12 @@ html {
|
|||
width: 100%;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
font-size: 55px;
|
||||
}
|
||||
|
||||
body {
|
||||
background: #f1f1f1;
|
||||
color: #326f0c;
|
||||
font-size: 55px;
|
||||
}
|
||||
|
||||
#wrap {
|
||||
|
|
22
dtimeconv.js
22
dtimeconv.js
|
@ -2,15 +2,19 @@
|
|||
* https://gitlab.com/zlax/dtime-js discrodian date and time converter
|
||||
*/
|
||||
|
||||
function showconv() {
|
||||
document.getElementById("dconv").innerHTML = converterhtml();
|
||||
var currentdate = new Date();
|
||||
document.getElementById("ctimeoffset").value = currentdate.getTimezoneOffset();
|
||||
filltimes(currentdate);
|
||||
}
|
||||
|
||||
function timeclick() {
|
||||
if (window.dtimescreen) window.dtimescreen++;
|
||||
else window.dtimescreen = 1;
|
||||
switch (window.dtimescreen) {
|
||||
case 1:
|
||||
document.getElementById("dconv").innerHTML = converterhtml();
|
||||
var currentdate = new Date();
|
||||
document.getElementById("ctimeoffset").value = currentdate.getTimezoneOffset();
|
||||
filltimes(currentdate);
|
||||
showconv();
|
||||
break;
|
||||
case 2:
|
||||
document.getElementById("dconv").innerHTML = "";
|
||||
|
@ -145,3 +149,13 @@ function converterhtml() {
|
|||
`;
|
||||
return convinnerhtml;
|
||||
}
|
||||
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
if (window.location.hash == "#c" || window.location.hash == "#conv" || window.location.hash == "#converter") {
|
||||
window.dtimescreen = 1;
|
||||
showconv();
|
||||
}
|
||||
if (window.location.hash == "#d" || window.location.hash == "#dark") {
|
||||
document.body.style.background = '#2e3235';
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue