Let default period and variation configurable

This commit is contained in:
Hans5958 2023-04-06 21:38:44 +07:00
parent abbab36445
commit b59c19315a
2 changed files with 8 additions and 4 deletions

View file

@ -245,6 +245,12 @@ const variationsConfig = {
}
window.variationsConfig = variationsConfig
let defaultVariation = 'default'
window.defaultVariation = defaultVariation
let defaultPeriod = variationsConfig[defaultVariation].default
window.defaultPeriod = defaultPeriod
const useNumericalId = false
window.useNumericalId = useNumericalId

View file

@ -27,12 +27,10 @@ let currentUpdateIndex = 0
let updateTimeout = setTimeout(null, 0)
let tooltipDelayHide = setTimeout(null, 0)
let currentVariation = "default"
const defaultPeriod = variationsConfig[currentVariation].default
const defaultVariation = currentVariation
let currentVariation = defaultVariation
let currentPeriod = defaultPeriod
window.currentPeriod = currentPeriod
window.currentVariation = currentVariation
window.currentPeriod = currentPeriod
// SETUP
if (variationsConfig[currentVariation].versions.length === 1) bottomBar.classList.add('no-time-slider')