<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,minimum-scale=1">
</head>
<body>
<script>
try {
const iFrame = window?.frameElement;
const widgetParent = iFrame?.parentNode;
const { width: embedWidgetWidth = '', height: embedWidgetHeight = '' } = iFrame;
widgetParent.style.height = embedWidgetHeight + 'px' || '300px';
widgetParent.style.width = embedWidgetWidth + 'px' || '300px';
const widgetID = "widget-playgama" + "-" + new Date().getTime();
iFrame.style.display = 'none';
const amIAliveScript = top.document.querySelectorAll("[src='https://widgets.playgama.com/index.js']")?.length === 0;
if (amIAliveScript) {
const widgetScript = document.createElement("script");
widgetScript.setAttribute("src", "https://widgets.playgama.com/index.js");
widgetScript.setAttribute("async", "true");
widgetScript.setAttribute("id", "playgama-widget-script");
top.document.head.appendChild(widgetScript);
}
top.playgama_widgets = top.playgama_widgets || { clbs: [] };
top.playgama_widgets.clbs.push(() => {
const playgamaOutDiv = document.createElement("div");
playgamaOutDiv.setAttribute("id", widgetID);
playgamaOutDiv.insertAdjacentHTML('beforeend', `<div style="opacity: 0.2;font-family: sans-serif;font-size: 10px">
Powered by <a href="https://playgama.com/" target="_blank" rel="noopener">Playgama</a></div>`);
widgetParent.appendChild(playgamaOutDiv);
});
top.playgama_widgets.clbs.push(() => {
top.playgama_widgets.defineWidget({
widget_id: "ADD_YOUR_WIDGET_ID_HERE", // Replace with your actual widget ID
element_id: widgetID,
});
top.playgama_widgets.showWidget(widgetID);
});
} catch {}
</script>
</body>
</html>