fix for when titles are edited

pull/221/head
Aevann 2024-01-14 18:16:44 +02:00
parent 5fefc0f732
commit 57c6c66dc8
2 changed files with 1 additions and 4 deletions

View File

@ -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]

View File

@ -347,8 +347,6 @@
<input hidden class="twoattrs" value="{{p.id}},{{p.comment_count}}">
<script defer src="{{'js/new_comments.js' | asset}}"></script>
<input hidden id="permalink" value="{{p.permalink}}">
<script defer src="{{'js/post.js' | asset}}"></script>
{% if fart and not (v and v.has_badge(128)) %}