Thank for that, it is a great improvement of the swiper component, already found a good use for that.
Still not perfect for my (and probably all album-big image type) use case, as if an image gets shared on social media with a hashed link and then the image gets removed from the album, the link will be broken.
Did a bit of research over the weekend to see how other sites do this and the one I liked the most is unplash.com. What I assume they do is lets say you are in an album/collection (https://unsplash.com/t/wallpapers) and you click on an image, it opens a modal with a swiper like viewer and for the onrender and onchange events they change the url for a general photo url, eg. https://unsplash.com/photos/InweyY9Yqlo so when it gets shared, it always will be a good link even if the photo won’t be in that album/collection anymore. Also if the same image is in more than one album, there always will be just one url to every image, probably better for seo.
The disadvantage of this solution is that the shared url point to one photo only, not a photo in a album with navigation but since the album can be shared from the masonry view, I can live with that.
All in all the question still stands, how do I change the url from an event.
history.replaceState(null, 'title', 'mynewurl'); which I called from a flow–>RunJS on the swiper onchange event, but gives an error on the browser:
Never used this before, so probably a very dumb mistake I made somewhere, but can you help me how do I run this js function?
Have a great week!