mirror of
https://github.com/eliasstepanik/vdo.ninja.git
synced 2026-01-14 23:28:30 +00:00
clock=N
This commit is contained in:
parent
7032ba95c8
commit
17c6377773
6
lib.js
6
lib.js
@ -11393,7 +11393,7 @@ function toggleClock(){
|
||||
if (session.showTime){
|
||||
clearInterval(session.showTime);
|
||||
session.showTime = null;
|
||||
var clock = document.getElementById("overlayClock2");
|
||||
var clock = getById("overlayClock2");
|
||||
clock.ctx = null;
|
||||
clock.canvas = null;
|
||||
|
||||
@ -11410,7 +11410,7 @@ function toggleClock(){
|
||||
} else {
|
||||
var time = new Date();
|
||||
|
||||
var clock = document.getElementById("overlayClock2");
|
||||
var clock = getById("overlayClock2");
|
||||
if (clock.ctx){
|
||||
clock.ctx.beginPath();
|
||||
clock.ctx.rect(0, 0, 230, 40);
|
||||
@ -11427,7 +11427,7 @@ function toggleClock(){
|
||||
session.showTime = setInterval(function(){
|
||||
var time = new Date();
|
||||
|
||||
var clock = document.getElementById("overlayClock2");
|
||||
var clock = getById("overlayClock2");
|
||||
if (clock.ctx){
|
||||
clock.ctx.beginPath();
|
||||
clock.ctx.rect(0, 0, 230, 40);
|
||||
|
||||
24
main.css
24
main.css
@ -390,6 +390,30 @@ button.white:active {
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
}
|
||||
#overlayClockContainer2.top {
|
||||
top:0%;
|
||||
bottom:unset;
|
||||
}
|
||||
#overlayClockContainer2.vmiddle {
|
||||
bottom:48%;
|
||||
top:unset;
|
||||
}
|
||||
#overlayClockContainer2.bottom {
|
||||
bottom:0%;
|
||||
top:unset;
|
||||
}
|
||||
#overlayClockContainer2.left {
|
||||
right:unset;
|
||||
left:0;
|
||||
}
|
||||
#overlayClockContainer2.hmiddle {
|
||||
right:45%;
|
||||
left:unset;
|
||||
}
|
||||
#overlayClockContainer2.right {
|
||||
right:0;
|
||||
left:unset;
|
||||
}
|
||||
#overlayClock2{
|
||||
padding:0 5px;
|
||||
background-color: #0009;
|
||||
|
||||
31
main.js
31
main.js
@ -3764,13 +3764,40 @@ async function main(){ // main asyncronous thread; mostly initializes the user s
|
||||
}
|
||||
}
|
||||
if (urlParams.has('clock')){
|
||||
session.showTime = true;
|
||||
if (urlParams.get('clock') === "false"){
|
||||
session.showTime = false;
|
||||
} else if (urlParams.get('clock') === "0"){
|
||||
session.showTime = false;
|
||||
} else {
|
||||
session.showTime = true;
|
||||
} else if (urlParams.get('clock') === "1"){
|
||||
getById("overlayClockContainer2").classList.add("top");
|
||||
getById("overlayClockContainer2").classList.add("left");
|
||||
} else if (urlParams.get('clock') === "7"){
|
||||
getById("overlayClockContainer2").classList.add("bottom");
|
||||
getById("overlayClockContainer2").classList.add("left");
|
||||
} else if (urlParams.get('clock') === "4"){
|
||||
getById("overlayClockContainer2").classList.add("vmiddle");
|
||||
getById("overlayClockContainer2").classList.add("left");
|
||||
} else if (urlParams.get('clock') === "2"){
|
||||
getById("overlayClockContainer2").classList.add("top");
|
||||
getById("overlayClockContainer2").classList.add("hmiddle");
|
||||
} else if (urlParams.get('clock') === "8"){
|
||||
getById("overlayClockContainer2").classList.add("bottom");
|
||||
getById("overlayClockContainer2").classList.add("hmiddle");
|
||||
} else if (urlParams.get('clock') === "5"){
|
||||
getById("overlayClockContainer2").classList.add("vmiddle");
|
||||
getById("overlayClockContainer2").classList.add("hmiddle");
|
||||
} else if (urlParams.get('clock') === "3"){
|
||||
getById("overlayClockContainer2").classList.add("top");
|
||||
getById("overlayClockContainer2").classList.add("right");
|
||||
} else if (urlParams.get('clock') === "9"){
|
||||
getById("overlayClockContainer2").classList.add("bottom");
|
||||
getById("overlayClockContainer2").classList.add("right");
|
||||
} else if (urlParams.get('clock') === "6"){
|
||||
getById("overlayClockContainer2").classList.add("vmiddle");
|
||||
getById("overlayClockContainer2").classList.add("right");
|
||||
}
|
||||
|
||||
} else if (session.cleanOutput){
|
||||
session.showTime = false;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user