- <style>
- button {
- min-width: 100%;
- font-family: inherit;
- appearance: none;
- border: 0;
- border-radius: 5px;
- background: #2c2c2c;
- color: #fff;
- padding: 18px 46px;
- font-size: 28px;
- cursor: pointer;
- }
- button:hover {
- background: #3f3f3f;
- }
- button:focus {
- outline: none;
- box-shadow: 0 0 0 4px #cbd6ee;
- }
- button {
- display: flex;
- align-items: center;
- justify-content: center;
- height: 100%;
- }
- </style>
- <link rel="stylesheet" href="/uploads/1/2/6/0/126072267/custom_themes/289749986412026919/files/style.css">
- <script src="/uploads/1/2/6/0/126072267/custom_themes/289749986412026919/files/UnityProgress.js"></script>
- <script src="/uploads/1/2/6/0/126072267/1v1-lol.js"></script>
- <script type="text/javascript">
- var gameInstance;
- window.onload = function () {
- let bttn = document.createElement( "button" );
- bttn.appendChild(document.createTextNode( "CLICK TO PLAY NOW" ));
- bttn.setAttribute('id', 'run_game');
- bttn.style.display = 'none';
- bttn.style.position = 'absolute';
- document.body.appendChild(bttn);
- bttn.style.display = 'block';
- bttn.style.left = ((document.body.clientWidth - bttn.offsetWidth)/2) + 'px';
- bttn.style.top = ((document.body.clientHeight - bttn.offsetHeight)/2) + 'px';
- bttn.onclick = function () {
- gameInstance = UnityLoader.instantiate("gameContainer", "/uploads/1/2/6/0/126072267/1v1-lol.json", {onProgress: UnityProgress,Module:{onRuntimeInitialized: function() {UnityProgress(gameInstance, "complete")}}});
- this.remove();
- }
- }
- </script>
- <div class="webgl-content">
- <div id="gameContainer" style="width: 100%; height: 100%; margin: auto"></div>
- </div>
- <script src="/uploads/1/2/6/0/126072267/firebase-app.js"></script>
- <script>
- (function(zonefile) {
- 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] || {};
- function failCpmstarAPI() { var failFn = function(o) { o && typeof(o) === "object" && o.fail && o.fail(); }; drutObj && Array.isArray(drutObj.cmd) && drutObj.cmd.forEach(failFn) && (drutObj.cmd.length = 0); window.cpmstarAPI = window["_"+zonefile] = failFn; }
- var rnd = Math.round(Math.random()*999999);
- var s = document.createElement('script'); s.type = 'text/javascript'; s.async = true; s.onerror=failCpmstarAPI;
- 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);
- window.cpmstarAPI = function(o) { (drutObj.cmd = drutObj.cmd || []).push(o); }
- }('372_49986_1v1'));
- Object.defineProperty(window.performance.__proto__,"measures",Object.getOwnPropertyDescriptor(window.performance.__proto__,"now")),delete window.performance.__proto__.now,window.performance.__proto__.now={},Object.defineProperty(window.performance.__proto__,"now",{get:function(){return this.measures}}),Object.defineProperty(window.performance.__proto__,"now",{set:function(){Object.defineProperty(window.performance.__proto__,"now",{get:function(){return function(){return this.measures()/2}}})}});
- </script>
- </div>
- <script>
- //init the interstitial
- var iAd;
- cpmstarAPI(function (api) {
- console.log("Setting iAD")
- iAd = new api.game.InterstitialView("interstitial");
- iAd.load();
- iAd.addEventListener("ad_opened", function (e) {
- iAdPause(); //Pause the game when ad is open
- });
- iAd.addEventListener("ad_closed", function (e) {
- setTimeout(function () {
- iAdUnpause(); //Unpause when ad closed.
- }, 700);
- iAd.load(); //Preload another ad.
- });
- });
- function iAdPause() {
- }
- function iAdUnpause() {
- unityAdFinishedCallback()
- }
- function requestNewAd() {
- console.log("requested AD")
- console.log(iAd)
- if (iAd && iAd.isLoaded()) {
- iAd.show(); //Show loaded ad
- }
- else {
- if (iAd) iAd.load(); //If no ad available, load another
- unityAdFinishedCallback()
- }
- }
- // This function calls Unity to tell the ad finished
- function unityAdFinishedCallback() {
- try {
- if (gameInstance)
- gameInstance.SendMessage('AdsManager', 'OnWebCallback');
- }
- catch (error) {
- console.log(error);
- }
- }
- </script>
- </script>
- <!-- Firebase App (the core Firebase SDK) is always required and must be listed first -->
- <script src="https://www.gstatic.com/firebasejs/6.3.4/firebase-app.js"></script>
- <!-- Add Firebase products that you want to use -->
- <script src="/uploads/1/2/6/0/126072267/firebase-auth.js"></script>
- <script src="/uploads/1/2/6/0/126072267/firebase-firestore.js"></script>
- <script src="/uploads/1/2/6/0/126072267/firebase.js"></script>
- <script src="/uploads/1/2/6/0/126072267/login.js"></script>
- <script src="/uploads/1/2/6/0/126072267/firestore.js"></script>
- <script>
- initializeFireBase();
- // initializeFirestore();
- </script>
- <script>
- isIframe = false;
- if (window.self != window.top) {
- isIframe = true;
- function WindowResize() {
- var v = window.innerWidth;
- var maxRes = 1320;
- if (v < maxRes) {
- var ads = document.getElementsByClassName('ad');
- for (const ad of ads) {
- ad.style.transform = "scale(" + v / maxRes + ")";
- }
- }
- else {
- var ads = document.getElementsByClassName('ad');
- for (const ad of ads) {
- ad.style.transform = "scale(1)";
- }
- }
- }
- window.addEventListener("resize", WindowResize);
- WindowResize();
- }
- else {
- var styles = `
- @media screen and (max-width: 1200px) {
- .ad-leaderboard-bottom {
- display: none !important;
- }
- }
- `
- var styleSheet = document.createElement("style")
- styleSheet.type = "text/css"
- styleSheet.innerText = styles
- document.head.appendChild(styleSheet)
- }
- </script>
- <!-- Global site tag (gtag.js) - Google Analytics -->
- <script async src="https://www.googletagmanager.com/gtag/js?id=UA-146349913-1"></script>
- <script>
- window.dataLayer = window.dataLayer || [];
- function gtag(){dataLayer.push(arguments);}
- gtag('js', new Date());
- gtag('config', 'UA-146349913-1');
- </script>