04-23-2023, 05:10 PM
Here's a very accurate one. It uses multiple images of the moon encoded as text strings in JavaScript, making it quite portable.
https://imgur.com/a/eUX3oX5
The original script was written by Graham Fairweather and released under the GPL license:
https://jsfiddle.net/Xotic750/YQqcj/
I refactored it as a JavaScript object, moved the encoded images into a separate file, and moved some Date and Math related functions to their respective built-in JavaScript objects.
How to use it:
https://pastebin.com/Mzu8d1RA
https://imgur.com/a/eUX3oX5
The original script was written by Graham Fairweather and released under the GPL license:
https://jsfiddle.net/Xotic750/YQqcj/
I refactored it as a JavaScript object, moved the encoded images into a separate file, and moved some Date and Math related functions to their respective built-in JavaScript objects.
How to use it:
https://pastebin.com/Mzu8d1RA