April 2, 2020
You can read the current URL hash (the part of the URL after #
) like this:
const hash = location.hash
console.log(hash)
And change it like this:
location.hash = "foo"
You can detect whenever the hash changes like this:
window.addEventListener("hashchange", event => {
console.log("hash changed", event)
})
Tufts Meal Plan Wrapped
Mar 2, 2024
Building an e-ink picture frame that displays an iCloud photo album
Jan 9, 2024
2023 in review
Jan 5, 2024
Subscribe to my newsletter for a monthly round-up of new blog posts and projects Iām working on!