This commit is contained in:
sky
2025-12-16 23:26:30 -05:00
parent d4bd776889
commit 0057b8ddf1
3 changed files with 24 additions and 3 deletions

19
js/all.min.js vendored
View File

@ -17,6 +17,23 @@ loadAnalytics.cloudflare = function() {
script.setAttribute("data-cf-beacon", '{"token": "e5b0ef8807e74cef81287ac77bd18938"}'); script.setAttribute("data-cf-beacon", '{"token": "e5b0ef8807e74cef81287ac77bd18938"}');
document.head.appendChild(script); 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');";
}
function antiSkid() { function antiSkid() {
if(window != window.parent && location.hostname != new URL(document.referrer).hostname) { if(window != window.parent && location.hostname != new URL(document.referrer).hostname) {
@ -49,5 +66,7 @@ document.addEventListener("DOMContentLoaded", () => {
// yo why are all analytic providers mid // yo why are all analytic providers mid
// loadAnalytics.unami(); // loadAnalytics.unami();
// loadAnalytics.cloudflare(); // loadAnalytics.cloudflare();
// bag under eyes emoji
loadAnalytics.google();
antiSkid(); antiSkid();
}) })

View File

@ -60,7 +60,7 @@ async function loadGames() {
gore.classList = "gore"; gore.classList = "gore";
warnings.appendChild(gore); warnings.appendChild(gore);
} }
if(element.tags.includes("top")) { if(element.tags.includes("top") && localStorage.getItem("selenite.disableTopGames") != "false") {
topGElement.appendChild(newElement); topGElement.appendChild(newElement);
} else { } else {
gamesElement.appendChild(newElement); gamesElement.appendChild(newElement);
@ -84,7 +84,9 @@ async function loadGames() {
document.getElementById("gameCount").innerText = `${data.length} games loaded!`; document.getElementById("gameCount").innerText = `${data.length} games loaded!`;
document.getElementById("loadingMsg").style.display = "none"; document.getElementById("loadingMsg").style.display = "none";
document.getElementById("allHeader").style.display = "block"; document.getElementById("allHeader").style.display = "block";
if(localStorage.getItem("selenite.disableTopGames") != "false") {
document.getElementById("topHeader").style.display = "block"; document.getElementById("topHeader").style.display = "block";
}
if(isDev.length > 0) {sAlert("wip games", "dev message, shouldnt be seen");console.log(isDev.join(","))}; if(isDev.length > 0) {sAlert("wip games", "dev message, shouldnt be seen");console.log(isDev.join(","))};
starredGames = JSON.parse(localStorage.getItem("selenite.starred") || '[]'); starredGames = JSON.parse(localStorage.getItem("selenite.starred") || '[]');
if(starredGames.length > 0) { if(starredGames.length > 0) {

View File

@ -13,7 +13,7 @@ function loadPJS() {
script.src = "https://cdn.jsdelivr.net/particles.js/2.0.0/particles.min.js"; script.src = "https://cdn.jsdelivr.net/particles.js/2.0.0/particles.min.js";
document.head.appendChild(script); document.head.appendChild(script);
script.addEventListener("load", ()=>{ script.addEventListener("load", ()=>{
particlesJS.load('pjs', "/js/christmas-particlesjs-config.json", ()=>{}); particlesJS.load('pjs', "/js/main-particlesjs-config.json", ()=>{});
}); });
} }