1
0
Fork 0

Ignores dynamically added posts #1

Open
opened 2 months ago by pixelcode · 3 comments
Owner

Since the iterateUsers() function is only triggered once (when the page was fully loaded), posts dynamically added to the timeline by Mastodon are simply ignored. I have no clue how to fix this.

Since the `iterateUsers()` function is only triggered once (when the page was fully loaded), posts dynamically added to the timeline by Mastodon are simply ignored. I have no clue how to fix this.
pixelcode added the
enhancement
help wanted
contribution welcome
labels 2 months ago
Collaborator

Sounds like a job for the MutationObserver!

https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver

Haven't had time to play with this yet

Sounds like a job for the MutationObserver! https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver Haven't had time to play with this yet
Poster
Owner

Unfortunately, when I tried implementing a MutationObserver, the mastodon.js script stopped working entirely :(

Unfortunately, when I tried implementing a MutationObserver, the `mastodon.js` script stopped working entirely :(
Poster
Owner

mastodon.js now detects when posts are dynamically added to the timeline and re-verifies all profiles. However, for some reason it does not detect when the user switches from e.g. the notifications tab back to the timeline.

`mastodon.js` now detects when posts are dynamically added to the timeline and re-verifies all profiles. However, for some reason it does not detect when the user switches from e.g. the notifications tab back to the timeline.
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: pixelcode/Keyoxide-Checkify#1
Loading…
There is no content yet.