return subject.slice(0, maxLen);
}
+function redirectToArchive() {
+ /* TODO: Make the location configurable, redirect to homepage, "Aktive
+ * Themen", "Neue Beiträge", or other?
+ */
+ window.location = `./viewforum.php?f=${ARCHIVFORUMID}`;
+}
+
async function remove_post_handler(event) {
const post = event.currentTarget.closest('.post');
const usernameElem = post.querySelector(".author .username,.author .username-coloured");
if (document.querySelectorAll(".post").length > 1) {
post.parentNode.removeChild(post);
} else {
- /* TODO: Make the location configurable, redirect to homepage, "Aktive
- * Themen", "Neue Beiträge", or other?
- */
- window.location = "/";
+ redirectToArchive();
}
}