don't add "status focusable"s to the processing stack

causes double proplates in certain cases on mastodon v4.3
This commit is contained in:
Vipra 2024-05-21 19:10:44 +02:00
parent aafaaee904
commit f2ebb949f9

View file

@ -149,6 +149,10 @@ function addtoTootObserver(ActionElement, tootObserver) {
// console.log(ActionElement);
if (ActionElement.hasAttribute("protoots-tracked")) return;
// special case for Mastodon v4.3 where "status__wrapper" are created
// as "status focusable" after navigating back to timeline
if (hasClasses(ActionElement, "status") && hasClasses(ActionElement, "focusable")) return;
addTypeAttribute(ActionElement);
ActionElement.setAttribute("protoots-tracked", "true");
tootObserver.observe(ActionElement);