added url sharing support

This commit is contained in:
2024-07-08 20:50:27 +02:00
parent 23cd63b101
commit 6ef4c6ddf3
2 changed files with 5 additions and 1 deletions

View File

@@ -152,6 +152,10 @@
var gallery = new PhotoSwipe(pswpElement, PhotoSwipeUI_Default, items, options);
gallery.init();
}
if (window.location.href.indexOf("pid=") > -1) {
var pid = window.location.href.split('pid=')[1].split('#')[0];
openSwipe(parseInt(pid));
}
</script>
{%- endif %}
</body>