Browse Source

Show only starred stations in station.html

master
Kenneth Bruen 1 year ago
parent
commit
347df88226
Signed by: kbruen
GPG Key ID: C1980A470C3EE5B1
  1. 7
      station.js
  2. 2
      sw.js

7
station.js

@ -246,19 +246,14 @@ function csk() {
return return
} }
if (focusedElement.id === 'stationName') {
goToTrain(document.activeElement.value.trim())
}
else {
focusedElement.click() focusedElement.click()
} }
}
window.addEventListener('load', function (e) { window.addEventListener('load', function (e) {
if (window.localStorage) { if (window.localStorage) {
var maybeStarred = JSON.parse(localStorage.getItem('stations/starred')) var maybeStarred = JSON.parse(localStorage.getItem('stations/starred'))
if (maybeStarred) { if (maybeStarred) {
starred = maybeStarred starred = maybeStarred.filter(function (item) { return item.id })
} }
} }

2
sw.js

@ -1,4 +1,4 @@
const VERSION = 'v18' const VERSION = 'v19'
const CACHE_FIRST = [ const CACHE_FIRST = [
// Root // Root

Loading…
Cancel
Save