mirror of
https://github.com/YouHaveTrouble/youhavetrouble.github.io.git
synced 2026-05-12 06:16:55 +00:00
update everything
This commit is contained in:
@@ -43,6 +43,7 @@
|
||||
<section>
|
||||
<h2>Minecraft plugins</h2>
|
||||
<div class="row" data-plugins>
|
||||
<noscript>Sorry, but this data is loaded by javascript, which seems to not be enabled!</noscript>
|
||||
</div>
|
||||
</section>
|
||||
<footer>
|
||||
|
||||
@@ -3,10 +3,12 @@ const template = document.querySelector("#iconTemplate");
|
||||
getPlugins();
|
||||
|
||||
async function getPlugins() {
|
||||
const pluginSection = document.querySelector("[data-plugins]");
|
||||
pluginSection.innerHTML = "<p>Loading data...</p>";
|
||||
const result = await fetch("https://api.modrinth.com/v2/user/youhavetrouble/projects");
|
||||
if (result.status !== 200) return;
|
||||
const json = await result.json();
|
||||
const pluginSection = document.querySelector("[data-plugins]");
|
||||
pluginSection.innerHTML = "";
|
||||
|
||||
for (const plugin in json) {
|
||||
const pluginData = json[plugin];
|
||||
|
||||
Reference in New Issue
Block a user