Add Hong Kong

master
RKBoss6 2025-06-19 16:11:17 -04:00 committed by GitHub
parent abc456e724
commit adc4baa63e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 34 additions and 1 deletions

View File

@ -19,6 +19,7 @@
const dubaiTimeOffset=240;
const laTimeOffset=-420;
const parisTimeOffset=120;
const hongKongTimeOffset=480
var showCityName=false;
@ -51,7 +52,9 @@
case "Paris":
timeOffset=parisTimeOffset;
break;
case "Hong Kong":
timeOffset=hongKongTimeOffset;
break;
default:
//Nothing else matches
timeOffset=0
@ -93,6 +96,9 @@
case "New York":
finalCityStr="NYC";
break;
case "Hong Kong":
finalCityStr="HK";
break;
default:
//Nothing else matches
finalCityStr=cityName;
@ -318,6 +324,33 @@
run : function() {
//toggle showCityName
showCityName=!showCityName;
this.emit("redraw");
}
},
{ name : "Hong Kong",
get : () => {
return {
text : getWorldDateString("Hong Kong"),
//blank image
img : atob("GBiBAAB+AAP/wAeB4A4AcBgYGDAYDHAYDmAYBmAYBsAYA8AYA8AYA8AcA8AOA8AHA2ADBmAABnAADjAADBgAGA4AcAeB4AP/wAB+AA==")
};
},
show : function() {
this.interval = setTimeout(()=>{
this.emit("redraw");
this.interval = setInterval(()=>{
this.emit("redraw");
}, 60000);
}, 60000 - (Date.now() % 60000));
},
hide : function() {
clearInterval(this.interval);
this.interval = undefined;
},
run : function() {
//toggle showCityName
showCityName=!showCityName;
this.emit("redraw");
}