Skip to content

Commit 7776ff5

Browse files
committed
update time dropdown from URL
1 parent 0a75202 commit 7776ff5

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

js/tracker.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,8 @@ function load() {
500500
var div = L.DomUtil.create('div');
501501

502502
div.innerHTML = '<select name="timeperiod" id="timeperiod" style="width:auto !important;height:30px;" onchange="clean_refresh(this.value)"><option value="1 hour">1 hour</option><option value="3 hours" selected="selected">3 hours</option><option value="6 hours">6 hours</option><option value="12 hours">12 hours</option></select>';
503-
503+
div.innerHTML.onload = setTimeValue();
504+
504505
return div;
505506
},
506507

@@ -565,6 +566,12 @@ function load() {
565566
}, 500);
566567
}
567568

569+
function setTimeValue() {
570+
setTimeout(function() {
571+
document.getElementById("timeperiod").value = wvar.mode;
572+
}, 100);
573+
}
574+
568575
function showLaunchSites() {
569576
if (!launches) {
570577
launches = new L.layerGroup([], {attribution: "© <a href='https://github.com/rs1729/RS/issues/15' target='_blank' rel='noopener'>rs1729</a>"});

0 commit comments

Comments
 (0)