mirror of
https://github.com/netbymatt/ws4kp.git
synced 2026-04-14 15:49:31 -07:00
index module
This commit is contained in:
11
server/scripts/modules/config.mjs
Normal file
11
server/scripts/modules/config.mjs
Normal file
@@ -0,0 +1,11 @@
|
||||
const UNITS = {
|
||||
english: Symbol('english'),
|
||||
metric: Symbol('metric'),
|
||||
};
|
||||
|
||||
export {
|
||||
UNITS,
|
||||
};
|
||||
|
||||
window.UNITS = UNITS;
|
||||
console.log('config');
|
||||
@@ -1,19 +1,14 @@
|
||||
// navigation handles progress, next/previous and initial load messages from the parent frame
|
||||
/* globals index, utils, StationInfo, STATUS */
|
||||
/* globals index, utils, StationInfo, STATUS, UNITS */
|
||||
/* globals CurrentWeather, LatestObservations, TravelForecast, RegionalForecast, LocalForecast, ExtendedForecast, Almanac, Radar, Progress, Hourly */
|
||||
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
navigation.init();
|
||||
});
|
||||
|
||||
const UNITS = {
|
||||
english: Symbol('english'),
|
||||
metric: Symbol('metric'),
|
||||
};
|
||||
|
||||
const navigation = (() => {
|
||||
let displays = [];
|
||||
let currentUnits = UNITS.english;
|
||||
let currentUnits;
|
||||
let playing = false;
|
||||
let progress;
|
||||
const weatherParameters = {};
|
||||
@@ -25,6 +20,7 @@ const navigation = (() => {
|
||||
const init = async () => {
|
||||
// set up resize handler
|
||||
window.addEventListener('resize', resize);
|
||||
currentUnits = UNITS.english;
|
||||
};
|
||||
|
||||
const message = (data) => {
|
||||
|
||||
Reference in New Issue
Block a user