From 650725805d29ffac4aeeb71fa3ef953b319365df Mon Sep 17 00:00:00 2001 From: Siphalor Date: Tue, 22 Mar 2022 19:19:31 +0100 Subject: [PATCH] Fix Codersrank, for real this time --- about.md | 2 +- assets/js/main.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/about.md b/about.md index bd72ea7..3270189 100644 --- a/about.md +++ b/about.md @@ -25,4 +25,4 @@ In my spare time I do quite [some modding]({% link modding.html %}) to the sandb - [ LinkedIn](https://linkedin.com/in/{{ site.author.linkedin }}) - + diff --git a/assets/js/main.js b/assets/js/main.js index 170c63b..f84efdd 100644 --- a/assets/js/main.js +++ b/assets/js/main.js @@ -36,7 +36,7 @@ } }); - if (crTypes) { + if (typeof crTypes !== 'undefined') { // Codersrank const placeholders = document.getElementsByClassName("cr-placeholder"); if (localStorage.getItem("load-codersrank")) { @@ -57,7 +57,7 @@ const scriptElems = []; for (type of types) { const script = document.createElement("script"); - script.src = "https://unpkg.com/@codersrank/activity/codersrank-" + type + ".min.js"; + script.src = "https://unpkg.com/@codersrank/" + type + "/codersrank-" + type + ".min.js"; scriptElems.push(script); } for (ph of document.getElementsByClassName("cr-placeholder")) {