refactor championship changed update check
This commit is contained in:
@@ -24,6 +24,13 @@ export default class Championship {
|
||||
}
|
||||
}
|
||||
|
||||
static get nextChanged() {
|
||||
if (Championship.last?.day != Championship.next?.day || Championship.last?.time != Championship.next?.time) {
|
||||
Championship.last = Championship.next
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
static firstTimeOnDay(day) {
|
||||
return Math.min(...Object.keys(Data.championships[day]))
|
||||
}
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
import UI from './ui.js'
|
||||
import Championship from './championship.js'
|
||||
|
||||
window.Championship = Championship
|
||||
|
||||
window.addEventListener('load', UI.init)
|
||||
|
||||
Reference in New Issue
Block a user