diff --git a/files/assets/js/post.js b/files/assets/js/post.js
index aafb8f59b..265dc1db7 100644
--- a/files/assets/js/post.js
+++ b/files/assets/js/post.js
@@ -47,8 +47,7 @@ if (fake_textarea) {
if (screen_width < 768) {
const post_ids = localStorage.getItem("post_ids").split(', ');
- const permalink = document.getElementById("permalink").value
- const current_index = post_ids.indexOf(`'${permalink}'`)
+ const current_index = post_ids.indexOf(`'${location.href}'`)
if (current_index > -1) {
const id_after = post_ids[current_index+1]
const id_before = post_ids[current_index-1]
diff --git a/files/templates/post.html b/files/templates/post.html
index 5b908d19a..4619a85a8 100644
--- a/files/templates/post.html
+++ b/files/templates/post.html
@@ -347,8 +347,6 @@
-
-
{% if fart and not (v and v.has_badge(128)) %}