Compare commits

...

12 Commits

Author SHA1 Message Date
Matt Walsh
8afef77ea5 5.21.11 2025-06-01 13:38:21 -05:00
Matt Walsh
8f70ee87c5 add smoke to large icon set close #91 2025-06-01 13:37:32 -05:00
Matt Walsh
4e7429bfba 5.21.10 2025-05-31 13:30:30 -05:00
Matt Walsh
c5ffe1542a TEMPORARY don't allow radar on safari on ios 2025-05-31 13:30:21 -05:00
Matt Walsh
5364855c58 5.21.9 2025-05-31 13:20:45 -05:00
Matt Walsh
18efd810bd permalink coloring, readme additions close #88 2025-05-31 13:20:35 -05:00
Matt Walsh
68a6bae3a7 5.21.8 2025-05-30 09:06:45 -05:00
Matt Walsh
5f0f0d9000 Correct smoke forecast text on extended forecast #91 2025-05-30 09:06:40 -05:00
Matt Walsh
9d9cf4b0f3 5.21.7 2025-05-30 07:58:59 -05:00
Matt Walsh
9e500143c0 load radar workers later in the startup process 2025-05-30 07:57:28 -05:00
Matt Walsh
71da682660 5.21.6 2025-05-29 23:08:11 -05:00
Matt Walsh
1b9a1dcb22 don't clobber browser alt-left/right shortcuts 2025-05-29 23:08:04 -05:00
12 changed files with 45 additions and 12 deletions

View File

@@ -1,6 +1,6 @@
MIT License
Copyright (c) 2020-2024 Matt Walsh
Copyright (c) 2020-2025 Matt Walsh
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@@ -87,6 +87,17 @@ I've made several changes to this Weather Star 4000 simulation compared to the o
## Sharing a permalink (bookmarking)
Selected displays, the forecast city and widescreen setting are sticky from one session to the next. However if you would like to share your exact configuration or bookmark it click the "Copy Permalink" (or get "Get Parmalink") near the bottom of the page. A URL will be copied to your clipboard with all of you selected displays and location (or copy it from the page if your browser doesn't support clipboard transfers directly). You can then share this link or add it to your bookmarks.
Your permalink will be very long. Here is an example for the Orlando Internation Airport:
```
https://weatherstar.netbymatt.com/?hazards-checkbox=false&current-weather-checkbox=true&latest-observations-checkbox=true&hourly-checkbox=false&hourly-graph-checkbox=true&travel-checkbox=false&regional-forecast-checkbox=true&local-forecast-checkbox=true&extended-forecast-checkbox=true&almanac-checkbox=false&spc-outlook-checkbox=true&radar-checkbox=true&settings-wide-checkbox=false&settings-kiosk-checkbox=false&settings-scanLines-checkbox=false&settings-speed-select=1.00&settings-units-select=us&latLonQuery=Orlando+International+Airport%2C+Orlando%2C+FL%2C+USA&latLon=%7B%22lat%22%3A28.431%2C%22lon%22%3A-81.3076%7D
```
You can also build your own permalink. Any omitted settings will be filled with defaults. Here are a few examples:
```
https://weatherstar.netbymatt.com/?latLonQuery=Orlando+International+Airport
https://weatherstar.netbymatt.com/?kiosk=true
https://weatherstar.netbymatt.com/?settings-units-select=metric
```
## Kiosk mode
Kiosk mode can be activated by a checkbox on the page. Note that there is no way out of kiosk mode (except refresh or closing the browser), and the play/pause and other controls will not be available. This is deliberate as a browser's kiosk mode it intended not to be exited or significantly modified.
@@ -145,6 +156,10 @@ Note: not all units are converted to metric, if selected. Some text-based produc
Not retro enough? Try the [Weatherstar 3000+](https://github.com/netbymatt/ws3kp)
## Use
Linking directly to the live web site at https://weatherstar.netbymatt.com is encouraged. As is using the live site for digital signage, home dashboards, streaming and public display. Please note the disclaimer below.
## Disclaimer
This web site should NOT be used in life threatening weather situations, or be relied on to inform the public of such situations. The Internet is an unreliable network subject to server and network outages and by nature is not suitable for such mission critical use. If you require such access to NWS data, please consider one of their subscription services. The authors of this web site shall not be held liable in the event of injury, death or property damage that occur as a result of disregarding this warning.

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "ws4kp",
"version": "5.21.5",
"version": "5.21.11",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "ws4kp",
"version": "5.21.5",
"version": "5.21.11",
"license": "MIT",
"dependencies": {
"dotenv": "^16.5.0",

View File

@@ -1,6 +1,6 @@
{
"name": "ws4kp",
"version": "5.21.5",
"version": "5.21.11",
"description": "Welcome to the WeatherStar 4000+ project page!",
"main": "index.mjs",
"type": "module",

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

View File

@@ -295,6 +295,8 @@ const updateFullScreenNavigate = () => {
};
const documentKeydown = (e) => {
// don't trigger on ctrl/alt/shift modified key
if (e.altKey || e.ctrlKey || e.shiftKey) return false;
const { key } = e;
if (document.fullscreenElement || document.activeElement === document.body) {

View File

@@ -126,6 +126,7 @@ const regexList = [
[/chance /gi, ''],
[/very /gi, ''],
[/patchy /gi, ''],
[/Areas Of /gi, ''],
[/areas /gi, ''],
[/dense /gi, ''],
[/Thunderstorm/g, 'T\'Storm'],

View File

@@ -65,6 +65,10 @@ const largeIcon = (link, _isNightTime) => {
case 'sleet-n':
return addPath('Sleet.gif');
case 'smoke':
case 'smoke-n':
return addPath('Smoke.gif');
case 'rain_showers':
case 'rain_showers_high':
case 'rain_showers-n':

View File

@@ -6,10 +6,15 @@ import WeatherDisplay from './weatherdisplay.mjs';
import { registerDisplay, timeZone } from './navigation.mjs';
import * as utils from './radar-utils.mjs';
// TEMPORARY fix to disable radar on ios safari
const isIos = /iP(ad|od|hone)/i.test(window.navigator.userAgent);
const isSafari = !!navigator.userAgent.match(/Version\/[\d.]+.*Safari/);
const safariIos = isIos && isSafari;
const RADAR_HOST = 'mesonet.agron.iastate.edu';
class Radar extends WeatherDisplay {
constructor(navId, elemId) {
super(navId, elemId, 'Local Radar', true);
super(navId, elemId, 'Local Radar', !safariIos);
this.okToDrawCurrentConditions = false;
this.okToDrawCurrentDateTime = false;
@@ -39,9 +44,6 @@ class Radar extends WeatherDisplay {
{ time: 1, si: 4 },
{ time: 12, si: 5 },
];
// get some web workers started
this.workers = (new Array(this.dopplerRadarImageMax)).fill(null).map(() => radarWorker());
}
async getData(weatherParameters, refresh) {
@@ -53,6 +55,12 @@ class Radar extends WeatherDisplay {
return;
}
// get the workers started
if (!this.workers) {
// get some web workers started
this.workers = (new Array(this.dopplerRadarImageMax)).fill(null).map(() => radarWorker());
}
const baseUrl = `https://${RADAR_HOST}/archive/data/`;
const baseUrlEnd = '/GIS/uscomp/?F=0&P=n0r*.png';
const baseUrls = [];
@@ -199,4 +207,7 @@ const radarWorker = () => {
};
// register display
registerDisplay(new Radar(11, 'radar'));
// TEMPORARY: except on safari on IOS
if (!safariIos) {
registerDisplay(new Radar(11, 'radar'));
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -760,7 +760,7 @@ body {
}
#share-link-copied {
color: c.$title-color;
color: hsl(60, 100%, 30%);
display: none;
}