this post was submitted on 19 Aug 2023
4 points (75.0% liked)
FF addons&extensions
278 readers
1 users here now
Share your Firefox extensions or search tools.
founded 3 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
I ended up going primitive and used intervals to check if a particular div was visible:
function refreshExtension() { console.log("checking ", shown); const targetNode = document.getElementsByClassName("person-details")[0]; if (!shown && targetNode) { main(); } if (!targetNode) { shown = false; } } setInterval(refreshExtension, 200);
will it affect performance?