small tweaks, remove logging

This commit is contained in:
2022-03-06 16:12:19 +01:00
parent 134ff1d4a8
commit 3d82a60083
+1 -10
View File
@@ -13,7 +13,6 @@ function getRepos() {
return; return;
} }
let json = JSON.parse(xhr.response); let json = JSON.parse(xhr.response);
for (const repoId in json) { for (const repoId in json) {
const repo = json[repoId]; const repo = json[repoId];
if (repo['topics'].includes('minecraft-plugin')) { if (repo['topics'].includes('minecraft-plugin')) {
@@ -21,14 +20,6 @@ function getRepos() {
} }
} }
}; };
xhr.onprogress = function (event) {
if (event.lengthComputable) {
console.log(`Received ${event.loaded} of ${event.total} bytes`);
} else {
console.log(`Received ${event.loaded} bytes`); // no Content-Length
}
}
} }
function addMinecraftPlugin(pluginData) { function addMinecraftPlugin(pluginData) {
@@ -36,6 +27,6 @@ function addMinecraftPlugin(pluginData) {
newEntry.querySelector('.project-title').innerText = pluginData['name']; newEntry.querySelector('.project-title').innerText = pluginData['name'];
newEntry.querySelector('.project-source').href = pluginData['html_url']; newEntry.querySelector('.project-source').href = pluginData['html_url'];
newEntry.querySelector('.project-description').innerText = pluginData['description'] newEntry.querySelector('.project-description').innerText = pluginData['description']
newEntry.querySelector('.project-downloads').href = `https://github.com/YouHaveTrouble/${pluginData['name']}/releases/latest` newEntry.querySelector('.project-downloads').href = `${pluginData['html_url']}/releases/latest`
mcPluginsSection.append(newEntry); mcPluginsSection.append(newEntry);
} }