feat: Make instance and account configurable
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
moanos [he/him] 2023-11-26 22:26:12 +01:00
parent ecd669e151
commit 3ba24997a2

View File

@ -1,3 +1,7 @@
const instance = "chaos.social"
const account_id = "109116460625306131"
const mastodonFeedCreateElement = function(type, className = null) {
let element = document.createElement(type);
if(null !== className) {
@ -298,7 +302,7 @@ const mastodonFeedLoad = function(url, elementId, options) {
xhr.send();
}
apiUrl = 'https://social.queereszentrumtuebingen.de/api/v1/accounts/01JFERHG3QG06PQ7QGYEZ6288P/statuses';
apiUrl = 'https://' + instance + '/api/v1/accounts/' + account_id + '/statuses';
window.addEventListener("load", () => {
mastodonFeedLoad(