How to account for lazy loading lists?

Hi all, i'm making (my first) extension for DJ's called SoundCloud BPM. I already finished the backend, but I am stuck on the frontend. When making soundcloud playlists, I basically want to put every trackItem in a table, and make it possible to sort by bpm and key. The problem is that SC playlists are lazy loading. The way I do it now is: - I fetch all songs on page load - I replace the <ul> with my custom table and insert each TrackItem element into it. This results in the track related logic and styling getting fucked. I was thinking about using an overlay and shadowhost instead of replacing the elements in the anchor. My question: Does anyone have an idea how I can make it work with trackLists that have lazy loading? I want to keep as much SC logic as possible intact. Also I want to keep the styling from SoundCloud, even tho it uses selectors that get fuckt up when I try to add my custom table. It is the first extension I ever made, so please be understanding for my incompetence. Example of a soundcloud playlists with lazy loading: https://soundcloud.com/roel-geirnaert/sets/tracks-2 You can find the unfinished code here: https://github.com/oxillix/scbpm-plasmo If you're interested in this project: let's work together! πŸ™‚ DM me. Thanks in advance!
SoundCloud
Tracks #2 πŸ΄β€β˜ οΈ
Listen to Tracks #2 πŸ΄β€β˜ οΈ by Roel Geirnaert #np on #SoundCloud
GitHub
GitHub - oxillix/scbpm-plasmo: Make it easier for DJ's to search so...
Make it easier for DJ's to search songs based on BPM and Key using SoundCloud - GitHub - oxillix/scbpm-plasmo: Make it easier for DJ's to search songs based on BPM and Key using SoundCloud
No description
No description
2 Replies
lab
labβ€’2y ago
looks very nice! Is there a good indicator on SoundCloud's end that the playlist finished loading? If not, you can prob use a mutation Observer to check for new track, then resort that ul of their
Arcane
Arcaneβ€’2y ago
@louisgv has reached level 48. GG!
Want results from more Discord servers?
Add your server