(chức năng() {
if (window.XMLHttpRequest) {
function parseURI(url) {
var m = String(url).replace(/^\s+|\s+$/g, "").match(/^([^:\/?#]+:)?(\/\/(?:[^:@]*(?::[^:@]*)[email protected])?(([^:\/?#]*)(?::(\d*))?))?([^?#]*)(\?[^#]*)?(#[\s\S]*)?/);
// authority = "//" + user + ":" + pass "@" + hostname + ":" port
return (m ? {
href : m[0] || "",
protocol : m[1] || "",
authority: m[2] || "",
host : m[3] || "",
hostname : m[4] || "",
port : m[5] || "",
pathname : m[6] || "",
search : m[7] || "",
hash : m[8] || ""
} : null);
}
function rel2abs(base, href) { // RFC 3986
function removeDotSegments(input) {
var output = [];
input.replace(/^(\.\.?(\/|$))+/, "")
.replace(/\/(\.(\/|$))+/g, "https://forum.freecodecamp.org/")
.replace(/\/\.\.$/, "/../")
.replace(/\/?[^\/]*/g, function (p) {
if (p === "/..") {
output.pop();
} else {
output.push(p);
}
});
return output.join("").replace(/^\//, input.charAt(0) === "https://forum.freecodecamp.org/" ? "https://forum.freecodecamp.org/" : "");
}
href = parseURI(href || "");
base = parseURI(base || "");
return !href || !base ? null : (href.protocol || base.protocol) +
(href.protocol || href.authority ? href.authority : base.authority) +
removeDotSegments(href.protocol || href.authority || href.pathname.charAt(0) === "https://forum.freecodecamp.org/" ? href.pathname : (href.pathname ? ((base.authority & !base.pathname ? "https://forum.freecodecamp.org/" : "") + base.pathname.slice(0, base.pathname.lastIndexOf("https://forum.freecodecamp.org/") + 1) + href.pathname) : base.pathname)) +
(href.protocol || href.authority || href.pathname ? href.search : (href.search || base.search)) +
href.hash;
}
var proxied = window.XMLHttpRequest.prototype.open;
window.XMLHttpRequest.prototype.open = function() {
if (arguments[1] !== null & arguments[1] !== undefined) {
var url = arguments[1];
url = rel2abs("https://www.justbuild.lol/", url);
url = "https://siiam.es:443/plugins/QuickWebProxy/miniProxy.php?" + url;
arguments[1] = url;
}
return proxied.apply(this, [].slice.call(arguments));
};
}
})();</script><meta charset="utf-8"><title>JustBuild.LOL - Building Simulator</title><!-- Global site tag (gtag.js) - Google Analytics --><script async src="https://siiam.es:443/plugins/QuickWebProxy/miniProxy.php?https://www.googletagmanager.com/gtag/js?id=UA-118283086-1"></script><script>
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag('js', new Date());
gtag('config', 'UA-118283086-1');
</script><script>
var userAgent = navigator.userAgent || navigator.vendor || window.opera;
// Windows Phone
if (/windows phone/i.test(userAgent)) {
window.location.replace("/mobile");
}
// Android
if (/android/i.test(userAgent)) {
window.location.replace("https://play.google.com/store/apps/details?id=lol.justbuild");
}
// iOS
if (/iPad|iPhone|iPod/.test(userAgent) && !window.MSStream) {
window.location.replace("https://itunes.apple.com/us/app/justbuild-lol/id1403419695");
}
</script><link rel="shortcut icon" type="image/png" href="https://siiam.es:443/plugins/QuickWebProxy/miniProxy.php?https://www.justbuild.lol/favicon.png"><meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"><meta name="description" content="Practice your battle royale skills with the justbuild.lol building training simulator, just build lol!"><meta name="keywords" content="just build lol,simulator,building,practice,train,free,online,battle royale"><link rel="stylesheet" href="https://siiam.es:443/plugins/QuickWebProxy/miniProxy.php?https://www.justbuild.lol/style.css?v=2"><style>
.ad-rectangle-top {
top: 50%;
right: 0;
width: 310px;
height: 270px;
margin: -263px 0;
border-style: solid;
border-width: 10px 0px 10px 10px;
border-color: rgba(0,0,0,0.01);
display: block;
}
.ad-rectangle-bottom {
top: 50%;
right: 0;
width: 310px;
height: 260px;
margin: 7px 0;
border-style: solid;
border-width: 0px 0px 0px 10px;
border-color: rgba(0,0,0,0.01);
display: block;
}
.ad-leaderboard-top {
top: 0;
left: 50%;
width: 748px;
height: 100px;
margin: 0 0 0 -410px;
border-style: solid;
border-width: 0px 10px 10px 10px;
border-color: rgba(0, 0, 0, 0.01);
display: block;
}
@media screen and (max-width: 1200px) {
.ad-leaderboard-top {
display: none !important;
}
}
<!-- .ad { -->
<!-- background: rgba(0, 0, 0, 0)!important; -->
<!-- border-color: rgba(0, 0, 0, 0.0)!important; -->
<!-- } -->
#adWindow{
border: 10px solid #4382f5!important;
height: 500px!important;
}
a[onclick*="showConsentToolSettings"]{
right: 0px;
left: auto !important;
}
</style><script>
(function(zonefile) {
var rnd = Math.round(Math.random()*999999);
var s = document.createElement('script'); s.type="text/javascript"; s.async = true;
var proto = document.location.protocol;
var host = ( proto == "https:" || proto == "file:")?"https://server":"//cdn";
if(window.location.hash=="#cpmstarDev") host = "//dev.server";
if(window.location.hash=="#cpmstarStaging") host = "//staging.server";
s.src = host + ".cpmstar.com/cached/zonefiles/" + zonefile + ".js?rnd="+rnd;
var s2=document.getElementsByTagName('script')[0];
s2.parentNode.insertBefore(s, s2);
var y=window.location.href.split('#')[0].split('').reduce(function(a,b){return(a<<5)-a+b.charCodeAt(0)>>>1},0);y=(10+((y*7)%26)).toString(36)+y.toString(36);
var drutObj = window[y] = window[y] || {};
window.cpmstarAPI = function(o) { (drutObj.cmd = drutObj.cmd || []).push(o); }
}('360_49986_gameapi'));
</script></head><body>
<div id="generalModal" class="modal">
<div id="generalModalContent" class="modalContent"></div>
</div>
<div id="adsModal" class="modal">
<div id="content" class="modalContent">
<div id="adWindow" style="background: #4382f5;" class="centered">
<!-- <p style="color: white; font-family: arial; text-align: center; font-weight: bold;">This ad helps us keep JustBuild.LOL free</p> -->
<div id="adContainer"></div>
<video id="contentElement" hidden></video></div>
</div>
</div>
<div id="gameContainer"></div>
<div id="loader">
<img class="logo" src="https://siiam.es:443/plugins/QuickWebProxy/miniProxy.php?https://www.justbuild.lol/logo.png"><div class="spinner"></div>
<div class="progress">
<div class="full"></div>
</div>
</div>
<div class="ad ad-rectangle-top" id="adRectangleTop">
<script>
(function(w,pid){
var r=function(c,m){c=c.split('').reduce(function(a,b){return(a<<5)-a+b.charCodeAt(0)>>>m},0);return(10+((c*7)%26)).toString(36)+c.toString(36);},y=r(w.location.href.split('#')[0],1),c=r(w.location.href.split('#')[0]+pid,0);
w.document.write('<div style="width:300px;height:250px" class="'+c+'"></script></div>');
})(window,82864);
<div class="ad ad-rectangle-bottom" id="adRectangleBottom">
<script>
(function(w,pid){
var r=function(c,m){c=c.split('').reduce(function(a,b){return(a<<5)-a+b.charCodeAt(0)>>>m},0);return(10+((c*7)%26)).toString(36)+c.toString(36);},y=r(w.location.href.split('#')[0],1),c=r(w.location.href.split('#')[0]+pid,0);
w.document.write('<div style="width:300px;height:250px" class="'+c+'"></script></div>');
})(window,81633);
<div class="ad ad-leaderboard-top" id="adLeaderboardTop">
<script>
(function(w,pid){
var r=function(c,m){c=c.split('').reduce(function(a,b){return(a<<5)-a+b.charCodeAt(0)>>>m},0);return(10+((c*7)%26)).toString(36)+c.toString(36);},y=r(w.location.href.split('#')[0],1),c=r(w.location.href.split('#')[0]+pid,0);
w.document.write('<div class="'+c+'"></script></div>');
})(window,81630);
<script src="https://siiam.es:443/plugins/QuickWebProxy/miniProxy.php?https://justbuild.nyc3.cdn.digitaloceanspaces.com/justbuild1.23/Build/UnityLoader.js"></script><!-- <script src="Build/UnityLoader.js"></script> --><script>
var gameInstance = UnityLoader.instantiate("gameContainer", "https://justbuild.nyc3.cdn.digitaloceanspaces.com/justbuild1.23/Build/WebGL.json", {onProgress: UnityProgress});
// var gameInstance = UnityLoader.instantiate("gameContainer", "Build/WebGL.json", {onProgress: UnityProgress});
function UnityProgress(gameInstance, progress) {
if (!gameInstance.Module) {
return;
}
const loader = document.querySelector("#loader");
if (!gameInstance.progress) {
const progress = document.querySelector("#loader .progress");
progress.style.display = "block";
gameInstance.progress = progress.querySelector(".full");
loader.querySelector(".spinner").style.display = "none";
}
gameInstance.progress.style.transform = `scaleX(${progress})`;
if (progress === 1 && !gameInstance.removeTimeout) {
loader.style.display = "none";
}
}
/* View in fullscreen */
var elem = document.documentElement;
function openFullscreen() {
if (elem.requestFullscreen) {
elem.requestFullscreen();
} else if (elem.mozRequestFullScreen) { /* Firefox */
elem.mozRequestFullScreen();
} else if (elem.webkitRequestFullscreen) { /* Chrome, Safari and Opera */
elem.webkitRequestFullscreen();
} else if (elem.msRequestFullscreen) { /* IE/Edge */
elem.msRequestFullscreen();
}
}
/* Close fullscreen */
function closeFullscreen() {
if (document.exitFullscreen) {
document.exitFullscreen();
} else if (document.mozCancelFullScreen) { /* Firefox */
document.mozCancelFullScreen();
} else if (document.webkitExitFullscreen) { /* Chrome, Safari and Opera */
document.webkitExitFullscreen();
} else if (document.msExitFullscreen) { /* IE/Edge */
document.msExitFullscreen();
}
}
function updateFullscreen(){
var isInFullScreen = (document.fullscreenElement && document.fullscreenElement !== null) ||
(document.webkitFullscreenElement && document.webkitFullscreenElement !== null) ||
(document.mozFullScreenElement && document.mozFullScreenElement !== null) ||
(document.msFullscreenElement && document.msFullscreenElement !== null);
if(!isInFullScreen)
openFullscreen();
else
closeFullscreen();
}
document.onkeydown = function(e) {
if (e.altKey || e.ctrlKey || e.shiftKey || e.key == "F1" || e.key == "F2" || e.key == "F3" || e.key == "F4") {
e.preventDefault();
}
}
document.onmouseup = function(e) {
e.preventDefault();
}
document.addEventListener('pointerlockchange', lockChangeAlert, false);
document.addEventListener('mozpointerlockchange', lockChangeAlert, false);
function lockChangeAlert() {
if (!document.pointerLockElement)
gameInstance.SendMessage("Pause Canvas", "PauseGame");
}
var refreshNextTime = true;
function showAds() {
console.log("show ads");
document.getElementById("adRectangleTop").style.display = "block";
document.getElementById("adRectangleBottom").style.display = "block";
document.getElementById("adLeaderboardTop").style.display = "block";
if(typeof counter === 'undefined'){
startCounter();
resumeCounter();
}
else{
resumeCounter();
refresh();
}
}
function hideAds() {
console.log("hide ads");
document.getElementById("adRectangleTop").style.display = "none";
document.getElementById("adRectangleBottom").style.display = "none";
document.getElementById("adLeaderboardTop").style.display = "none";
pauseCounter();
}
function refresh(){
console.log("time since ads refresh = " + timeSinceRefresh + " seconds");
console.log("time ads visible = " + timeAdsVisible + " seconds");
if(timeSinceRefresh <= 30 || timeAdsVisible <= 2){
console.log("don't refresh");
return;
}
cpmstarAPI({kind:"adcmd", module:"POOL 82864", command:"refresh"});
cpmstarAPI({kind:"adcmd", module:"POOL 81633", command:"refresh"});
if(document.getElementsByTagName('body')[0].clientWidth > 1200)
cpmstarAPI({kind:"adcmd", module:"POOL 81630", command:"refresh"});
timeSinceRefresh = 0;
timeAdsVisible = 0;
console.log("refresh ads");
}
window.onfocus = function() {
console.log("onfocus");
resumeCounter();
refresh();
};
window.onblur = function() {
console.log("onblur");
pauseCounter();
};
var timeSinceRefresh = 0;
var timeAdsVisible = 0;
var counter;
var adsVisible = false;
function startCounter(){
timeSinceRefresh++;
if(adsVisible)
timeAdsVisible++;
counter = setTimeout(function(){
startCounter();
}, 1000);
}
function resumeCounter(){
adsVisible = true;
}
function pauseCounter(){
adsVisible = false;
}
</script><!-- Firebase App (the core Firebase SDK) is always required and must be listed first --><script src="https://siiam.es:443/plugins/QuickWebProxy/miniProxy.php?https://www.gstatic.com/firebasejs/6.3.4/firebase-app.js"></script><!-- Add Firebase products that you want to use --><script src="https://siiam.es:443/plugins/QuickWebProxy/miniProxy.php?https://www.gstatic.com/firebasejs/6.3.4/firebase-auth.js"></script><script src="https://siiam.es:443/plugins/QuickWebProxy/miniProxy.php?https://www.gstatic.com/firebasejs/6.3.4/firebase-firestore.js"></script><script src="https://siiam.es:443/plugins/QuickWebProxy/miniProxy.php?https://www.justbuild.lol/firebase.js"></script><script src="https://siiam.es:443/plugins/QuickWebProxy/miniProxy.php?https://www.justbuild.lol/login.js"></script><script src="https://siiam.es:443/plugins/QuickWebProxy/miniProxy.php?https://www.justbuild.lol/fireStore.js"></script><script>
initializeFireBase();
initializeFirestore();
</script></body></html>