Skip to content

Commit 10f8a27

Browse files
authored
Merge pull request projecthorus#34 from LukePrior/testing
URL fixes
2 parents 672c3a4 + 7776ff5 commit 10f8a27

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

js/tracker.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,10 @@ function load() {
450450
map.addLayer(launches);
451451
}
452452

453+
map.on('moveend', function (e) {
454+
lhash_update();
455+
});
456+
453457
map.on('baselayerchange', function (e) {
454458
selectedLayer = e.layer.id;
455459
});
@@ -496,7 +500,8 @@ function load() {
496500
var div = L.DomUtil.create('div');
497501

498502
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>';
499-
503+
div.innerHTML.onload = setTimeValue();
504+
500505
return div;
501506
},
502507

@@ -561,6 +566,12 @@ function load() {
561566
}, 500);
562567
}
563568

569+
function setTimeValue() {
570+
setTimeout(function() {
571+
document.getElementById("timeperiod").value = wvar.mode;
572+
}, 100);
573+
}
574+
564575
function showLaunchSites() {
565576
if (!launches) {
566577
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)