feed
post by fridge
@fridge
2025-12-31 •
this is me testing code blocks, check it out
[code=js]if (!window.isLoggedIn || !window.isLoggedIn()) {
document.addEventListener('DOMContentLoaded', function() {
try {
var bookmarks = [];
try {
var raw = localStorage.getItem('bookmarkedPosts');
if (raw) bookmarks = JSON.parse(raw);
} catch (_) {}
document.querySelectorAll('#post-bookmark').forEach(function(bm) {
var id = bm.dataset.postId;
var icon = bm.querySelector('i');
if (id && icon && bookmarks.includes(id)) {
icon.classList.add('fa-solid');
icon.classList.remove('fa-regular');
}
});
} catch (_) {}
});
}
[/code]
end of page