44 lines
1.9 KiB
JavaScript
Executable File
44 lines
1.9 KiB
JavaScript
Executable File
// this is a test
|
|
function loadAnalytics() {};
|
|
|
|
loadAnalytics.unami = function() {
|
|
// <script defer src="https://cloud.umami.is/script.js" data-website-id="cdb79ddd-06a6-478f-b726-be39b502d6a5"></script>
|
|
let script = document.createElement("script");
|
|
script.setAttribute("defer", "");
|
|
script.setAttribute("src", "https://cloud.umami.is/script.js");
|
|
script.setAttribute("data-website-id", "cdb79ddd-06a6-478f-b726-be39b502d6a5");
|
|
document.head.appendChild(script);
|
|
};
|
|
loadAnalytics.cloudflare = function() {
|
|
// <script defer src='https://static.cloudflareinsights.com/beacon.min.js' data-cf-beacon='{"token": "e5b0ef8807e74cef81287ac77bd18938"}'></script>
|
|
let script = document.createElement("script");
|
|
script.setAttribute("defer", "");
|
|
script.setAttribute("src", "https://static.cloudflareinsights.com/beacon.min.js");
|
|
script.setAttribute("data-cf-beacon", '{"token": "e5b0ef8807e74cef81287ac77bd18938"}');
|
|
document.head.appendChild(script);
|
|
};
|
|
|
|
function antiSkid() {
|
|
if(window != window.parent && location.hostname != new URL(document.referrer).hostname) {
|
|
let warning = document.createElement("warning");
|
|
warning.innerText = "Check out more games at selenite.cc!";
|
|
warning.style.position = "absolute";
|
|
warning.style.width = "200px";
|
|
warning.style.textAlign = "center";
|
|
warning.style.bottom = "20px";
|
|
warning.style.right = "20px";
|
|
warning.style.backgroundColor = "#00000077";
|
|
warning.style.padding = "8px";
|
|
warning.style.cursor = "pointer";
|
|
warning.style.borderRadius = "6px";
|
|
warning.addEventListener("click", () => {window.open(location.origin)});
|
|
document.body.appendChild(warning);
|
|
}
|
|
};
|
|
|
|
document.addEventListener("DOMContentLoaded", () => {
|
|
// yo why are all analytic providers mid
|
|
// loadAnalytics.unami();
|
|
// loadAnalytics.cloudflare();
|
|
antiSkid();
|
|
}) |