// Get the full URL (Example: https://puzzlechess.ca/?puzzle=123456&theme=kenny)
const url = new URL(window.location.href);
// Access the URLSearchParams object
const params = new URLSearchParams(url.search);
// Get values of 'puzzle' and 'theme'
const puzzle = params.get('puzzle'); // This would be '123456' for your example URL
const theme = params.get('theme'); // This would be 'kenny' for your example URL
It would be nice to be able to load a specific puzzle based on the URL. Also once themes are created, loading a specific theme would be nice too.
This should be pretty easy with URLSearchParams