Implemented onclick for Refresh RSK
This commit is contained in:
parent
49df00f879
commit
39ba4d279c
1 changed files with 11 additions and 1 deletions
|
@ -210,6 +210,10 @@ window.addEventListener('unload', function (e) {
|
|||
}
|
||||
})
|
||||
|
||||
function rsk() {
|
||||
refresh()
|
||||
}
|
||||
|
||||
window.addEventListener('load', function (e) {
|
||||
if (!new URL(window.location.href).searchParams.has('train')) {
|
||||
window.history.back()
|
||||
|
@ -225,6 +229,12 @@ window.addEventListener('load', function (e) {
|
|||
trainNumber = sp.get('train')
|
||||
date = sp.has('date') ? new Date(sp.get('date')) : new Date()
|
||||
|
||||
document.querySelectorAll('.rsk').forEach(function (rskElem) {
|
||||
rskElem.addEventListener('click', function (e) {
|
||||
rsk()
|
||||
})
|
||||
})
|
||||
|
||||
var content = document.getElementsByClassName('content')[0]
|
||||
content.focus()
|
||||
content.addEventListener('keydown', function (e) {
|
||||
|
@ -236,7 +246,7 @@ window.addEventListener('load', function (e) {
|
|||
content.scrollBy(0, 50)
|
||||
break
|
||||
case 'SoftRight':
|
||||
refresh()
|
||||
rsk()
|
||||
break
|
||||
case '*':
|
||||
showKm = !showKm
|
||||
|
|
Loading…
Add table
Reference in a new issue