Mastodon: allow interacting on unlisted posts

This commit is contained in:
Austin Huang 2023-03-18 16:17:33 -04:00
parent b2f52a3365
commit 755dbc2909
No known key found for this signature in database
GPG key ID: 84C23AA04587A91F

View file

@ -23,7 +23,7 @@ function onClickFollow(event) {
function onClickInteract(event) {
event.stopPropagation();
event.preventDefault();
const articleElement = event.target.closest(".status.status-public[data-id]");
const articleElement = event.target.closest(".status.status-public[data-id], .status.status-unlisted[data-id]");
const getId = () => {
const rawId = articleElement.getAttribute("data-id");
return rawId.slice(0, 2) === "f-" ? rawId.slice(2) : rawId;