Skip to content

Commit

Permalink
Update top-right.html
Browse files Browse the repository at this point in the history
Cleaned up the code a bit...
  • Loading branch information
zhivotnoya committed Aug 12, 2023
1 parent a05a5b3 commit edd6f71
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions top-right.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,24 +75,18 @@
<span id="player">XXX</span>
<span id="callsign">[000]</span>&nbsp;&nbsp;<br />
<span id="agency">XXX</span>&nbsp;&nbsp;<br />
<span style="padding:0px;margin:0px;" id="day">00</span>
<span style="padding:0px;margin:0px;" id="month">XXX</span>
<span style="padding:0px;margin:0px;" id="year">0000</span>&nbsp;
<span style="padding:0px;margin:0px;" id="hr">00</span>
<span style="padding:0px;margin:0px;">:</span>
<span style="padding:0px;margin:0px;" id="min">00</span>
<span style="padding:0px;margin:0px;">:</span>
<span style="padding:0px;margin:0px;" id="sec">00</span>
<span style="padding:0px;margin:0px;" id="date-span">00 XXX 0000</span>
<span style="padding:0px;margin:0px;" id="time-span">00:00:00</span>
<span style="padding:0px;margin:0px;" id="tz">XX</span>&nbsp;&nbsp;
</div>
</div>
</body>

<script>
//***edit this only for your information***
const player = "ALEJANDRO CORRALES";
const player = "M. HIGHTOWER";
const agency = "LOS SANTOS SHERIFF DEPARTMENT";
const callsign = "[8730]";
const callsign = "[300]";
//*** end edit this only ***

var d,h,m,s,animate;
Expand All @@ -108,13 +102,6 @@
d=new Date();
updateTime();
updateDate();
$('sec', s);
$('min', m);
$('hr', h);
$('tz', t);
$('day', day);
$('year', year);
$('month', monthNames[month]);
$('player', player);
$('agency', agency);
$('callsign', callsign);
Expand All @@ -123,14 +110,27 @@

function updateDate(){
day=d.getDate();
month=d.getMonth();
month=monthNames[d.getMonth()];
year=d.getFullYear();
var d_str = day + " " + month + " " + year;
document.getElementById('date-span').innerHTML = d_str;
};

function updateTime(){
h=d.getHours();
m=d.getMinutes();
s=d.getSeconds();
if (h < 10) {
h = "0" + h;
}
if( m < 10 ) {
m = "0" + m;
}
if( s < 10 ) {
s = "0" + s;
}
var t_str = h + ":" + m + ":" + s + " ";
document.getElementById('time-span').innerHTML = t_str;
};

function $(id,val){
Expand Down

0 comments on commit edd6f71

Please sign in to comment.