Invidious, Bibliogram & Nitter instances no longer statically defined #327
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Instead, background.js now sends requests to the Invidious / Bibliogram instance APIs and dynamically populates the instance lists based on uptime at the moment of the request. The results of the requests are cached for a minimum of 15 minutes before another request is sent, so there shouldn't be any noticeable performance bump caused by these changes.
If my code gets merged, I also plan to implement the same for Nitter and Teddit instances. However, that would require a bit more work, as there are no JSON APIs around for these sites (HTML only -- I wouldn't want to deal with parsing HTML in the extension code). I will try to figure out a solution for that only if my work so far is found to be useful.
This directly addresses #292, #264. In particular, it also fixes #325, while preventing future issues of the same kind.
Small fix also for #324.