diff --git a/README.md b/README.md index 01982a7..9159e96 100644 --- a/README.md +++ b/README.md @@ -91,16 +91,15 @@ As time allows I will be working on the following enhancements. * Better error reporting when api.weather.gov is down (happens more often than you would think) -And the following technical fixes. - -* Caching of the animated gifs, specifically after they are decompressed - ## Community Notes Thanks to the WeatherStar community for providing these discussions to further extend your retro forecasts! * [Stream as FFMPEG](https://github.com/netbymatt/ws4kp/issues/37#issuecomment-2008491948) +## Customization +A hook is provided as `/server/scripts/custom.js` to allow customizations to your own fork of this project, without accidentally pushing your customizations back upstream to the git repository. An sample file is provided at `/server/scripts/custom.sample.js` and should be renamed to `custom.js` activate it. + ## Issue reporting and feature requests Please do not report issues with api.weather.gov being down. It's a new service and not considered fully operational yet. Before reporting an issue or requesting a feature please consider that this is not intended to be a perfect recreation of the WeatherStar 4000, it's a best effort that fits within what's available from the API and within a web browser. diff --git a/server/scripts/custom.sample.js b/server/scripts/custom.sample.js new file mode 100644 index 0000000..50d0cf9 --- /dev/null +++ b/server/scripts/custom.sample.js @@ -0,0 +1,14 @@ +// this file is loaded by the main html page (when renamed to custom.js) +// it is intended to allow for customizations that do not get published back to the git repo +// for example, changing the logo + +// start running after all content is loaded +document.addEventListener('DOMContentLoaded', () => { + // get all of the logo images + const logos = document.querySelectorAll('.logo img'); + // loop through each logo + logos.forEach((elem) => { + // change the source + elem.src = 'my-custom-logo.gif'; + }); +}); diff --git a/views/index.ejs b/views/index.ejs index 82b6521..04f8263 100644 --- a/views/index.ejs +++ b/views/index.ejs @@ -45,7 +45,7 @@ - +