1
0
Fork 0
mirror of https://git.sr.ht/~cadence/bibliogram synced 2026-03-01 18:31:35 +00:00

Fix post navigation button functionality

This commit is contained in:
Cadence Fish 2020-03-15 19:02:38 +13:00
parent 74f731ceea
commit a861df2662
No known key found for this signature in database
GPG key ID: 81015DF9AA8607E1
2 changed files with 5 additions and 5 deletions

View file

@ -148,11 +148,11 @@ function loadPostOverlay(shortcode, stateChangeType) {
overlay.element.querySelectorAll(".navigate-posts").forEach(button => {
button.addEventListener("click", async event => {
/** @type {HTMLButtonElement} */
//@ts-ignore
// @ts-ignore
const button = event.currentTarget
if (button.classList.contains("next")) {
if (button.hasAttribute("data-next")) {
navigate("next")
} else {
} else if (button.hasAttribute("data-previous")) {
navigate("previous")
}
})