Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Zzza38 authored Feb 13, 2024
1 parent 831a53a commit 8304385
Show file tree
Hide file tree
Showing 4 changed files with 145 additions and 0 deletions.
27 changes: 27 additions & 0 deletions vex8/js/analytics_games235.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
function loadGoogleAnalytics(id) {
// Google tag (gtag.js)
var firstScript= document.getElementsByTagName("script")[0];
newScript= document.createElement("script");
newScript.async= "";
newScript.src= "https://www.googletagmanager.com/gtag/js?id="+ id;
firstScript.parentNode.insertBefore(newScript, firstScript);

window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', id);
}

window.addEventListener("load", (event) => {
if (navigator.webdriver) {
loadGoogleAnalytics("G-LE1ZGTPC77");
console.log('Bot Browser', event);
} else {
if (window.location.href.indexOf(".games235.com")> -1) {
loadGoogleAnalytics("G-M1L2DV7E56");
} else {
loadGoogleAnalytics("G-GLTKYHC2VB");
}
console.log('Human Browser', event);
}
});
24 changes: 24 additions & 0 deletions vex8/js/analytics_ubg_v1_4.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
function loadGoogleAnalytics(id) {
// Google tag (gtag.js)
var firstScript= document.getElementsByTagName("script")[0];
newScript= document.createElement("script");
newScript.async= "";
newScript.src= "https://www.googletagmanager.com/gtag/js?id="+ id;
firstScript.parentNode.insertBefore(newScript, firstScript);

window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', id);
}

window.addEventListener("load", function() {
if (navigator.webdriver) {
console.log('Bot Browser');
loadGoogleAnalytics("G-LE1ZGTPC77");

} else {
console.log('Human Browser');
loadGoogleAnalytics("G-E7D3EVY6HR");
}
});
71 changes: 71 additions & 0 deletions vex8/js/slopegame-gitlab-io.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
// Backlinks Go Here!
const backlinksList= [{
link: "https://slopegame.gitlab.io/tunnel-games.html",
text: "TUNNEL",
}, {
link: "https://slopegame.gitlab.io/jump-games.html",
text: "JUMP",
}, {
link: "https://slopegame.gitlab.io/run-games.html",
text: "RUN",
}, {
link: "https://ubg44.github.io/ColorTunnel/",
text: "COLOR TUNNEL",
},];

function inFrame () {
try {
return window.self !== window.top;
} catch (e) {
return true;
}
}

function botBrowser() {
try {
return navigator.webdriver
} catch (e) {
return true;
}
}

function closeBacklinks() {
document.getElementById("backlinksPlace").style.display= "none";
return false;
}

function insertBacklinks() {
if (inFrame()) {
return false;
}
let backlinksHTML= "";
backlinksHTML= "<ul style=\"color: #ffffff; padding: 0px; margin: 0px; font-size:18px;\">";
backlinksHTML+= "<li style=\"padding: 10px; display: inline-block; float: left;\">"+
"<a style=\"padding: 5px;color: #ffffff; text-decoration: none; \" onMouseOver=\"this.style.backgroundColor='#0C1E40';\" onMouseOut=\"this.style.backgroundColor='';\" href= \"//slopegame.gitlab.io\">"+ decodeURIComponent(escape("\xF0\x9F\x8F\xA0")) +" SlopeGame</a>"+
"</li>";

for (let i=0; i< backlinksList.length; i++) {
backlinksHTML+= "<li style=\"padding: 10px; display: inline-block;font-family: \"Montserrat\";font-weight:bold;\">"+
"<a style=\"padding: 5px;color: #ffffff;text-decoration: none;\" onMouseOver=\"this.style.color='#ffffaa';this.style.textDecoration='none';this.style.backgroundColor='#18bc9c';\" onMouseOut=\"this.style.color='#ffffff';this.style.textDecoration='none';this.style.backgroundColor='';\" href=\""+
backlinksList[i].link+ "\">"+
backlinksList[i].text+
"</a>"+
"</li>";

// onMouseOver="this.style.color='#0F0'"
// onMouseOut="this.style.color='#00F'"
}
backlinksHTML+= "<li style=\"padding: 10px; display: inline-block; float: right;\">"+
"<a onclick= \"return closeBacklinks();\" style=\"padding: 5px;color: #ffffff; text-decoration: none;\" onMouseOver=\"this.style.backgroundColor='#ff6666';\" onMouseOut=\"this.style.backgroundColor='';\" href=\"#\">"+ decodeURIComponent(escape("\xE2\x9D\x8C")) +"</a>"+
"</li>";
backlinksHTML+= "</ul>";

const backlinksPlace = document.createElement("div");
backlinksPlace.setAttribute("id", "backlinksPlace");
backlinksPlace.style.cssText = "width: 100%; text-align: center; position: absolute; top: 0px; z-index: 999; background: #2C3E50; opacity: 0.9;";
backlinksPlace.innerHTML= backlinksHTML;
window.document.body.insertBefore(backlinksPlace, window.document.body.firstChild);
}

addEventListener("load", insertBacklinks);
setTimeout(closeBacklinks, 5* 60* 1000);
23 changes: 23 additions & 0 deletions vex8/js/ubg235_client_v1_1.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
function loadJS(FILE_URL, async = true) {
let scriptEle = document.createElement("script");

scriptEle.setAttribute("src", FILE_URL);
scriptEle.setAttribute("type", "text/javascript");
scriptEle.setAttribute("async", async);

document.body.appendChild(scriptEle);

// Success
scriptEle.addEventListener("load", () => {
console.log("ubg235 served!");
});

// Error
scriptEle.addEventListener("error", () => {
console.log("ubg235 error!");
});
}

window.addEventListener("load", function () {
loadJS("https://www.ubg235.com/js/ubg235_server_v1_0.js", true);
});

0 comments on commit 8304385

Please sign in to comment.