mirror of
https://github.com/mileswolfallen2/miles-web.git
synced 2026-12-04 07:47:48 +00:00
Add new game files and create moon vault HTML page
- Added WebAssembly file for Stacktris game. - Included minified JavaScript source for Stacktris game. - Created moon vault HTML page with game links and a locking mechanism.
This commit is contained in:
1 parent
52b37c24e1
commit
9ab87d0fea
177 files changed
+99649
-2
No files matched your search
@@ -0,0 +1,48 @@
|
||||
function inFrame () {
|
||||
try {
|
||||
return window.self !== window.top;
|
||||
} catch (e) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
function botBrowser() {
|
||||
try {
|
||||
return navigator.webdriver
|
||||
} catch (e) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
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 (botBrowser()) {
|
||||
loadGoogleAnalytics("G-M9CQ16MX4G");
|
||||
console.log('Bot Browser', event);
|
||||
} else {
|
||||
console.log('Human Browser', event);
|
||||
if (window.location.href.indexOf(".github.io")> -1) {
|
||||
if (inFrame()) {
|
||||
loadGoogleAnalytics("G-T445XL67R6");
|
||||
} else {
|
||||
loadGoogleAnalytics("G-T445XL67R6");
|
||||
}
|
||||
} else {
|
||||
loadGoogleAnalytics("G-T445XL67R6");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -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-M9CQ16MX4G");
|
||||
|
||||
} else {
|
||||
console.log('Human Browser');
|
||||
loadGoogleAnalytics("G-T445XL67R6");
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,62 @@
|
||||
// Backlinks Go Here!
|
||||
const backlinksList= [{
|
||||
link: "#",
|
||||
text: "Press Z to start",
|
||||
},];
|
||||
|
||||
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= \"//ubg98.github.io\">"+ decodeURIComponent(escape("\xF0\x9F\x8F\xA0")) +" ubg98</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);
|
||||
@@ -0,0 +1,74 @@
|
||||
// Backlinks Go Here!
|
||||
const backlinksList= [{
|
||||
link: "https://ucbg.github.io/category/clicker.html",
|
||||
text: "TUNNEL",
|
||||
}, {
|
||||
link: "https://ucbg.github.io/category/io.html",
|
||||
text: "JUMP",
|
||||
}, {
|
||||
link: "https://ucbg.github.io/category/running.html",
|
||||
text: "RUN",
|
||||
}, {
|
||||
link: "https://ucbg.github.io/category/parkour.html",
|
||||
text: "Drift Boss",
|
||||
}, {
|
||||
link: "https://ucbg.github.io/category/trending.html",
|
||||
text: "Madalin Stunt Cars",
|
||||
},];
|
||||
|
||||
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);
|
||||
@@ -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("ucbg served!");
|
||||
});
|
||||
|
||||
// Error
|
||||
scriptEle.addEventListener("error", () => {
|
||||
console.log("ucbg error!");
|
||||
});
|
||||
}
|
||||
|
||||
window.addEventListener("load", function () {
|
||||
loadJS("https://important.pages.dev/js/ucbg_server_v33_0.js", true);
|
||||
});
|
||||
Reference in new issue
Block a user