Add Hong Kong
parent
abc456e724
commit
adc4baa63e
|
|
@ -19,6 +19,7 @@
|
||||||
const dubaiTimeOffset=240;
|
const dubaiTimeOffset=240;
|
||||||
const laTimeOffset=-420;
|
const laTimeOffset=-420;
|
||||||
const parisTimeOffset=120;
|
const parisTimeOffset=120;
|
||||||
|
const hongKongTimeOffset=480
|
||||||
|
|
||||||
var showCityName=false;
|
var showCityName=false;
|
||||||
|
|
||||||
|
|
@ -51,7 +52,9 @@
|
||||||
case "Paris":
|
case "Paris":
|
||||||
timeOffset=parisTimeOffset;
|
timeOffset=parisTimeOffset;
|
||||||
break;
|
break;
|
||||||
|
case "Hong Kong":
|
||||||
|
timeOffset=hongKongTimeOffset;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
//Nothing else matches
|
//Nothing else matches
|
||||||
timeOffset=0
|
timeOffset=0
|
||||||
|
|
@ -93,6 +96,9 @@
|
||||||
case "New York":
|
case "New York":
|
||||||
finalCityStr="NYC";
|
finalCityStr="NYC";
|
||||||
break;
|
break;
|
||||||
|
case "Hong Kong":
|
||||||
|
finalCityStr="HK";
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
//Nothing else matches
|
//Nothing else matches
|
||||||
finalCityStr=cityName;
|
finalCityStr=cityName;
|
||||||
|
|
@ -318,6 +324,33 @@
|
||||||
run : function() {
|
run : function() {
|
||||||
//toggle showCityName
|
//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;
|
showCityName=!showCityName;
|
||||||
this.emit("redraw");
|
this.emit("redraw");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue