We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 482de36 commit caf1f6bCopy full SHA for caf1f6b
embed.js
@@ -1,4 +1,4 @@
1
-document.addEventListener("DOMContentLoaded", async () => {
+(async () => {
2
const { api: apiUrl, target: targetSelector } = document.currentScript.dataset;
3
4
const target = document.querySelector(targetSelector);
@@ -40,7 +40,7 @@ document.addEventListener("DOMContentLoaded", async () => {
40
target.innerHTML = "<p style='color:red; text-align: center; font-family: sans-serif;'>Error loading games. Please try again later.</p>";
41
console.error("Error loading games:", err);
42
}
43
-});
+})();
44
45
window.openGame = (apiUrl, alt) => {
46
const modal = document.getElementById("gameModal");
0 commit comments