ibi icon

Dual Monitor Taskbar Clock (dualmonclock.hta)

ibi | PRO | 06/09/14 10:49:13 PM UTC | 0 ⭐ | 854 👁️ | Never ⏰ | []
JavaScript |

1.8 KB

|

None

|

0 👍

/

0 👎

<html>
<head>
<hta:application id="dualmonclock" applicationname="dualmonclock" border="dialog" borderstyle="normal"  innerborder="no" scroll="no" selection="no" caption="yes" showintaskbar="yes" contextmenu="yes" sysmenu="yes" minimizebutton="yes" maximizebutton="no" application="yes" single-instance="yes" icon="http://dev.tlr.de/res/dumoclock.ico" version="1.0"/>
<title>dualmonclock</title>
<script>
// filename: dualmonclock.hta
// (c)05/2014 by ibi
function UpdateTime() {
    var dDatum = new Date();
    day = dDatum.getDate(); if (day <10) { day = "0"+day };
    mon = dDatum.getMonth()+1; if (mon <10) { mon = "0"+mon };
    year = dDatum.getFullYear();
    hrs = dDatum.getHours(); if (hrs <10) { hrs = "0"+hrs };
    mins = dDatum.getMinutes(); if (mins <10) { mins = "0"+mins };
    secs = dDatum.getSeconds(); if (secs <10) { secs = "0"+secs };
    dDateString = day + "." + mon + "." + year ;
    dClockString = hrs + ":" + mins + ":" + secs;
    document.title = dClockString;
    document.all.datefield.innerHTML= dDateString + "<br>" + dClockString;
    window.setTimeout(function() {UpdateTime()}, 1000); // refresh every second
    }
 
</script>
<style>
 body, button, input, p, td, select {font-family:Segoe UI;font-size:14px}
 .bigfont {font-size:20px;font-weight:bold}
 .smallnote {font-family:Sans Serif;font-size:10px;padding-top:8px;line-height:90%}
</style>
</head>
<body id="gbody" onLoad="window.resizeTo(240,180);UpdateTime()" style="background-color:#f1f1f1;margin-top:0;" text=#000000 link=#000099 vlink=#000099 alink=#000099>
 
<fieldset style="padding:10px">
<legend>Current time is</legend>
<div id="datefield" class="bigfont">
initializing...
</div>
</fieldset>
 
<div class="smallnote">Note: Run this program minimized on your second monitor.</div>
 
</body>
</html>

Comments