<?php
include_once('inc.php');

if(isset($_COOKIE['sessionToken'])) {
	$GLOBALS['user_data'] = getUserData($_COOKIE['sessionToken']);
}


// Cookie consent and Ads
$requiresGDPR = requiresGDPR(@$_SERVER['HTTP_CF_IPCOUNTRY']);
$requiresGDPR = false;

$requiresCookieConsent = $requiresGDPR && !(isset($_COOKIE['acceptedCookies']) || isset($_COOKIE['acceptedAllCookies']));

$requiresCookieConsent = false;

$doPersonalizedAds = false;
$doAnalytics = false;
if($requiresGDPR && isset($_COOKIE['acceptedCookies']) && $_COOKIE['acceptedCookies'] == false) {
	$approvedCookies = explode(',', $_COOKIE['acceptedAllCookies']);
	foreach($approvedCookies as $approvedCookie) {
		if($approvedCookie == 'personalized-ads') {
			$doPersonalizedAds = true;
		}
		if($approvedCookie == 'analytics') {
			$doAnalytics = true;
		}
	}
} else {
	$doPersonalizedAds = true;
	$doAnalytics = true;
}

$stats = json_decode(file_get_contents('stats.json'), true);

ob_start();

$page = 'default';
if (isset($_GET['page'])) {
	$page = $_GET['page'];
}

$rate = 1;
$currency = 'USD';
$currencyName = 'dollar';
$currencySymbol = '$';
$currencySymbolPosition = 'front';
if(isset($_GET['currency'])) {
	$currency = $_GET['currency'];
} else if(isset($_COOKIE['currency'])) {
	$currency = $_COOKIE['currency'];
}

if(!empty($currency)) {
	$rate = getRate($currency);

	if($currency == 'EUR') {
		$currencySymbol = '€';
		$currencySymbolPosition = 'end';
		$currencyName = 'euro';
	}
        if($currency == 'BTC') {
                $currencySymbol = 'BTC';
                $currencySymbolPosition = 'end';
                $currencyName = 'btc';
        }
        if($currency == 'ETH') {
                $currencySymbol = 'ETH';
                $currencySymbolPosition = 'end';
                $currencyName = 'eth';
        }
        if($currency == 'GOLD') {
                $currencySymbol = 'oz';
                $currencySymbolPosition = 'end';
                $currencyName = 'gold';
        }
        if($currency == 'SILVER') {
                $currencySymbol = 'oz';
                $currencySymbolPosition = 'end';
                $currencyName = 'silver';
        }
}

$type = '';
switch ($page) {
        case 'dashboard':
                include('pages/dashboard.php');
        break;
	case 'flippenings':
		include('pages/flippening.php');
	break;
        case 'privacy':
                include('pages/privacy.php');
        break;
        case '404':
                header("HTTP/1.0 404 Not Found");
                include('pages/404.php');
        break;
        case 'sign-up':
                include('pages/sign-up.php');
        break;
        case 'account':
                include('pages/account.php');
        break;
        case 'password-reset':
                include('pages/password-reset.php');
        break;
        case 'forgot-password':
                include('pages/forgot-password.php');
        break;
        case 'compare':
                include('pages/compare.php');
        break;
	default:
		$pageNbr = 1;
		if(isset($_GET["page_nbr"])) {
        		$pageNbr = (int)$_GET["page_nbr"];
		} else {
        		$pageNbr = getCurrentPage();
		}

		$perPage = 100;
		$pageCount = ceil($stats['all'] / $perPage);
		if(isset($_GET['type'])) {
			switch($_GET['type']) {
				case 'metals':
					$type = 'METAL';
					$pageCount = ceil($stats['metals'] / $perPage);
				break;
				case 'etfs':
					$type = 'ETF';
					$pageCount = ceil($stats['etfs'] / $perPage);
				break;
				case 'companies':
					$type = 'COMPANY';
					$pageCount = ceil($stats['companies'] / $perPage);
				break;
				case 'cryptos':
					$type = 'CRYPTOCURRENCY';
					$pageCount = ceil($stats['cryptos'] / $perPage);
				break;
			}
		}

		if($page == 'watchlist') {
			if(!isLoggedIn()) {
				?>
				<div class="middle-header">
						<div class="alert error-alert">You must be logged in to see this page!</div>
						<div style="font-size: 65px; text-align:center; padding: 50px;">⛔</div>
				</div>
				<?php
			} else {
				$topAll = getAssetBatch($pageNbr, @$GLOBALS['user_data']['watchlist']);
				$resCount = getAssetBatchCount(@$GLOBALS['user_data']['watchlist']);
				$pageCount = ceil($resCount / $perPage);
				include('pages/top100.php');
			}
		} else {
			$topAll = getTopAll($pageNbr, $type);
			include('pages/top100.php');
		}
}

$pageContent = ob_get_contents();
ob_end_clean();

?>
<!DOCTYPE html>
<html lang="en-US">
<head>
<title><?php echo $title ?></title>
<meta charset="utf-8"/>
<meta name="robots" content="INDEX,FOLLOW" />
<meta name="description" content="<?php echo $meta_description; ?>">
<meta http-equiv="content-language" content="en-us">
<meta property="og:title" content="<?php echo $title; ?>">
<meta property="og:type" content="website" />
<meta property="og:description" content="<?php echo $meta_description; ?>">
<meta property="og:image" content="https://8marketcap.com/8marketcap.png">
<?php
$urlPath = explode('?',$_SERVER['REQUEST_URI']);
$urlPath = str_replace('//','/',$urlPath[0]);
$urlPath = str_replace('//','/',$urlPath);
if(substr($urlPath, -1) != '/') {
        $urlPath = $urlPath . '/';
}
echo '<link rel="canonical" href="https://8marketcap.com' . $urlPath . '" />' . PHP_EOL;
echo '<meta property="og:url" content="https://8marketcap.com' . $urlPath . '" />';
?>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico">
<link rel="manifest" href="/site.webmanifest">
<link rel="stylesheet" type="text/css" href="/style.css?v=195">

<script>
function lightOn() {
	document.body.classList.remove('dark');
	document.cookie = 'darkmode=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;';
	document.getElementById('logo-img').src='/logo-dark.svg?v=1';

        var assetLogos = document.querySelectorAll(".marketcap-table .company-logo");
        for (i = 0; i < assetLogos.length; i++) {
                if(assetLogos[i].hasAttribute("data-img-path")) {
                        assetLogos[i].src = assetLogos[i].getAttribute("data-img-path");
                }
        }
	return false;
}
function lightOff() {
	document.body.classList.add('dark');
	document.cookie = 'darkmode=1;  max-age=91536000000; path=/;';
	document.getElementById('logo-img').src='/logo-white.svg?v=1';

	var assetLogos = document.querySelectorAll(".marketcap-table .company-logo");
	for (i = 0; i < assetLogos.length; i++) {
		if(assetLogos[i].hasAttribute("data-img-dark-path")) {
			assetLogos[i].src = assetLogos[i].getAttribute("data-img-dark-path");
		}
	}
	return false;
}
</script>


<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-9546025474036748"
     crossorigin="anonymous"></script>

<!--
<script type="text/javascript">
var infolinks_pid = 3409833;
var infolinks_wsid = 3;
</script>
<script type="text/javascript" src="//resources.infolinks.com/js/infolinks_main.js"></script>
-->
</head>
<body class="cmkt<?php

if(isset($_COOKIE['darkmode']) && $_COOKIE['darkmode'] == '1') {
	echo ' dark';
}

if(isset($GLOBALS['user_data']) && $GLOBALS['user_data']['success']) {
	echo ' logged-in';
}
?>">

<div class="banner">
	<div class="container">
		<span class="banner-element">
			Companies:&nbsp;<span class="marketcap"><?php echo formatCoinCap($stats['companies_marketcap'] * $rate, true, true, $currencySymbol, $currencySymbolPosition); ?></span>
		</span>
		<span class="banner-element">
			ETFs:&nbsp;<span class="marketcap"><?php echo formatCoinCap($stats['etfs_marketcap'] * $rate, true, true, $currencySymbol, $currencySymbolPosition); ?></span>
		</span>
		<span class="banner-element">
			Cryptocurrencies:&nbsp;<span class="marketcap"><?php echo formatCoinCap($stats['cryptos_marketcap'] * $rate, true, true, $currencySymbol, $currencySymbolPosition); ?></span>
		</span>
		<span class="banner-element">
			Gold:&nbsp;<span class="marketcap"><?php echo formatCoinCap($stats['gold_marketcap'] * $rate, true, true, $currencySymbol, $currencySymbolPosition); ?></span>
		</span>
	</div>
</div>

	<div class="container">
		<div class="header">
			<div class="logo">
			<a href="/">
<?php if(isset($_COOKIE['darkmode']) && $_COOKIE['darkmode'] == '1') { ?>
                                <img id="logo-img" src="/logo-white.svg?v=1" alt="Infinite Market Cap logo">
<?php } else { ?>
				<img id="logo-img" src="/logo-dark.svg?v=1" alt="Infinite Market Cap logo">
<?php } ?>
			</a>
			</div>
			<div class="navbar-toggler-container">
				<button id="navbar-toggler-btn" class="navbar-toggler" type="button" aria-label="Toggle navigation">
					<span class="navbar-toggler-icon"></span>
				</button>
			</div>
			<div class="right-options responsive850-hidden">
				<?php if(isLoggedIn()) { ?>
				<div class="option-item">
                                        <a class="option-link" href="/watchlist/"><img alt="favorite icon" src="/fav.svg?v=3" style="vertical-align: bottom; padding-bottom: 3px;"> Watchlist</a>
                                </div>
				<?php } ?>
                                <div class="option-item">
                                        <a class="option-link" href="/compare/">Compare</a>
                                </div>

				<div class="option-item">
					<a class="option-link" href="/flipennings/">Flippenings</a>
				</div>
<!--
				<div class="option-item">
					<div class="dropdown-container">
						<div class="dropdown">
							<span><img alt="USA icon" class="option-icon" src="img/usa.png"><span class="option-name"> ENG</span><span class="arrow-down"></span></span>
							<div class="clear-both">
							</div>
						</div>
						<div class="dropdown-menu hidden">
								<a href="/de/"><div><span><img alt="Germany icon" class="option-icon" src="img/germany.png"><span class="option-name"> Deutsch</span></span></div></a>
								<a href="/fr/"><div><span><img alt="France icon" class="option-icon" src="img/france.png"><span class="option-name"> Français</span></span></div></a>
								<a href="/jp/"><div><span><img alt="Japan icon" class="option-icon" src="img/japan.png"><span class="option-name"> 日本語</span></span></div></a>
								<a href="/zh/"><div><span><img alt="China icon" class="option-icon" src="img/china.png"><span class="option-name"> 简体中文</span></span></div></a>
								<a href="/zh-tw/"><div><span><img alt="Taiwan icon" class="option-icon" src="img/taiwan.png"><span class="option-name"> 繁體中文</span></span></div></a>

								<a href="/kp/"><div><span><img alt="Korea icon" class="option-icon" src="img/south-korea.png"><span class="option-name"> 한국어</span></span></div></a>
						</div>
					</div>
				</div>
-->
				<div class="option-item">
					<div class="dropdown-container">
						<div class="dropdown">
							<span><img alt="currency icon" class="option-icon" src="/img/<?php echo $currencyName; ?>.png"><span class="option-name"> <?php echo $currency; ?></span><span class="arrow-down"></span></span>
							<div class="clear-both">
							</div>
							</div>
							<div class="dropdown-menu hidden">
<?php
if($currency != 'USD') {
?>
								<a href="/usd/" onclick="document.cookie = 'currency=USD;  max-age=91536000000; path=/;';"><div><span><img class="option-icon" src="/img/dollar.png" alt="Dollar"><span class="option-name"> Dollar</span></span></div></a>
<?php
}
if($currency != 'EUR') {
?>
								<a href="/euro/" onclick="document.cookie = 'currency=EUR;  max-age=91536000000; path=/;';"><div><span><img class="option-icon" src="/img/euro.png" alt="Euro"><span class="option-name"> Euro</span></span></div></a>
<?php
}
if($currency != 'BTC') {
?>
								<a href="/btc/" onclick="document.cookie = 'currency=BTC;  max-age=91536000000; path=/;';"><div><span><img class="option-icon" src="/img/btc.png" alt="Bitcoin"><span class="option-name"> Bitcoin</span></span></div></a>
<?php
}
if($currency != 'ETH') {
?>
								<a href="/eth/" onclick="document.cookie = 'currency=ETH;  max-age=91536000000; path=/;';"><div><span><img class="option-icon" src="/img/eth.png" alt="Ethereum"><span class="option-name"> Ethereum</span></span></div></a>
<?php
}
if($currency != 'GOLD') {
?>
								<a href="/gold/" onclick="document.cookie = 'currency=GOLD;  max-age=91536000000; path=/;';"><div><span><img class="option-icon" src="/img/gold.png" alt="Gold"><span class="option-name"> Gold</span></span></div></a>
<?php
}
if($currency != 'SILVER') {
?>
								<a href="/silver/" onclick="document.cookie = 'currency=SILVER;  max-age=91536000000; path=/;';"><div><span><img class="option-icon" src="/img/silver.png" alt="Silver"><span class="option-name"> Silver</span></span></div></a>
<?php
}
?>
							</div>
					</div>
				</div>

				<?php if(isLoggedIn()) { ?>
				<div class="option-item">
                                        <a class="option-link sign-in" href="/account/"><img alt="account icon" class="dark-hidden" src="/img/account.svg?v=1"><img alt="account icon" class="dark-shown" src="/img/account-dark.svg?v=1"> <span class="">Account</span></a>
				</div>
				<?php } else { ?>
				<div class="option-item">
                                        <a id="sign-in-button" class="option-link sign-in" href="#">
                                        	<img alt="account icon" class="dark-hidden" src="/img/account.svg?v=1"><img alt="account icon" class="dark-shown" src="/img/account-dark.svg?v=1"> Sign in
                                        </a>
				</div>
				<?php } ?>

				<div class="option-item night-button">
				<a href="#" class="option-link dark-hidden" onclick="lightOff()"  title="change to dark mode">
					<span>Dark mode &nbsp;</span>
					<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 70 1000 1000" width="18" height="18">
					<path fill="#444" stroke="#444" d="M525.3,989.5C241.2,989.5,10,758.3,10,474.1c0-196.8,109.6-373.6,285.9-461.4c7.9-3.9,17.5-2.4,23.7,3.8c6.2,6.2,7.9,15.8,4,23.7c-32.2,65.4-48.5,135.7-48.5,208.9c0,261.4,212.7,474.1,474.1,474.1c74,0,145-16.7,211-49.5c7.9-3.9,17.5-2.4,23.7,3.8c6.3,6.3,7.9,15.8,3.9,23.7C900.5,879,723.3,989.5,525.3,989.5z"></path>
					</svg>
				</a>
				<a href="#" class="option-link dark-shown" onclick="lightOn()" title="change to light mode">
					<span>Light mode &nbsp;</span>
					<svg xmlns="http://www.w3.org/2000/svg" viewBox="10 10 220 220" width="18" height="18">
						<path fill="#fff" d="M120,189.697c-38.492,0-69.696-31.205-69.696-69.697S81.508,50.303,120,50.303c38.494,0,69.699,31.205,69.699,69.697 S158.494,189.697,120,189.697z M203.975,140L240,120l-36.025-20V140z M36.025,100L0,120l36.025,20V100z M120,240l20-36.025h-40 L120,240z M120,0l-20,36.025h40L120,0z M46.481,165.238l-11.333,39.615l39.616-11.33L46.481,165.238z M165.238,46.477l28.283,28.285 l11.332-39.613L165.238,46.477z M35.148,35.148L46.48,74.762l28.283-28.285L35.148,35.148z M165.238,193.523l39.615,11.33 l-11.332-39.615L165.238,193.523z"></path>
					</svg>
				</a>
				</div>
			</div>

			<div class="asset-menu responsive850-hidden">
				<div class="item all<?php if($type == '' && $page == 'default') { echo ' active'; } ?>">
					<a href="/">All Assets <span class="badge badge-asset"><?php echo $stats['all'] ?></span></a>
				</div>
				<div class="item companies<?php if($type=='COMPANY') { echo ' active'; } ?>">
					<a href="/companies/">Companies <span class="badge badge-company"><?php echo $stats['companies'] ?></span></a>
				</div>
				<div class="item etfs<?php if($type=='ETF') { echo ' active'; } ?>">
					<a href="/etfs/">ETFs <span class="badge badge-etf"><?php echo $stats['etfs'] ?></span></a>
				</div>
				<div class="item cryptos<?php if($type=='CRYPTOCURRENCY') { echo ' active'; } ?>">
					<a href="/cryptos/">Cryptos <span class="badge badge-crypto"><?php echo $stats['cryptos'] ?></span></a>
				</div>
				<div class="item metals<?php if($type=='METAL') { echo ' active'; } ?>">
					<a href="/metals/">Metals <span class="badge badge-metal"><?php echo $stats['metals'] ?></span></a>
				</div>
			</div>
		</div>


		<?php echo $pageContent; ?>
	<div class="footer">
		<div class="container">
			<p>
			Cryptocurrency price and Market Cap data according to <a href="https://coinmarketcap.com/">CoinMarketCap</a> and <a href="https://coingecko.com/">CoinGecko</a>.<br/>
			ETF data according to <strong>IEX cloud</strong>.<br/>
			Company logos provided by the <a href="https://companieslogo.com/logo-api/">CompaniesLogo.com API</a>.<br/>
			Disclaimer: The price and market cap data are delayed. The delay can range from some minutes to several hours.<br/>
			</p>
			<div class="row">
				<div class="col-sm2">
					<h4>What is the market capitalization of an asset?</h4>
					<p>The Market Cap of an asset is an estimate of its total value according to its current market price.
					Depending on the asset type it is calculated in different ways:</p>
					<ul>
						<li>For precious metals the Market Cap is calculated by multiplying the its price with an estimation of the quantity of metal that has been mined so far. These estimations are updated annualy</li>
						<li>For stocks it is calculated by multiplying the amount of outstanding shares with the current share price</li>
						<li>The Market Cap of cryptocurrencies is calculated by mutipliying the circulating supply with the coin's price</li>
					</ul>
				</div>
				<div class="col-sm2">
					<h4>About</h4>
					<p>Infinite Market Cap (8MarketCap) ranks the world's top assets by Market Cap, including precious metals such as Gold an Silver, public companies such as Apple and Tesla, ETFs (Exchange Traded Funds) such as QQQ and the Vanguard S&P 500 ETF, and Cryptocurrencies such as Bitcoin and Ethereum.</p>
					<p>We also run <a href="https://companiesmarketcap.com">Companies Market Cap</a>, a website that ranks companies by Market Cap, Earnings and Revenue and <a href="https://apewisdom.io">Ape Wisdom</a> a website that tracks the trending stock and cryptocurrency mentions on reddit and WallStreetBets</p>
					<p>For inquiries: hel<span class="hidden">(nospam)</span>lo@8market<span class="hidden">(nospam)</span>cap.com</p>
					<p><a href="/privacy/">Privacy policy</a></p>
				</div>
			</div>
		</div>
	</div>

	<div class="popup-overlay login-popup-overlay hidden"></div>
	<div class="popup-container hidden">
		<div class="popup login-popup">
		<div style="position:absolute; right: 20px;">
			<a href="#" class="close-popup"><span class="popup-close-icon"></span></a>
		</div>
		<div class="popup-title">Sign In</div>
		<div class="popup-body popup-greatings">
			<div id="login-error" class="login-error alert error-alert hidden"></div>
			<div style="margin-top: 15px; margin-bottom: 20px;">No account? &nbsp; <a href="/sign-up/"><span class="grey-button">Sign Up →</span></a></div>
			<div class="label"><label for="email">E-Mail</label></div>
			<div><input class="form-input" onkeydown="if (event.keyCode == 13) {login();}" placeholder="Your E-Mail Address" type="email" name="email" id="login-email"></div>
			<div class="label"><label for="password">Password</label></div>
			<div><input class="form-input" onkeydown="if (event.keyCode == 13) {login();}" type="password" name="password" id="login-password" placeholder="*********"></div>
			<div><a href="/account/forgot-password/">Forgot your Passwort?</a></div>
			<div class="popup-buttons">
					<button class="button-primary" onclick="login()">Log in</button>
			</div>

			<div class="separator">
				<div class="separator-text">OR</div>
			</div>
			<div class="popup-buttons">
				<a href="/google-login.php">
					<button class="button-secondary"><img src="/google-icon.svg"> Continue with Google</button>
				</a>
			</div>

		</div>
	</div>
	</div>

<?php if($requiresCookieConsent) { ?>
<div id="cookie-consent-container"></div>
<!-- <script src="/cookie-consent.js?v=9"></script> -->
<?php } ?>

	<?php if(isLoggedIn()) { ?>
	<script>window.csrfToken = '<?php echo $GLOBALS['user_data']['csrf_token']; ?>';</script>
	<?php } ?>
	<script src="/script.js?v=124"></script>
<?php
if($page = 'default' && isset($_GET['search'])) {
?>
<script>
	searchInputChanged(null);
</script>
<?php
}
?>
</body>
<script src="/clever_ads.js"></script>
<script>
ubRecovered = false;
function recoveUB() {
	if(!ubRecovered) {
			ubRecovered = true;
			document.querySelectorAll('.recoverub-container').forEach(recoverContainer => {
					recoverContainer.classList.remove("hidden");

					//const isMobile = /iPhone|iPad|iPod|Android/i.test(navigator.userAgent);
					//if (isMobile && countryTier == 1) {
					//	recoverContainer.innerHTML = '<br/>Sponsored: <a rel="sponsored nofollow" class="text-underline" href="/goto.php?goto=delta-app-banner1">Track your portfolio using the Delta App</a><br/><br/>';
					//} else {
					//		recoverContainer.innerHTML = '<br/>Ad<span class="responsive-hidden">vertisement</span>: <a rel="sponsored nofollow" class="text-underline" href="/goto.php?goto=eodhd2">Get <strong>API access</strong> to over 150,000 stocks and ETFs</a><br/><br/>';
					//}
					<?php
                        if(isset($GLOBALS['advertisement_recovery_content_mi'])
                                //&& isset($_SERVER['HTTP_CF_IPCOUNTRY'])
                                //&& in_array($_SERVER['HTTP_CF_IPCOUNTRY'], ['US', 'CA'])
                        ) {
                                // Use json_encode for safe embedding and return to skip iteration

                                echo '  recoverContainer.innerHTML = ' . json_encode($GLOBALS['advertisement_recovery_content_mi']) . ';' . PHP_EOL;
                                echo '  return;' . PHP_EOL; // Use return to skip the current forEach iteration
                        }
					?>
					recoverContainer.innerHTML = '<br/>Ad<span class="responsive-hidden">vertisement</span>: <a rel="sponsored nofollow" class="text-underline" href="https://coinwebsocket.com/"><strong>CoinWebSocket</strong> – Real-time Bitcoin price spread comparison tool</a><br/><br/>';
					//recoverContainer.innerHTML = '<br/>Ad<span class="responsive-hidden">vertisement</span>: <a rel="sponsored nofollow" class="text-underline" href="https://companieslogo.com/logo-api/">Get <strong>API access</strong> to the logos &amp; icons of over 10,000 Stocks and ETFs</a><br/><br/>';
			});
	}
}

<?php
if(isset($GLOBALS['advertisement_recovery_content_mi'])
        //&& isset($_SERVER['HTTP_CF_IPCOUNTRY'])
        //&& in_array($_SERVER['HTTP_CF_IPCOUNTRY'], ['US', 'CA'])
) {
        echo $GLOBALS['advertisement_recovery_content_mi_script']. PHP_EOL;
}
?>

var ub0802dwds = 1;
if(document.getElementById('Sssa9sanbOsnbq723')){
        ub0802dwds = 0;
} else {
        recoveUB();
}

(function detectUB(callback) {
  var flaggedURL = 'https://static.getclicky.com/js';

        var request = new Request(flaggedURL, {
        method: 'GET',
        mode: 'no-cors',
        });
        fetch(request)
        .then(function(response) {
        if (response.status === 200 ) {
                callback(false);
        }
        })
        .catch(function(error) {
                callback(true);
        });
        })(function(usingAdblock) {
                if(usingAdblock) {
                        ub0802dwds = 2;
                        recoveUB();
                        console.log('using adblock');
                }
        })

	function ae6dd7anadbac(siteID) {
		var uuid = '';
		try {
			if(localStorage.getItem("UUID-ae6dd7anadbac") == undefined) {
				localStorage.setItem("UUID-ae6dd7anadbac", window.crypto.randomUUID());
			}

			uuid = localStorage.getItem("UUID-ae6dd7anadbac");
		} catch(error) {}

		var timeOffset = '';
		try {
			timeOffset = new Date().getTimezoneOffset()
		} catch(error) {}

		var userLang = ''; 
		try {
			userLang = navigator.language || navigator.userLanguage; 
		} catch(error) {}

		var payload = {
			"siteID" : siteID,
			"uuid" : uuid,
			"referrer" : document.referrer,
			"url" : window.location.href,
			"screen_height": window.screen.height,
			"screen_width": window.screen.width,
			"timeOffset": timeOffset,
			"userLang": userLang,
			"blocker" : ub0802dwds
		};

		fetch("https://apewisdom.io/c/", {
			method: "POST",
			body: JSON.stringify(payload),
			headers: {
				"Content-type": "application/json; charset=UTF-8"
			}
		});
	}

	setTimeout("ae6dd7anadbac('8MC')", 625);

</script>
</html>
