For some reason it started to catch a DOMException when image is clicked
Probably the exception is thrown due to a recent change I made, but I cannot find any concrete answer to what causes the following exception error. I found a stackoverflow hint that it can be a CORS restriction.

I have the same problem. I got js and css files of 1.6.4 version from unpkg and when image is clicked I get Uncaught DOMException: Failed to execute 'replaceState' on 'History': A history state object with URL in Chrome. Firefox gives Uncaught DOMException: The operation is insecure. Could anyone say how to solve this problem? I use pure JS without jquery.
I think my problem was that the capture data attribute on my tag was the same for every image. If you're looping through a set of images, try to set a counter variable, and after increasing this counter at each loop cycle use it to set a unique data-capture and a unique id for the actual tag. Hope that helps.
@domjanzsoo @PavelTurkish Hi. This issue is caused by the browser URL and the image URL having different origin like http://localhost:8000 and https://127.0.0.1:8000. Please fix, so that the origin is the same.