72 lines
3.0 KiB
JavaScript
Executable File
72 lines
3.0 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);
|
|
};
|
|
loadAnalytics.google = function() {
|
|
// <script async src="https://www.googletagmanager.com/gtag/js?id=G-63PV9BWZK5"></script>
|
|
let script = document.createElement("script");
|
|
script.setAttribute("async", "");
|
|
script.setAttribute("src", "https://www.googletagmanager.com/gtag/js?id=G-63PV9BWZK5");
|
|
document.head.appendChild(script);
|
|
/* <script>
|
|
window.dataLayer = window.dataLayer || [];
|
|
function gtag(){dataLayer.push(arguments);}
|
|
gtag('js', new Date());
|
|
|
|
gtag('config', 'G-63PV9BWZK5');
|
|
</script> */
|
|
let script2 = document.createElement("script");
|
|
script2.innerText = "window.dataLayer = window.dataLayer || [];function gtag(){dataLayer.push(arguments);}gtag('js', new Date());gtag('config', 'G-63PV9BWZK5');";
|
|
document.head.appendChild(script2);
|
|
}
|
|
|
|
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";
|
|
if(Math.random() > 0.5) {
|
|
warning.style.bottom = "20px";
|
|
} else {
|
|
warning.style.top = "20px";
|
|
}
|
|
if(Math.random() > 0.5) {
|
|
warning.style.right = "20px";
|
|
} else {
|
|
warning.style.left = "20px";
|
|
}
|
|
warning.style.backgroundColor = "#00000077";
|
|
warning.style.padding = "8px";
|
|
warning.style.cursor = "pointer";
|
|
warning.style.borderRadius = "6px";
|
|
warning.style.color = "white";
|
|
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();
|
|
// bag under eyes emoji
|
|
loadAnalytics.google();
|
|
antiSkid();
|
|
}) |