Files
2023-09-25 19:51:08 -04:00

955 lines
26 KiB
HTML

<!DOCTYPE html>
<html lang="en-us">
<head>
<!-- Google tag (gtag.js) -->
<script async="" src="https://www.googletagmanager.com/gtag/js?id=G-7L02W3ZMS5"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-7L02W3ZMS5');
</script>
<meta charset="utf-8"/>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
<title>Clicker Heroes</title>
<link as="font" crossorigin="" href="builds/2885/fonts/Matiz-webfont.woff" rel="preload" type="font/woff"/>
<style>
.container {
width: 100%;
height: 100%;
z-index: 100;
position: absolute;
margin: 0px;
padding: 0px;
left: 0px;
top: 0px;
display: none;
}
.prompt {
padding-bottom: 20px;
padding-left: 0px;
padding-right: 0px;
display: block;
}
.closeButton {
content:url("builds/2885/img/button_x.png?v=2885");
position: absolute;
width: 45px;
height: 46px;
top: -18px;
right: -22px;
}
.closeButton:hover {
content:url("builds/2885/img/button_x_hover.png?v=2885");
width: 54px;
height: 54px;
top: -22px;
right: -24px;
}
.largeWindow {
width: 800px;
height: 500px;
background-image: url("builds/2885/img/troubleshoot_popup_bg.png?v=2885");
margin-left: auto;
margin-right: auto;
margin-top: 100px;
position: relative;
}
.largeWindowInfo {
top: 20px;
left: 20px;
width: 760px;
height: 460px;
overflow: auto;
text-align: left;
position: relative;
font-family: 'Verdana';
}
#importWindow {
width: 600px;
height: 400px;
background-image: url("builds/2885/img/import_save_data_popup_bg.png?v=2885");
text-align: center;
margin-left: auto;
margin-right: auto;
margin-top: 100px;
position: relative;
}
#importWindow > .prompt {
padding-top: 20px;
}
#importWindow > textarea {
width: 560px;
height: 240px;
resize: none;
margin: 0px;
}
#redeemWindow {
width: 400px;
height: 200px;
background-image: url("builds/2885/img/redemption_code_popup_bg.png?v=2885");
text-align: center;
margin-left: auto;
margin-right: auto;
margin-top: 200px;
position: relative;
}
#redeemWindow > .prompt {
padding-top: 40px;
}
#loadingContainer {
width: 100%;
z-index: -100;
position: absolute;
padding: 0px;
margin: 0px;
left: 0px;
}
@font-face {
font-family: 'matiz';
src: url('builds/2885/fonts/Matiz-webfont.eot');
src: url('builds/2885/fonts/Matiz-webfont.eot?#iefix') format('embedded-opentype'),
url('builds/2885/fonts/Matiz-webfont.woff') format('woff'),
url('builds/2885/fonts/Matiz-webfont.ttf') format('truetype'),
url('builds/2885/fonts/Matiz-webfont.svg#matizregular') format('svg');
font-weight: normal;
font-style: normal;
}
#word {
position: relative;
padding-top: 180px;
}
body {
margin: 0 !important;
overflow: hidden !important;
}
#loadingCheck {
width: 100%;
left: 0px;
position: absolute;
margin: 0px;
padding: 0px;
top: 480px;
font-family: 'matiz';
font-size: 24px;
color: rgba(255,255,255,.7);
visibility: hidden;
}
#loadingCheck > a {
color: rgba(255,255,255,.7);
}
#buildInfo {
font-size: 24px;
font-family: "matiz";
color: rgba(255,255,255,.5);
}
#progressText {
position: absolute;
left: 0px;
top: 0px;
width: 100%;
height: 100%;
font-size: 24px;
font-family: "matiz";
color: rgba(0,0,0,.3);
}
#progressBar {
width: 500px;
height: 30px;
display: block;
border: 2px solid;
color: rgba(255,255,255,.5);
position: relative;
}
#progressFill {
position: absolute;
left: 0px;
bottom: 0px;
width: 0%;
height: 100%;
display: block;
background-color: rgba(255,255,255,.5);
}
</style>
<link href="portal.css" id="portalTheme" rel="stylesheet" type="text/css"/>
<link disabled="" href="hosted.css" id="hostTheme" rel="stylesheet" type="text/css"/>
<script>
var build = "v1.0e12-2885";
var tabHiddenTime = 0;
var ch1 = null;
var numLetters = 7;
var intervalId = 0;
var loadingCheckId = 0;
var animStartTime;
var crazysdk = null;
var pageLoaded = false;
var loadingStatus = 0;
var purchaseToken = null;
var products = [];
var notificationStatus = 0;
var notifications = [];
const CLIENT_LOAD_STARTING = 1;
const CLIENT_LOAD_FINISHED = 2;
const CONTENT_LOAD_STARTING = 3;
const CONTENT_LOAD_FINISHED = 4;
const NOTIFICATIONS_SUPPORTED = 1;
const NOTIFICATIONS_PERMITTED = 2;
var switchThemes = window.location.href.toLowerCase().indexOf("/gamebuild") == -1;
var localBuild = false;
localBuild = localBuild || window.location.href.toLowerCase().indexOf("http://localhost") == 0;
localBuild = localBuild || window.location.href.toLowerCase().indexOf("https://localhost") == 0;
checkNotificationStatus();
if ( switchThemes )
{
document.getElementById("portalTheme").disabled = true;
document.getElementById("hostTheme").disabled = false;
}
document.addEventListener('visibilitychange', onTabVisibilityChanged);
document.addEventListener('paste', onPaste);
window.addEventListener('beforeunload', onBeforeUnload);
window.addEventListener('focus', onFocus);
// specify the top-most window in case we're in an iframe
window.document.addEventListener('click', onClickInWindow);
function checkNotificationStatus()
{
if ( typeof Notification !== "undefined" )
{
console.log("Notifications.permission=" + Notification.permission);
if ( Notification.permission == "granted" )
{
notificationStatus = NOTIFICATIONS_SUPPORTED | NOTIFICATIONS_PERMITTED;
}
else
{
notificationStatus = NOTIFICATIONS_SUPPORTED;
}
}
}
function areNotificationsSupported()
{
return (notificationStatus & NOTIFICATIONS_SUPPORTED) > 0;
}
function areNotificationsEnabled()
{
return (notificationStatus & NOTIFICATIONS_PERMITTED) > 0;
}
function requestNotificationPermission()
{
if ( areNotificationsSupported() )
{
if ( !areNotificationsEnabled() )
{
showRequestNotificationWindow();
/*
Notification.requestPermission().then(
function(permission) {
if ( permission == "granted" )
{
notificationStatus = NOTIFICATIONS_SUPPORTED | NOTIFICATIONS_PERMITTED;
showNotificationsWorking();
}
}
);*/
}
else
{
showNotificationsWorking();
}
}
}
function showRequestNotificationWindow()
{
var notificationWindow = window.open("builds/2885/requestNotifications.html", "_blank", "width=500,height=300,toolbar=no,resizable=no,location=no,status=no,menubar=no,top=100,left=100");
if ( notificationWindow == null )
{
alert("Please enable popups in your browser order to approve notifications for the game.");
return;
}
var windowTimer = 0;
windowTimer = setInterval(function() {
if(notificationWindow.closed) {
clearInterval(windowTimer);
checkNotificationStatus();
if ( (notificationStatus & NOTIFICATIONS_PERMITTED) > 0 )
{
showNotificationsWorking();
}
}
}, 500);
}
function showNotificationsWorking()
{
addNotification("Let's go!", "Clicker Heroes notifications enabled!");
}
function showNotification(title, message)
{
if ( document.hasFocus() )
{
return;
}
addNotification(title, message);
}
function addNotification(title, message)
{
if ( areNotificationsEnabled() )
{
var notification = new Notification(title, { body: message, icon: "builds/2885/img/icon512x512.png" });
notifications.push(notification);
}
}
function onPaste(e)
{
var text = (e.clipboardData || window.clipboardData).getData('text');
sendToGame("PasteClipboardTextToInputField", text);
}
function onClickInWindow(e)
{
var unityCanvas = document.getElementById("unity-canvas");
if ( unityCanvas != null && !unityCanvas.contains(e.target) ) // clicked off game, so clear selection
{
callGame("ClearCurrentSelection");
}
}
function onBeforeUnload(e)
{
callGame("HandleQuit");
}
function startLoadingAnimation()
{
animStartTime = Date.now();
intervalId = setInterval(nextLetter, 50);
loadingCheckId = setTimeout(showLoadingCheck, 20000);
}
function stopLoadingAnimation()
{
clearInterval(intervalId);
clearTimeout(loadingCheckId);
var el = document.getElementById("loadingContainer");
el.remove();
el = document.getElementById("loadingCheck");
el.remove();
console.log("LOADING ANIMATION REMOVED");
}
function showLoadingCheck()
{
var el = document.getElementById("loadingCheck");
if ( el != null )
{
el.style.visibility = "visible";
}
}
function nextLetter()
{
var time = Date.now();
var leadTime = 500;
var timePerLetter = 150;
var value = (time - animStartTime) % ((numLetters * timePerLetter) + leadTime);
var targetIndex = -1;
if ( value >= leadTime )
{
targetIndex = Math.floor((value - leadTime) / timePerLetter);
}
var maxDist = -20;
var sin = Math.sin(value) * 0.5;
for ( var i = 0; i < numLetters; ++i )
{
var div = document.getElementById("letter" + i);
var pos = div.style.top;
pos = pos.replace("px", "");
if ( pos.length == 0 )
{
pos = "0";
}
var yPos = parseInt(pos);
var targetPos = targetIndex == i ? maxDist : 0;
var dist = targetPos - yPos;
if ( Math.abs(dist) < 3 )
{
yPos = targetPos;
}
else {
yPos = Math.round( yPos + (dist * 0.5) );
}
div.style.top = yPos + "px";
}
}
function callGame(funcName)
{
if ( ch1 != null )
{
ch1.SendMessage("JSListener", funcName);
}
}
function sendToGame(funcName, value)
{
if ( ch1 != null )
{
ch1.SendMessage("JSListener", funcName, value);
}
}
function onTabVisibilityChanged(e)
{
var time = Date.now();
if (window.document.visibilityState === 'visible')
{
var ms = time - tabHiddenTime;
callGame("Unpause"); // unpause the game update loop
sendToGame("Timelapse", ms);
}
else
{
tabHiddenTime = time;
callGame("Pause"); // pause the game update loop
}
}
function onFocus(e)
{
if ( notifications.length > 0 )
{
for( var i = 0; i < notifications.length; ++i )
{
notifications[i].close();
}
notifications = [];
}
}
function getKeyboard()
{
callGame("RelinquishKeyboard");
}
function releaseKeyboard()
{
callGame("ClaimKeyboard");
}
function redeemCode()
{
sendToGame("RedeemCode", document.getElementById("redemptionCode").value);
hideRedeemWindow();
}
function importSave()
{
sendToGame("ImportSaveData", document.getElementById("importData").value);
hideImportWindow();
}
function hideImportWindow()
{
hideElement("importUI");
}
function showTroubleshootWindow()
{
showElement("troubleshootUI");
}
function hideTroubleshootWindow()
{
hideElement("troubleshootUI");
}
function showLoadErrorText(errorText)
{
showElement("loadSaveErrorUI");
var errorMessage = "<strong>An error occurred loading your save.<br/><br/>Your current save data has been preserved.<br/><br/>Please report this to the dev team:</strong><br/><br/>";
errorMessage += errorText;
var errorDiv = document.getElementById("loadSaveErrorDisplay");
errorDiv.innerHTML = errorMessage;
}
function showUnityErrorText(errorText)
{
showElement("loadSaveErrorUI");
var errorMessage = "<strong>An error occurred loading the game client.<br/><br/>We recommend reading our <a href=\"javascript:showTroubleshootWindow()\">troubleshoot guide</a> to fix the issue.<br/><br/>If the issue persist, please report this to the dev team:</strong><br/><br/>";
errorMessage += errorText;
var errorDiv = document.getElementById("loadSaveErrorDisplay");
errorDiv.innerHTML = errorMessage;
}
function hideSaveErrorWindow()
{
hideElement("loadSaveErrorUI");
}
function showImportWindow(message)
{
showElement("importUI");
document.getElementById("importPrompt").innerHTML = message;
document.getElementById("importData").value = "";
}
function hideRedeemWindow()
{
hideElement("redeemUI");
}
function showRedeemWindow(message)
{
showElement("redeemUI");
document.getElementById("redeemPrompt").innerHTML = message;
document.getElementById("redemptionCode").value = "";
}
function showElement(id)
{
getKeyboard();
var w = document.getElementById(id);
w.style.display = "block";
}
function hideElement(id)
{
releaseKeyboard();
var w = document.getElementById(id);
w.style.display = "none";
}
function onPageLoaded()
{
console.log("Page done loading");
pageLoaded = true;
startLoadingAnimation();
initCrazyGamesSDK()
}
function onCrazyGamesSDKLoaded()
{
console.log("Crazy games done loading");
crazysdk = window.CrazyGames.CrazySDK.getInstance(); // getting the SDK
initCrazyGamesSDK();
}
function onPaymentAPILoaded()
{
initCrazyGamesSDK();
}
function initCrazyGamesSDK()
{
if ( !pageLoaded || crazysdk == null || playsaurusPayments == null ) {
return;
}
crazysdk.init();
logClientLoadStarted();
}
function logClientLoadStarted()
{
updateLoadingStatus( CLIENT_LOAD_STARTING );
}
function logClientLoadFinished()
{
updateLoadingStatus( CLIENT_LOAD_FINISHED );
}
function logContentLoadStarted()
{
updateLoadingStatus(CONTENT_LOAD_STARTING);
}
function logContentLoadFinished()
{
updateLoadingStatus(CONTENT_LOAD_FINISHED);
}
function addProduct(name, sku, imgUrl, priceInCents)
{
var pathname = window.location.pathname;
var imagePath = window.location.protocol + "//" + window.location.host + pathname.substring(0, pathname.lastIndexOf('/') + 1) + imgUrl;
console.log("Adding product " + name + ", sku=" + sku + ", imgUrl=" + imagePath + ", price=" + priceInCents);
products.push( { name: name, sku: sku, image: imagePath, price: priceInCents } );
}
function registerProducts()
{
if ( playsaurusPayments == undefined )
{
console.log("Payment API not detected...");
}
else
{
playsaurusPayments.createPopup().then(
function() {
playsaurusPayments.initializePaypal("AWcIR_Up-gSLieQABMzk1__jQBAlT7iBI2lcmJpbQqBTa4Azh-JHrH4okfEsxYmZ4ltax282ZAuJs0qZ");
playsaurusPayments.initializeStripe("pk_live_51LXY6dCnj0k6kn1bSZh8iTuuwSCatikN7phnZliGCtUFNbYbt5fbd9kASEpkUrIRKJq3s3XpFP2FsJTw7pvxL8qm00gem4z1vJ");
playsaurusPayments.registerProducts(products);
playsaurusPayments.setPurchaseSuccessCallback(onPurchaseSuccess);
}
);
}
}
function startPurchase(sku, itemName)
{
var productIndex = -1;
for( var i = 0; i < products.length; ++i )
{
if ( products[i].sku == sku )
{
productIndex = i;
break;
}
}
if ( productIndex > -1 )
{
purchaseToken = sku + "_" + Date.now().toString();
playsaurusPayments.startPurchase(productIndex, purchaseToken);
}
else
{
console.log("Could not find purchase product with sku '" + sku + "'");
}
}
function onPurchaseSuccess(product, token)
{
if ( token != null && token == purchaseToken )
{
sendToGame("PurchaseSuccessful", product.sku);
}
}
function updateLoadingStatus(currentStatus)
{
if ( loadingStatus < currentStatus )
{
loadingStatus = currentStatus;
switch(loadingStatus)
{
case CLIENT_LOAD_STARTING:
//console.log(":::::::::::::::::CLIENT LOAD STARTED");
break;
case CLIENT_LOAD_FINISHED:
//console.log(":::::::::::::::::CLIENT LOAD FINISHED");
break;
case CONTENT_LOAD_STARTING:
//console.log(":::::::::::::::::CONTENT LOAD STARTED");
break;
case CONTENT_LOAD_FINISHED:
//console.log(":::::::::::::::::CONTENT LOAD FINISHED");
break;
}
}
}
function onStatSigReady()
{
console.log("ssg is ready!");
}
function fetchSaveData()
{
var saveText = window.localStorage.getItem("chAccountSO");
if ( saveText == null ) {
alert("No save data could be found.");
}
else {
exportSaveData(saveText, "clickerHeroesRecoverySave.txt");
}
}
function updateClientLoadingProgress(progress)
{
var el = document.getElementById("progressText");
el.innerHTML = Math.round(progress * 100) + "%";
el = document.getElementById("progressFill");
el.style.width = Math.round(progress * 100) + "%";
}
function exportSaveData(saveText, filename) {
// convert the text into a blob
var saveBlob = new Blob([saveText], {
type: 'text/plain'
});
// get a URL for the blob
const url = window.URL.createObjectURL(saveBlob);
// create an invisible anchor tag and set its href to the url
const a = document.createElement('a');
a.href = url;
a.style.display = 'none';
a.download = filename;
document.body.appendChild(a);
// invoke the download
a.click();
// remove the URL
window.URL.revokeObjectURL(url);
// remove the anchor tag
a.remove();
// copy to clipboard
var textarea = document.createElement("textarea");
document.body.appendChild(textarea);
textarea.value = saveText;
textarea.select();
document.execCommand("copy");
textarea.remove();
}
</script>
<script onload="onPaymentAPILoaded()" src="payments.js"></script>
<script onload="onStatSigReady()" src="https://cdn.jsdelivr.net/npm/statsig-js/build/statsig-prod-web-sdk.min.js"></script>
</head>
<body onload="onPageLoaded()" style="text-align: center">
<img src="builds/2885/img/button_x.png?v=2885" style="display: none;"/>
<img src="builds/2885/img/button_x_hover.png?v=2885" style="display: none;"/>
<img src="builds/2885/img/import_save_data_popup_bg.png?v=2885" style="display: none;"/>
<img src="builds/2885/img/redemption_code_popup_bg.png?v=2885" style="display: none;"/>
<div class="container" id="loadSaveErrorUI">
<div class="largeWindow">
<div class="largeWindowInfo" id="loadSaveErrorDisplay">
</div>
<a onlick="hideSaveErrorWindow()"><img class="closeButton"/></a>
</div>
</div>
<div class="container" id="troubleshootUI">
<div class="largeWindow">
<div class="largeWindowInfo">
<h1>Troubleshoot Help</h1>
Here are some common issues players sometimes encounter while loading the game and how to fix them:
<ul>
<li><a href="#cache">Clear your browser cache.</a></li>
<li><a href="#webgl">Make sure WebGL is enabled.</a></li>
<li><a href="#cookies">Make sure third-party cookies are enabled for localStorage.</a></li>
<li><a href="#restart">Restart.</a></li>
<li><a href="#retrieve">Still stuck? You can still retrieve your save data.</a></li>
</ul>
<br/>
<a id="cache"><h3>Clear your browser cache.</h3></a>
Sometimes the browser will cache older versions of the game. Clearing the cache and reloading the page will force it to fetch the most up-to-date version.
<br/>
<br/>
In Chrome, Firefox, Edge, Opera, and Vivaldi, you can quickly clear your cache by pressing CTRL+SHIFT+DEL on your keyboard.
<br/>
<br/>
A window similar to the one below will appear.
<br/>
<br/>
<center>
<img src="builds/2885/img/clear_cache.jpg"/>
</center>
<br/>
<strong>Make sure only the "Cached images and files" option is selected</strong> and click "Clear Data". Then, reload the browser tab.
<br/>
<br/>
<a id="webgl"><h3>Make sure WebGL is enabled.</h3></a>
Check below to see how to check for your browser:
<ul>
<li><strong>Chrome</strong> - Enter in "chrome://gpu" in the URL bar.</li>
<li><strong>Firefox</strong> - Enter in "about:support" in the URL bar and scroll down to
<li><strong>Edge</strong> - Enter in "edge://gpu" in the URL bar.</li>
<li><strong>Opera</strong> - Enter in "opera://gpu" in the URL bar.</li>
<li><strong>Vivaldi</strong> - Enter in "vivaldi://gpu" in the URL bar.</li>"Graphics"</li>
</ul>
<br/>
<a id="cookies"><h3>Make sure third-party cookies are enabled for localStorage.</h3></a>
The game requires third-party cookies to be enabled in order to save your progress.
<br/>
<br/>
If you see the following error window, that means that third-party cookies have been disabled.
<br/>
<br/>
<center>
<img src="builds/2885/img/local_storage_error.png"/>
</center>
<br/>
Below you will find instructions for your browser on how to change your cookie settings.
<ul>
<li><strong>Chrome</strong> - Enter "chrome://settings/cookies" in the URL bar.
<li><strong>Firefox</strong> - Enter "about:preferences#privacy" in the URL bar. You will be presented with options for managing your tracking and cookies.
<li><strong>Edge</strong> - Enter "edge://settings/content/cookies" in the URL bar. Make sure "Allow sites to save and read cookie data (recommended)" is checked and "Block third-party cookies" is unchecked.
<li><strong>Opera</strong> - Enter "opera://settings/cookies" in the URL bar. You will find cookie settings under "General settings".
<li><strong>Vivaldi</strong> - Enter "vivaldi://settings/privacy/" in the URL bar. Scroll down to "Cookies" and adjust the "Third-Party Cookies" section.
</li></li></li></li></li></ul>
<br/>
<a id="restart"><h3>Restart.</h3></a>
Sometimes WebGL will stay disabled until the browser is completely restarted.
<br/>
<br/>
Some browsers continue running background processes even when they seem to be completely closed. If you suspect this to be the case, we recommend restarting your computer.
<br/>
<br/>
<a id="retrieve"><h3>Still stuck? You can still retrieve your save data.</h3></a>
If none of the above worked, you can still retrieve your save data.
<br/>
<br/>
Click <a onlick="fetchSaveData()">here to download it</a>.
<br/>
<br/>
We recommend sending us a copy so we can see if there are any issues loading the data.
<br/>
<br/>
</div>
<a onlick="hideTroubleshootWindow()"><img class="closeButton"/></a>
</div>
</div>
<div class="container" id="importUI">
<div id="importWindow">
<a onlick="hideImportWindow()"><img class="closeButton"/></a>
<div class="prompt" id="importPrompt">Enter your save data below.</div>
<textarea contenteditable="true" id="importData"></textarea>
<br/>
<br/>
<input onclick="importSave()" style="width: 120px; height: 30px;" type="button" value="Okay"/>
</div>
</div>
<div class="container" id="redeemUI">
<div id="redeemWindow">
<a onlick="hideRedeemWindow()"><img class="closeButton"/></a>
<div class="prompt" id="redeemPrompt">Enter your code below.</div>
<input contenteditable="true" id="redemptionCode" style="width: 300px; text-align: center;" type="text"/>
<br/>
<br/>
<input onclick="redeemCode()" style="width: 120px; height: 30px;" type="button" value="Okay">
</input></div>
</div>
<div id="loadingContainer">
<div id="loadingParent">
<div id="word">
<center>
<span class="letter" id="letter0">L</span>
<span class="letter" id="letter1">o</span>
<span class="letter" id="letter2">a</span>
<span class="letter" id="letter3">d</span>
<span class="letter" id="letter4">i</span>
<span class="letter" id="letter5">n</span>
<span class="letter" id="letter6">g</span>
<br/>
<span id="buildInfo">v1.0e12-2885</span>
<br/>
<br/>
<div id="progressBar">
<div id="progressFill"></div>
<div id="progressText"></div>
</div>
<br/>
</center>
</div>
</div>
</div>
<div id="loadingCheck">Don't worry, the game is still loading!<br/>If it still hasn't loaded after a few minutes, <a onlick="showTroubleshootWindow()">click here to troubleshoot</a>.</div>
<canvas height="720" id="unity-canvas" style="width: 1280px; height: 720px; background: url('builds/2885/Build/Web.jpg.unityweb') center / cover" width="1280"></canvas>
<script>
updateClientLoadingProgress(0);
</script>
<script src="builds/2885/Build/Web.loader.js"></script>
<script>
if (/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)) {
// Mobile device style: fill the whole browser client area with the game canvas:
var meta = document.createElement('meta');
meta.name = 'viewport';
meta.content = 'width=device-width, height=device-height, initial-scale=1.0, user-scalable=no, shrink-to-fit=yes';
document.getElementsByTagName('head')[0].appendChild(meta);
}
var v = "?v=2885";
createUnityInstance(document.querySelector("#unity-canvas"), {
dataUrl: "builds/2885/Build/Web.data.unityweb" + v,
frameworkUrl: "builds/2885/Build/Web.framework.js.unityweb" + v,
codeUrl: "builds/2885/Build/Web.wasm.unityweb" + v,
streamingAssetsUrl: "builds/2885/StreamingAssets",
companyName: "Playsaurus",
productName: "Clicker Heroes",
productVersion: "1.0e12",
// matchWebGLToCanvasSize: false, // Uncomment this to separately control WebGL canvas render size and DOM element size.
// devicePixelRatio: 1, // Uncomment this to override low DPI rendering on high DPI displays.
}, (progress) => updateClientLoadingProgress(progress) ).then( (unityInstance) => {
// set a global instance for JS to call
console.log(">>" + v + " started");
ch1 = unityInstance;
if ( ch1 != null ) {
stopLoadingAnimation();
console.log(">>" + v + " finished");
}
} ).catch(
(error) => {
showUnityErrorText(error);
}
);
function isWhiteListed() {
var result = false;
try {
var top = window.top.location.href.toLowerCase();
top = top.replace("http://www.", "");
top = top.replace("https://www.", "");
top = top.replace("http://", "");
top = top.replace("https://", "");
result = result || top.indexOf("localhost") == 0; // local testing
result = result || top.indexOf("clickerheroes.com/play") == 0; // official play page
result = result || top.indexOf("clickerheroes.com/beta") == 0; // beta page
result = result || top.indexOf("clickerheroes.com/gamebuild") == 0; // portal page
}
catch(e){ // security error with touching window.top
result = false;
}
return result;
}
if(!(
isWhiteListed() ||
true))
{
true;
}
</script>
</body>
</html>