We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 98f0270 commit 51ffc67Copy full SHA for 51ffc67
1 file changed
theme/static/js/main.js
@@ -1,5 +1,7 @@
1
const template = document.getElementById("template-sponsor-sidebar");
2
-const sponsor = template.dataset.sponsors[Math.floor(Math.random() * template.dataset.sponsors.length)];
+const sponsors = JSON.parse(template.dataset.sponsors);
3
+const sponsor = sponsors[Math.floor(Math.random() * sponsors.length)];
4
+
5
const clone = document.importNode(template.content, true);
6
clone.querySelector("a").href = sponsor.url;
7
const img = clone.querySelector("img");
0 commit comments