<!DOCTYPE html>
<html>
<head>
<title>A Crazy Panda Social Application</title>
<script type="text/javascript">(function () {
window.__perf__started = (new Date()).getTime();
window.__perf__getMsFromIFrame = function() {
return (new Date()).getTime() - window.__perf__started;
}
})();
</script>
<script type="text/javascript" src="//wpc-any.static.crazypanda.games/m/js/flash_gateway-ver3.js" ></script><!-- auto by JSS -->
<script type="text/javascript" src="//wpc-any.static.crazypanda.games/m/js/jquery-1.8.2.min-ver3.js" ></script><!-- auto by JSS -->
<script type="text/javascript" src="//wpc-any.static.crazypanda.games/m/js/meia-ver3.js" ></script><!-- auto by JSS -->
<script type="text/javascript" src="//wpc-any.static.crazypanda.games/m/js/unisocial/unisocial-ver22.js" ></script><!-- auto by JSS -->
<link rel="stylesheet" type="text/css" href="//wpc-any.static.crazypanda.games/m/css/social/social-ver4.css" /><!-- auto by JSS -->
<script type="text/javascript" src="//wpc-any.static.crazypanda.games/m/js/social-ver8.js" ></script><!-- auto by JSS -->
<script type="text/javascript" src="//wpc-any.static.crazypanda.games/m/js/swfobject-ver3.js" ></script><!-- auto by JSS -->
<link rel="stylesheet" type="text/css" href="//wpc-any.static.crazypanda.games/s/css/generic-ver1.css" /><!-- auto by JSS -->
<link rel="stylesheet" type="text/css" href="//wpc-any.static.crazypanda.games/s/css/skin.dark-ver1.css" /><!-- auto by JSS -->
<link rel="stylesheet" type="text/css" href="//wpc-any.static.crazypanda.games/s/css/sns/Facebook-ver1.css" /><!-- auto by JSS -->
<script type="text/javascript" src="//wpc-any.static.crazypanda.games/s/js/ironsrc-ver1.js" ></script><!-- auto by JSS -->
<link rel="stylesheet" type="text/css" href="//wpc-any.static.crazypanda.games/s/client/webgl/default/TemplateData/main-ver3.css" /><!-- auto by JSS -->
<link rel="stylesheet" type="text/css" href="//wpc-any.static.crazypanda.games/m/css/click2play-ver3.css" /><!-- auto by JSS -->
<link rel="stylesheet" type="text/css" href="//wpc-any.static.crazypanda.games/m/css/click2playWebGL-ver3.css" /><!-- auto by JSS -->
<script type="text/javascript" src="//wpc-any.static.crazypanda.games/m/js/cpa-ver1.js" ></script><!-- auto by JSS -->
<script type="text/javascript" src="//wpc-any.static.crazypanda.games/m/js/cpa2-ver2.js" ></script><!-- auto by JSS -->
<script type="text/javascript">;(function () { social.configure({
dev : 0,
panda_domain: 'crazypanda.games',
appAutoInsert:1,
app : {
webgl : true,
loader : '',
baseurl : '/s/client/webgl',
containerID : 'flash-app',
size : [ 760, 730 ],
staticurl : 'wpc-any.static.crazypanda.games/sb',
statichost : 'wpc-any.static.crazypanda.games',
data : {"wxserver":1,"version":["20.7.0","20.7.0"],"instname":"ANY@production","instfilter":"ANY","dev":"","provider":"PandaGuest","now":1694197886,"stat":{"user_currency_map":{"currency_soft":"chips","currency_hard":"coins"},"extra":{"main_provider/dict":"PandaGuest","heat_league/dict":"j1","mode_avatar_3d/ui8":0,"authority_class/td16":"silver","ads_group/td16":null,"my_avatar_3d/ui8":0,"did/s":null,"heat_program_flag/ui8":0,"advertising_id/s":null,"gameroom/ui8":0,"idfa/s":null,"version/dict":null,"webgl_client/ui8":1,"provider/dict":"PandaGuest","adjust_id/s":null,"on_fire_disabled/b":0,"wow_points/ui64":0,"adjust_campaign/pd32":null,"appsflyer_campaign/pd32":"unknown","cash_paid/m":"0.00"},"host":"stat.crazypanda.games"},"apploader":{"adv":{"ident":"mobile","data":{"keys":{"text":"Все полученные фишки и достижения сохраняются и в мобильной версии. А сразу после установки вы получите бонус!"},"target":{"Android":"https://play.google.com/store/apps/details?id=air.ru.crazypanda.wpcm","Huawei":"https://appgallery.huawei.com/#/app/C102478121","IOS":"https://itunes.apple.com/FR/app/world-poker-club-mobile/id765350277"}}}},"us_baseurl":"https://unisocial.crazypanda.games","statictype":"sb","l10n":{"default_locale":"en_US","locale":"ru_RU","native_locale":"ru_RU"},"static_host":"wpc-any.static.crazypanda.games","request_ip":"51.159.107.182","host":"wpc-any.crazypanda.games","disable_dev_random":0,"poker":{"ab_flash_slowload":0,"flash":{"connection":{"port":[843,19000,443,80],"host":"f7.wpc-any.crazypanda.ru"}},"services":{"Offers":{"id":"Offers.48"},"OnlineState":{"id":"OnlineState.5"},"Master":{"id":"Master.1"}},"helpshift_url":"https://crazypanda.helpshift.com/a/world-poker-club-1421922142/?p=web","fallback":{"landing":"https://wpcgame.com//desktop","descr":"Нажмите для установки игры для Windows или своего мобильного устройства.","header":"Медленная загрузка?"},"is_gameroom":0,"enabled_promo_events":{"offer_cup_coffee":1,"nrounds_japanesepond":1,"offer_cup_bubbletea":1,"offer_tune_35":1,"offer_tune_34":1},"connection":{"port":[843,19000,443,80],"host":"f7.wpc-any.crazypanda.ru"},"supports":{"helpshift":0},"unity":{"connection":{"port":[443],"host":"eros","dest":["wss://wpc-any.crazypanda.ru/websocket/f1"],"uri":"wss://wpc-any.crazypanda.ru/websocket/f1"},"no_cash_banner":{"title":"Уважаемый игрок!","text":"В World Poker Club нет вывода денежных средств."}},"advice":"Заходите в игру каждый день, чтобы получать самые большие ежедневные бонусы.","standalone":{"host":"wpcgame.com"},"ab":{},"mobile_config_url":"/s/client/mobile/config.json","client_relpath":"/client/webgl/default","prior_pay_service":20},"flogs":{"client_host":"flogs2.crazypanda.games"},"xclient":{"main_app":"Master"},"secure":1,"social":{"canvas":{"__merged":1,"tabs":{"faq":{"locales":{}},"news":{"limit":3},"tab_size":[1000,730],"earn_currency":1,"support":{}},"client_loader":"/s/client/web/app/sys/apploader.swf","webgl":{"loader":"/s/client/webgl/index.static.html","baseurl":"/s/client/webgl"},"size":[760,730],"flash_wmodes":["window","opaque"]},"provider_params":{"xparams":"8o5U6XVO7hGKR3D6QehbaQ16244752165777965056","locale":"ru_RU","gdpr":"1"},"sns_info":{"oauth_token":null},"user":{"gen":1694197886,"attrs":0,"sex":0,"panda_flags":"703687443486176","id":138442173,"matches_mobile":0,"gms":1694197886150,"active_provider":20,"country":"FR","photo":"https://wpc-any.crazypanda.ru/i/default_avatar/14/photo_big.jpg","next_exp":10,"profile_avatar":0,"provider":20,"gifts":[],"rank":1,"name":"Green Jaguar","ext_id":"9555442","main_provider":20,"inst":"WW","cur_exp":0,"level":1,"experience":0,"regdate":1694197882,"chips":10000},"refdata":{"d":{}},"auth":{"payment_services":[{"id":20,"pay_provider":10,"products":{},"default_currency":"USD","name":"WPC: Xsolla Facebook","currencies":["RUB","USD"]}],"request_auth":"MTM4NDQyMTczfjE0MDA4MzYwNH45NTU1NDQyfjIwfnRLMU82M1ZPN2hHT2VTT2R3MlpzUlExNzYwOTkxMDE4NTI3NDU3MjgwMH4yfjF-fn5-ZWZmZWQ0NmQ3NGRjYTc0MzBmNTM2MDRhNDk0ZTEzMTE","client_ip":"51.159.107.182","user":{"photo":"https://wpc-any.crazypanda.ru/i/default_avatar/14/photo_big.jpg","provider":20,"persistent_id":"140083604","email":null,"favourite_time":42,"locale":"ru_RU","ext_id":"9555442","id":"138442173","birthday":null,"name":"Green Jaguar","merged_users":[]},"sid":"tK1O63VO7hGOeSOdw2ZsRQ17609910185274572800","platform":"2","us_version":"1.0.0","instance":{"id":26,"host":"wpc-any.crazypanda.ru","iframe_url":"","ident":"poker_any"},"distr":1,"gdpr_required":1,"project_extra":{"panda_related":{"gdpr_accepted":"1"}},"locale":"ru_RU","project":{"id":2,"name":"Poker","ident":"Poker"},"application":{"ext_id":"us-pandaguest","provider":{"data":{"lastname":"Jaguar","firstname":"Green","uid":9555442,"photo":"https://wpc-any.crazypanda.ru/i/default_avatar/14/photo_big.jpg"},"features":{"local_currency":"USD"},"id":20},"id":61},"panda_token":"rKFO63VO7hGzH3AApWZsRQ10464782440771092480"},"payment":{"ident":"pandaguest_extcanvas","products":{"offer":{"item_title":["client","currency.offer.variant.title"],"image":"/i/common/offer.png","currency_step":1,"title":["client","currency.offer.name"],"id":"offer","base_price":1.0,"dialog_title":["client","currency.offer.window.title"],"descr":["client","currency.offer.buy"],"discount":1},"coins":{"title":["client","currency.gold.name"],"image":"/i/common/gold_big.png","currency_step":1,"item_title":["client","currency.coins.variant.title"],"default":1,"descr":["client","currency.gold.buy"],"id":"coins","discount":1,"dialog_title":["client","currency.coins.window.title"],"base_price":0.0166666666666667},"subscr":{"item_title":["client","currency.offer.variant.title"],"currency_step":1,"image":"/i/common/offer.png","id":"subscr","title":["client","currency.offer.name"],"base_price":1.0,"dialog_title":["client","currency.offer.window.title"],"discount":1,"descr":["client","currency.offer.buy"]},"chips":{"item_title":["client","currency.chips.variant.title"],"currency_step":1,"image":"/i/common/chips_offer.png","title":["client","currency.chips.name"],"id":"chips","dialog_title":["client","currency.chips.window.title"],"base_price":1.66666666666667e-05,"discount":1,"descr":["client","currency.chips.buy"]}}},"referer_url":"https://wpc-any.crazypanda.games/social/canvas/61?platform=2&locale=ru_RU"}}
},
webgl:{
ctp_webgl_detect_disable :1
},
flash : {
bgColor : '#0e0e0e',
minVersion : '10.0',
data : {data: '{\"wxserver\":1,\"version\":[\"20.7.0\",\"20.7.0\"],\"instname\":\"ANY@production\",\"instfilter\":\"ANY\",\"dev\":\"\",\"provider\":\"PandaGuest\",\"now\":1694197886,\"stat\":{\"user_currency_map\":{\"currency_soft\":\"chips\",\"currency_hard\":\"coins\"},\"extra\":{\"main_provider/dict\":\"PandaGuest\",\"heat_league/dict\":\"j1\",\"mode_avatar_3d/ui8\":0,\"authority_class/td16\":\"silver\",\"ads_group/td16\":null,\"my_avatar_3d/ui8\":0,\"did/s\":null,\"heat_program_flag/ui8\":0,\"advertising_id/s\":null,\"gameroom/ui8\":0,\"idfa/s\":null,\"version/dict\":null,\"webgl_client/ui8\":1,\"provider/dict\":\"PandaGuest\",\"adjust_id/s\":null,\"on_fire_disabled/b\":0,\"wow_points/ui64\":0,\"adjust_campaign/pd32\":null,\"appsflyer_campaign/pd32\":\"unknown\",\"cash_paid/m\":\"0.00\"},\"host\":\"stat.crazypanda.games\"},\"apploader\":{\"adv\":{\"ident\":\"mobile\",\"data\":{\"keys\":{\"text\":\"Все полученные фишки и достижения сохраняются и в мобильной версии. А сразу после установки вы получите бонус!\"},\"target\":{\"Android\":\"https://play.google.com/store/apps/details?id=air.ru.crazypanda.wpcm\",\"Huawei\":\"https://appgallery.huawei.com/#/app/C102478121\",\"IOS\":\"https://itunes.apple.com/FR/app/world-poker-club-mobile/id765350277\"}}}},\"us_baseurl\":\"https://unisocial.crazypanda.games\",\"statictype\":\"sb\",\"l10n\":{\"default_locale\":\"en_US\",\"locale\":\"ru_RU\",\"native_locale\":\"ru_RU\"},\"static_host\":\"wpc-any.static.crazypanda.games\",\"request_ip\":\"51.159.107.182\",\"host\":\"wpc-any.crazypanda.games\",\"disable_dev_random\":0,\"poker\":{\"ab_flash_slowload\":0,\"flash\":{\"connection\":{\"port\":[843,19000,443,80],\"host\":\"f7.wpc-any.crazypanda.ru\"}},\"services\":{\"Offers\":{\"id\":\"Offers.48\"},\"OnlineState\":{\"id\":\"OnlineState.5\"},\"Master\":{\"id\":\"Master.1\"}},\"helpshift_url\":\"https://crazypanda.helpshift.com/a/world-poker-club-1421922142/?p=web\",\"fallback\":{\"landing\":\"https://wpcgame.com//desktop\",\"descr\":\"Нажмите для установки игры для Windows или своего мобильного устройства.\",\"header\":\"Медленная загрузка?\"},\"is_gameroom\":0,\"enabled_promo_events\":{\"offer_cup_coffee\":1,\"nrounds_japanesepond\":1,\"offer_cup_bubbletea\":1,\"offer_tune_35\":1,\"offer_tune_34\":1},\"connection\":{\"port\":[843,19000,443,80],\"host\":\"f7.wpc-any.crazypanda.ru\"},\"supports\":{\"helpshift\":0},\"unity\":{\"connection\":{\"port\":[443],\"host\":\"eros\",\"dest\":[\"wss://wpc-any.crazypanda.ru/websocket/f1\"],\"uri\":\"wss://wpc-any.crazypanda.ru/websocket/f1\"},\"no_cash_banner\":{\"title\":\"Уважаемый игрок!\",\"text\":\"В World Poker Club нет вывода денежных средств.\"}},\"advice\":\"Заходите в игру каждый день, чтобы получать самые большие ежедневные бонусы.\",\"standalone\":{\"host\":\"wpcgame.com\"},\"ab\":{},\"mobile_config_url\":\"/s/client/mobile/config.json\",\"client_relpath\":\"/client/webgl/default\",\"prior_pay_service\":20},\"flogs\":{\"client_host\":\"flogs2.crazypanda.games\"},\"xclient\":{\"main_app\":\"Master\"},\"secure\":1,\"social\":{\"canvas\":{\"__merged\":1,\"tabs\":{\"faq\":{\"locales\":{}},\"news\":{\"limit\":3},\"tab_size\":[1000,730],\"earn_currency\":1,\"support\":{}},\"client_loader\":\"/s/client/web/app/sys/apploader.swf\",\"webgl\":{\"loader\":\"/s/client/webgl/index.static.html\",\"baseurl\":\"/s/client/webgl\"},\"size\":[760,730],\"flash_wmodes\":[\"window\",\"opaque\"]},\"provider_params\":{\"xparams\":\"8o5U6XVO7hGKR3D6QehbaQ16244752165777965056\",\"locale\":\"ru_RU\",\"gdpr\":\"1\"},\"sns_info\":{\"oauth_token\":null},\"user\":{\"gen\":1694197886,\"attrs\":0,\"sex\":0,\"panda_flags\":\"703687443486176\",\"id\":138442173,\"matches_mobile\":0,\"gms\":1694197886150,\"active_provider\":20,\"country\":\"FR\",\"photo\":\"https://wpc-any.crazypanda.ru/i/default_avatar/14/photo_big.jpg\",\"next_exp\":10,\"profile_avatar\":0,\"provider\":20,\"gifts\":[],\"rank\":1,\"name\":\"Green Jaguar\",\"ext_id\":\"9555442\",\"main_provider\":20,\"inst\":\"WW\",\"cur_exp\":0,\"level\":1,\"experience\":0,\"regdate\":1694197882,\"chips\":10000},\"refdata\":{\"d\":{}},\"auth\":{\"payment_services\":[{\"id\":20,\"pay_provider\":10,\"products\":{},\"default_currency\":\"USD\",\"name\":\"WPC: Xsolla Facebook\",\"currencies\":[\"RUB\",\"USD\"]}],\"request_auth\":\"MTM4NDQyMTczfjE0MDA4MzYwNH45NTU1NDQyfjIwfnRLMU82M1ZPN2hHT2VTT2R3MlpzUlExNzYwOTkxMDE4NTI3NDU3MjgwMH4yfjF-fn5-ZWZmZWQ0NmQ3NGRjYTc0MzBmNTM2MDRhNDk0ZTEzMTE\",\"client_ip\":\"51.159.107.182\",\"user\":{\"photo\":\"https://wpc-any.crazypanda.ru/i/default_avatar/14/photo_big.jpg\",\"provider\":20,\"persistent_id\":\"140083604\",\"email\":null,\"favourite_time\":42,\"locale\":\"ru_RU\",\"ext_id\":\"9555442\",\"id\":\"138442173\",\"birthday\":null,\"name\":\"Green Jaguar\",\"merged_users\":[]},\"sid\":\"tK1O63VO7hGOeSOdw2ZsRQ17609910185274572800\",\"platform\":\"2\",\"us_version\":\"1.0.0\",\"instance\":{\"id\":26,\"host\":\"wpc-any.crazypanda.ru\",\"iframe_url\":\"\",\"ident\":\"poker_any\"},\"distr\":1,\"gdpr_required\":1,\"project_extra\":{\"panda_related\":{\"gdpr_accepted\":\"1\"}},\"locale\":\"ru_RU\",\"project\":{\"id\":2,\"name\":\"Poker\",\"ident\":\"Poker\"},\"application\":{\"ext_id\":\"us-pandaguest\",\"provider\":{\"data\":{\"lastname\":\"Jaguar\",\"firstname\":\"Green\",\"uid\":9555442,\"photo\":\"https://wpc-any.crazypanda.ru/i/default_avatar/14/photo_big.jpg\"},\"features\":{\"local_currency\":\"USD\"},\"id\":20},\"id\":61},\"panda_token\":\"rKFO63VO7hGzH3AApWZsRQ10464782440771092480\"},\"payment\":{\"ident\":\"pandaguest_extcanvas\",\"products\":{\"offer\":{\"item_title\":[\"client\",\"currency.offer.variant.title\"],\"image\":\"/i/common/offer.png\",\"currency_step\":1,\"title\":[\"client\",\"currency.offer.name\"],\"id\":\"offer\",\"base_price\":1.0,\"dialog_title\":[\"client\",\"currency.offer.window.title\"],\"descr\":[\"client\",\"currency.offer.buy\"],\"discount\":1},\"coins\":{\"title\":[\"client\",\"currency.gold.name\"],\"image\":\"/i/common/gold_big.png\",\"currency_step\":1,\"item_title\":[\"client\",\"currency.coins.variant.title\"],\"default\":1,\"descr\":[\"client\",\"currency.gold.buy\"],\"id\":\"coins\",\"discount\":1,\"dialog_title\":[\"client\",\"currency.coins.window.title\"],\"base_price\":0.0166666666666667},\"subscr\":{\"item_title\":[\"client\",\"currency.offer.variant.title\"],\"currency_step\":1,\"image\":\"/i/common/offer.png\",\"id\":\"subscr\",\"title\":[\"client\",\"currency.offer.name\"],\"base_price\":1.0,\"dialog_title\":[\"client\",\"currency.offer.window.title\"],\"discount\":1,\"descr\":[\"client\",\"currency.offer.buy\"]},\"chips\":{\"item_title\":[\"client\",\"currency.chips.variant.title\"],\"currency_step\":1,\"image\":\"/i/common/chips_offer.png\",\"title\":[\"client\",\"currency.chips.name\"],\"id\":\"chips\",\"dialog_title\":[\"client\",\"currency.chips.window.title\"],\"base_price\":1.66666666666667e-05,\"discount\":1,\"descr\":[\"client\",\"currency.chips.buy\"]}}},\"referer_url\":\"https://wpc-any.crazypanda.games/social/canvas/61?platform=2&locale=ru_RU\"}}'},
overlay : 0,
wmodes : ['window','opaque']
},
l10n : {
locale : 'ru_RU',
nativeLocale : 'ru_RU',
'index.loading' : "Загрузка приложения...",
'index.no_flash' : "Данное приложение использует высокоскоростные технологии, для поддержки которых требуется Flash Player версии не ниже 10.0",
'index.no_flash.link' : "Установить Flash Player с официального сайта"
},
sid : 'tK1O63VO7hGOeSOdw2ZsRQ17609910185274572800',
vsize : {},
stat: {
v: 2,
project: 'Poker',
site: 'PandaGuest',
uid: '9555442',
'uuid/s': '138442173',
'unisocial/ui8': 1,
'newbie/dict': 'elder',
partner: '',
'adjust_campaign/pd32': '',
'adjust_id/s': '',
'ads_group/td16': '',
'advertising_id/s': '',
'appsflyer_campaign/pd32': 'unknown',
'authority_class/td16': 'silver',
'cash_paid/m': '0.00',
'did/s': '',
'gameroom/ui8': '0',
'heat_league/dict': 'j1',
'heat_program_flag/ui8': '0',
'idfa/s': '',
'main_provider/dict': 'PandaGuest',
'mode_avatar_3d/ui8': '0',
'my_avatar_3d/ui8': '0',
'on_fire_disabled/b': '0',
'provider/dict': 'PandaGuest',
'version/dict': '',
'webgl_client/ui8': '1',
'wow_points/ui64': '0',
},
stat_params: {
send_ads: '0',
flogs_host: 'flogs2.crazypanda.games',
}
});
$('body').enableFeatures(['Button']);
$(document).ready(function(){
social.start('{\"payment_services\":[{\"id\":20,\"pay_provider\":10,\"products\":{},\"default_currency\":\"USD\",\"name\":\"WPC: Xsolla Facebook\",\"currencies\":[\"RUB\",\"USD\"]}],\"request_auth\":\"MTM4NDQyMTczfjE0MDA4MzYwNH45NTU1NDQyfjIwfnRLMU82M1ZPN2hHT2VTT2R3MlpzUlExNzYwOTkxMDE4NTI3NDU3MjgwMH4yfjF-fn5-ZWZmZWQ0NmQ3NGRjYTc0MzBmNTM2MDRhNDk0ZTEzMTE\",\"client_ip\":\"51.159.107.182\",\"user\":{\"photo\":\"https://wpc-any.crazypanda.ru/i/default_avatar/14/photo_big.jpg\",\"provider\":20,\"persistent_id\":\"140083604\",\"email\":null,\"favourite_time\":42,\"locale\":\"ru_RU\",\"ext_id\":\"9555442\",\"id\":\"138442173\",\"birthday\":null,\"name\":\"Green Jaguar\",\"merged_users\":[]},\"sid\":\"tK1O63VO7hGOeSOdw2ZsRQ17609910185274572800\",\"platform\":\"2\",\"us_version\":\"1.0.0\",\"instance\":{\"id\":26,\"host\":\"wpc-any.crazypanda.ru\",\"iframe_url\":\"\",\"ident\":\"poker_any\"},\"distr\":1,\"gdpr_required\":1,\"project_extra\":{\"panda_related\":{\"gdpr_accepted\":\"1\"}},\"locale\":\"ru_RU\",\"project\":{\"id\":2,\"name\":\"Poker\",\"ident\":\"Poker\"},\"application\":{\"ext_id\":\"us-pandaguest\",\"provider\":{\"data\":{\"lastname\":\"Jaguar\",\"firstname\":\"Green\",\"uid\":9555442,\"photo\":\"https://wpc-any.crazypanda.ru/i/default_avatar/14/photo_big.jpg\"},\"features\":{\"local_currency\":\"USD\"},\"id\":20},\"id\":61},\"panda_token\":\"rKFO63VO7hGzH3AApWZsRQ10464782440771092480\"}');
});
})();
</script>
</head>
<body class="PandaGuest Poker" style="overflow: hidden; ">
<style type="text/css">
body { overflow: hidden; }
.fixedTabWidth { width: 1000px; overflow-x: hidden; }
.fixedTabHeight { height: 730px; overflow-y: hidden; }
.fixedAppWidth { width: 760px; overflow-x: hidden; }
.fixedAppHeight { height: 730px; overflow-y: hidden; }
</style>
<div id="rootContainer">
<div id="mainContainer" class="fixed">
<div id="overlay" style="position: absolute; display: none; width: 100%"></div>
<div id="tabMenu" class="fixedAppWidth">
<ul class="leftMenu">
<li class="gameButton button active" name="game"><a href="#">Игра</a></li>
<li class="supportButton button" name="support"><a href="/social/support/">Поддержка</a></li>
<li class="newsButton button" name="news"><a href="/social/news/">Новости</a></li>
</ul>
<div class="rightMenu">
<ul>
</ul>
</div>
</div>
<div id="appContainer" class="fixedAppHeight">
<script>
var $webgl_mode = 1;
var $user_webgl_enabled = 1;
var $user_webgl_unsupported = 0;
var $counter = 0;
var $timer, $unsupported;
$timer = setInterval(function () {
if (typeof social == "undefined" || typeof PlatformDescriber == "undefined") { $counter++; if ($counter >= 40) clearInterval($timer); return;}
//TODO: delete when test will be done
function setUnsupported ($unsupported) {
if ($unsupported != $user_webgl_unsupported) social.getJSON('/user/set_unity_unsupported', { "val": $unsupported });
return $unsupported;
}
if ($user_webgl_enabled) {
if (PlatformDescriber.getInfo().webGLInfo.majorPerformanceCaveat == 'no' && PlatformDescriber.getInfo().webGLInfo.supported) {
$unsupported = setUnsupported(0);
}
else if (PlatformDescriber.getInfo().webGLInfo.majorPerformanceCaveat != 'no' ) {
setUnsupported(1);
$unsupported = 0;
}
else {
$unsupported = 1;
}
if ($unsupported && $webgl_mode) social.showCTPWebGL();
}
clearInterval($timer);
}, 500);
</script>
<div class="appRoot">
<script>function onClientCall ($evname) { social.trigger($evname) }</script>
<script>function updateToUnity ($uid, $social, $aux) { window.parent.postMessage({ type: 'send_to_desktop', message: { action: 'update_to_unity', value: { host: 'https://electron-pokeru.crazypanda.games', uid: $uid, social: $social, aux: $aux } } }, '*'); social.send_stat({type: 'flash_to_unity_upd_js'}); }</script>
<script async src="https://www.googletagmanager.com/gtag/js?id='AW-10798335023'"></script>
<script>
$("#appContainer").removeClass('fixedAppHeight');
$("#tabMenu").addClass('fixedAppWidth');
var sendFlogsOnce = false;
$("#tabMenu .supportButton a").click( function () {
if (!sendFlogsOnce && document.getElementById("canvascontainer").style.visibility != "visible") {
social.flogs("support click on preloader","");
sendFlogsOnce = true;
console.log("support click on preloader flogs sended");
}
});
</script>
<center><div class="fixedAppHeight" style="padding:0px;margin:0px;"><div id="flash-app">
<head>
<!-- Global site tag (gtag.js) - Google Ads: CONVERSION_ID -->
<script async src="https://www.googletagmanager.com/gtag/js?id='AW-10798335023'"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config','AW-10798335023');
</script>
</head>
<style>
html,body,div,canvas { margin: 0; padding: 0; }
::-moz-selection { color: #333; text-shadow: none; }
::selection { color: #333; text-shadow: none; }
.clear:after { visibility: hidden; display: block; font-size: 0; content: " "; clear: both; height: 0; }
.clear { display: inline-table; clear: both; }
.webgl-container { position:relative; width:100%;height:100%; padding: 0; margin: 0; }
/* Hides from IE-mac \*/ * html .clear { height: 1%; } .clear { display: block; } /* End hide from IE-mac */
html, body { width: 100%; height: 100%; }
p#loadingArea { position: absolute; text-align: center; top: /*500px;*/ width: 100%; color: white;}
.template-wrap { position: relative; width: 760px; margin: auto;}
.template-wrap div.background { margin: 0 0 10px 0; position: relative; z-index: 9; box-shadow: 0 10px 30px rgba(0,0,0,0.2); -moz-box-shadow: 0 10px 30px rgba(0,0,0,0.2);}
.fullscreen { float: right; position: relative; z-index: 10; }
canvas, div#canvascontainer { width: 100%; height: 100%; user-select: none; }
div#canvascontainer:focus { outline: none; }
body.template { }
.template .template-wrap { }
.template .template-wrap canvas { }
</style>
<div class="webgl-container background" id="webgl_container" >
<div class="memErrorContainer" id="memErrorContainer">
</div>
<div class="blockWindowContainerBackground" id="blockWindowContainerBackground">
</div>
<div id="halloween_bg_left"><div id="halloween_bg_right">
<div id="preloader_ny">
<div class="template-wrap clear">
<div id="preloaderView" style="width: 760px; height: 730px">
<div class="wrapper" id="loadingArea">
<div class="preloader-container" id="preloader_container">
<div class="progress" id="progress_wrapper">
<div class="progress-container">
<div class="progress-digit" id="d0" style="margin-right: -4px; transform: translate(0, 26px);"></div>
<div class="progress-digit" id="d1" style="margin-left: 0px; transform: translate(0, 26px)"></div>
<div class="progress-digit" id="d2" style="margin-left: -5px"></div>
<div class="progress-percent" id="d3" style="margin-left: -4px"></div>
</div>
</div>
<div class="state" id="state">
<div class="state-text"></div>
<span id="state_text"></span><span class="ellipsis ellipsis-one">.</span><span class="ellipsis ellipsis-two">.</span><span class="ellipsis ellipsis-three">.</span>
</div>
<div class="overlay-container" id="overlay_container"></div>
</div>
<div class="hint" id="hint">
<div class="hint-text" id="hint-text"></div>
<div class="icon_Application" id="icon_Application">
<div class="button_IOS" id="button_IOS"></div>
<div class="button_Android" id="button_Android"></div>
<div class="button_Huawei" id="button_Huawei"></div>
</div>
<script type="text/javascript">
$( document ).ready(function(){
//check global ban
console.log("document ready function");
let hintTex = "";
let banned = false;
if ( typeof social !== "undefined" && social && social.config && social.config.app && social.config.app.data && social.config.app.data.poker && social.config.app.data.poker.global_ban_info)
{
banned = true;
console.log("check ban true");
var userId = social.config.app.data.social.auth.user.id;
var ban_locale = social.config.app.data.poker.global_ban_info.message;
$("#hint-text").append(ban_locale);
$("#hint-text a").css("color", "#EEDDFD");
$("#hint-text").css("left", "100px");
$(function() {
$("#hint-text a").on("click",function(e) {
e.preventDefault(); // cancel the link itself
$("#tabMenu .supportButton a").click();
});
});
$("#hint-text").after(function(){
return '<button id="button-ban" class="button-ban">Copy ID</button>';
});
$("#button-ban").click(function(){
CopyID(userId);
});
$("#progress_wrapper").hide();
$("#button_Android").hide();
$("#button_IOS").hide();
$("#button_Huawei").hide();
$("#icon_Application").hide();
}
else
{
if ( typeof social !== "undefined" && social && social.config && social.config.app && social.config.app.data && social.config.app.data.poker && social.config.app.data.poker.advice)
{
hintTex = social.config.app.data.poker.advice;
}
else
{
hintTex = "[TEST] Easy way to win to think! If there's no advice in FlashVars [TEST]";
}
// mobile links
if (typeof social !== "undefined" && social && social.config && social.config.app && social.config.app.data && social.config.app.data.apploader
&& social.config.app.data.apploader.adv && social.config.app.data.apploader.adv.data && social.config.app.data.apploader.adv.data.target
&& social.config.app.data.provider != "YandexGames"
&& social.config.app.data.provider != "Vkontakte")
{
if ( social.config.app.data.apploader.adv.data.keys && social.config.app.data.apploader.adv.data.keys.text )
{
hintTex = social.config.app.data.apploader.adv.data.keys.text;
}
$("#button_Android").click(function () {
window.open(social.config.app.data.apploader.adv.data.target.Android);
})
$("#button_IOS").click(function () {
window.open(social.config.app.data.apploader.adv.data.target.IOS);
})
$("#button_Huawei").click(function () {
window.open(social.config.app.data.apploader.adv.data.target.Huawei);
})
} else {
$("#button_Android").hide();
$("#button_IOS").hide();
$("#button_Huawei").hide();
$("#icon_Application").hide();
$("#hint-text").css("left", "100px");
}
$("#hint-text").append(hintTex);
}
//9th May Event
if ( typeof social !== "undefined" && social && social.config && social.config.app && social.config.app.data && social.config.app.data.poker && social.config.app.data.poker.enabled_promo_events && social.config.app.data.poker.enabled_promo_events.may9)
{
// $("#preloader_container").addClass("preloader_May9th");
// promoAction = true;
$("#preloader_container").addClass("preloader");
$("#overlay_container").addClass("overlay");
}
else
{
$("#preloader_container").addClass("preloader");
$("#overlay_container").addClass("overlay");
if ( typeof social !== "undefined" && social && social.config && social.config.app && social.config.app.data && social.config.app.data.poker && social.config.app.data.poker.enabled_promo_events && social.config.app.data.poker.enabled_promo_events.halloween)
{
$("#halloween_bg_left").addClass("preloader_Halloween_left");
$("#halloween_bg_right").addClass("preloader_Halloween_right");
}
else if ( typeof social !== "undefined" && social && social.config && social.config.app && social.config.app.data && social.config.app.data.poker && social.config.app.data.poker.enabled_promo_events && social.config.app.data.poker.enabled_promo_events.newyear)
{
$("#preloader_ny").addClass("preloader_NewYear");
nyAction = true;
}
}
});
</script>
</div>
<div class="banner" id="landingBanner" hidden>
<div class="lightning">
</div>
<div class="banner-bg">
<div class="banner-text">
<h3 id="bannerHeader">some header</h3>
<p id="bannerText">some text <b>some bolder text</b></p>
</div>
</div>
</div>
</div>
<canvas class="canvas_container" id="canvascontainer" style="visibility: hidden; outline: none" tabindex="1" >
</canvas>
</div>
</div>
</div>
</div></div>
</div>
<script>
var d = new Date();
var startTime = d.getTime();
var sessionId = generateGuid();
var loadingClientTime;
var showLoad = false;
var timerId = false;
//------------------------- LOADING STAT WORKER BEGIN -------------------------------------
var messageToGame = null;
var messageFromGame = null;
var loadingStatWorker = null;
var pingIntervalId = null;
var pageVisible = true;
var hiddenKey, visibilityChange;
var promoAction = false;
var nyAction = false;
var memErrorContainer = $("#memErrorContainer");
var blockContainer = $("#blockWindowContainerBackground");
var landingData = null;
var classHidden = "hidden";
var classShowed = "showed";
var clientPath = social.config.app.data.poker.client_relpath + "/";
var anyValue = 1000; // need for PokerFuncs
var wasmInstance;
function getCurrentDomain() {
var fullDomain = window.location.hostname;
var result = fullDomain.match(/[^\.]+\.[^\.]+$/)[0];
return result;
}
var currentDomain = getCurrentDomain();
function SendAnalyticsEvent(params)
{
var commonData = GetCommonAnalyticsEventParameters();
var requestData = $.extend({}, commonData, params);
$.ajax({
url: document.location.protocol + "//stat." + (social.config.dev ? "dev.crazypanda.ru" : currentDomain) + "/event"
, type: 'POST'
, accepts: {
img: 'image/gif'
}
, crossDomain: true
, data: JSON.stringify([requestData])
, dataType: 'img',
});
}
console.log("Session id: " + sessionId );
SendAnalyticsEvent( {
type: 'run.step.html_init'
} );
if (typeof document.hidden !== "undefined") { // Opera 12.10 and Firefox 18 and later support
hiddenKey = "hidden";
visibilityChange = "visibilitychange";
} else if (typeof document.msHidden !== "undefined") {
hiddenKey = "msHidden";
visibilityChange = "msvisibilitychange";
} else if (typeof document.webkitHidden !== "undefined") {
hiddenKey = "webkitHidden";
visibilityChange = "webkitvisibilitychange";
}
function ChangeBackgroundIfNeed()
{
if (promoAction)
{
$("#webgl_container").removeClass();
$("#webgl_container").addClass("background");
}
if(nyAction)
{
$("#preloader_ny").removeClass();
}
}
function handleVisibilityChange() {
pageVisible = !document[ hiddenKey ]
console.log("Page visibility: " + pageVisible);
}
// Warn if the browser doesn't support addEventListener or the Page Visibility API
if (typeof document.addEventListener === "undefined" || hiddenKey === undefined) {
console.log("Requires a browser, such as Google Chrome or Firefox, that supports the Page Visibility API.");
} else {
// Handle page visibility change
document.addEventListener(visibilityChange, handleVisibilityChange, false);
}
SendAnalyticsEvent( {
type: 'run.step.visibility_listener'
} );
function sendCommandToStatWorker( cmd, params ) {
if ( !loadingStatWorker )
return console.log( 'Cannot send command ' + cmd + ' to worker. Worker was not instantiated.' );
var msg = { cmd: cmd, visible: pageVisible };
params && ( msg.params = params );
loadingStatWorker.postMessage( msg );
}
function pingStatWorker() {
sendCommandToStatWorker( 'ping' );
}
//called from unity. See PokerFuncs.jslib :: DisablePreloaderShowGame
function stopStatWorker() {
sendCommandToStatWorker( 'stop' );
pingIntervalId != null && clearInterval( pingIntervalId );
}
function startStatWorker() {
sendCommandToStatWorker( 'start', {
lib_url:"/m/js/pandaStat.js",
panda_flags: social.config.app.data.social.user.panda_flags,
config: social.config.stat
});
}
function stopPinging() {
pingIntervalId != null && clearInterval( pingIntervalId );
pingIntervalId = null;
}
function terminateStatWorker() {
console.log( 'Terminating worker.');
stopPinging();
loadingStatWorker.terminate();
loadingStatWorker = null;
}
function CalculateAge( birthDayString )
{
var today = new Date();
var birthDate = new Date( birthDayString.substring(0, 3) + "-" + birthDayString.substring(4, 5) + "-" + birthDayString.substring(6, 7) ); //ггггммдд
var age = today.getFullYear() - birthDate.getFullYear();
var m = today.getMonth() - birthDate.getMonth();
if (m < 0 || (m === 0 && today.getDate() < birthDate.getDate()))
{
age--;
}
return age;
}
function GetCommonAnalyticsEventParameters()
{
var flashvars = social.config.app.data;
var userData = flashvars.social.user;
var authData = flashvars.social.auth;
var userAge = 0;
if ( userData.birthday ) //ггггммдд
{
userAge = CalculateAge( userData.birthday.toString() );
}
var pandaFlags = userData.panda_flags;
var visits = pandaFlags >>> 49;
var solvency = ( pandaFlags >>> 13 ) & 0b1111;
var now = new Date().getTime();
var timeDiff = Math.round((now - startTime) / 1000);
var result = {
"inst/pd16" : flashvars.instname,
"sex/ui8" : userData.sex,
"distr/pd16" : authData.distr,
"level/ui32" : userData.level,
"regdate/date" : userData.regdate,
"subenv/pd16" : "",
"provider/pd16" : flashvars.provider,
"solvency/ui8" : solvency,
"age/ui8" : userAge,
"visits/ui32" : visits,
'time_from_start/i32': timeDiff,
"session_id/s" : sessionId,
"reload_count/i8" : 0
};
$.extend( result, social.config.stat, social.statExtra );
return result;
}
function onMessageFromWorker( msg ) {
try {
console.log( 'Message from stat worker received: ' + JSON.stringify( msg ) );
if ( msg.success ) {
switch ( msg.cmd ) {
case 'start':
console.log( 'Start pinging worker.');
stopPinging();
pingIntervalId = setInterval( pingStatWorker, 250 );
break;
case 'stop':
// terminateStatWorker();
console.log( 'Worker was stopped but not terminated. Temporary solution.');
break;
}
} else {
terminateStatWorker();
}
} catch( error ) {
console.log( 'Error occured during worker message processing: ' + error );
}
}
function hideMemError()
{
document.getElementById("loadingArea").style.display = "block";
memErrorContainer.html("");
memErrorContainer.hide();
}
function showMemError( OSType, callbackFunction, memCrashEventData )
{
/*
OSType:
m - mobile
mw - mobile + windows
*/
console.log( "Try to show memory error window.");
var memErrorURL = "//wpc-any.static.crazypanda.games/pages/mem_error/ru_RU/"+OSType+"/"+social.config.app.data.provider;
$.post(memErrorURL, {}, function ($data, $status) {
memErrorContainer.html($data);
// reload
memErrorContainer.find('.button_start_webGl').click(
function () {
SendAnalyticsEvent
(
$.extend(memCrashEventData, {
'subtype/s' : "button_click",
'button_ident/s' : "reload_page"
})
);
callbackFunction();
}
);
// desctop
memErrorContainer.find('.btn_dwnl').click(
function () {
SendAnalyticsEvent
(
$.extend(memCrashEventData, {
'subtype/s' : "button_click",
'button_ident/s' : "download_desktop"
})
);
}
);
// appstore
memErrorContainer.find('.btn_store.app_store').click(
function () {
SendAnalyticsEvent
(
$.extend(memCrashEventData, {
'subtype/s' : "button_click",
'button_ident/s' : "open_appstore"
})
);
}
);
// googleplay
memErrorContainer.find('.btn_store.google_play').click(
function () {
SendAnalyticsEvent
(
$.extend(memCrashEventData, {
'subtype/s' : "button_click",
'button_ident/s' : "open_google_play"
})
);
}
);
// huawei
memErrorContainer.find('.btn_store.app_gallery').click(
function () {
SendAnalyticsEvent
(
$.extend(memCrashEventData, {
'subtype/s' : "button_click",
'button_ident/s' : "open_huawei_appgalery"
})
);
}
);
memErrorContainer.show();
document.getElementById("loadingArea").style.display = "none";
console.log( "Memory error window showed.");
})
}
try {
if( window && !!window.Worker && social && social.config && social.config.stat) {
var workerURL = "/s" + clientPath + "StreamingAssets/stat_worker.jsx";
console.log( 'Initializaing loading stat worker. Worker script url: ' + workerURL );
loadingStatWorker = new Worker( workerURL );
loadingStatWorker.onmessage = function( event ) {
event && onMessageFromWorker( event.data || {} )
};
startStatWorker();
}
} catch ( error ) {
console.log( 'Error occured during worker init: ' + error );
}
function ShowWindowNeedReload()
{
var needReloadURL = "//wpc-any.static.crazypanda.games/pages/harakiri/ru_RU/";
$.post(needReloadURL, {}, function ($data, $status) {
blockContainer.html($data);
// reload
blockContainer.find('.buttonBlockReload').click(
function ()
{
location.reload();
}
);
});
blockContainer.show();
}
//------------------------- LOADING STAT WORKER END -------------------------------------
//check global ban
var banned = false;
if (social && social.config && social.config.app && social.config.app.data && social.config.app.data.poker && social.config.app.data.poker.global_ban_info)
{
banned = true;
console.log('You were banned');
}
SendAnalyticsEvent( {
type: 'run.step.bann_checked'
} );
console.log( "--------------------------------- IFrame start processing at time (ms) = " + startTime );
function progressWrapper (gameInstance, progress) {
SendAnalyticsEvent({
type: 'run.step.createInstanceTick',
"progress/m" : progress
});
if (progress == 1)
{
SendAnalyticsEvent( {
type: 'run.step.unity_instance_created'
} );
if (timerId)
{
animationProgressStop();
}
}
else //if (progress >= 0.9)
{
if (!timerId)
{
timerId = true;
animationProgress();
}
}
// else
// {
// if (progress >= 0)
// {
// var v = Math.round(progress, 2) * 20;
// console.log("load percent = " + v + ", " + progress);
// progressChange(v);
// }
// }
if (progress == 1 && !showLoad)
{
var date = new Date();
var now = date.getTime();
console.log("--------------------------------- Downloading & UnityEngine.Init time = " + (now - startTime) + "ms");
showLoad = true;
}
function progressAnimateStart(){
$("#d1").addClass("digit-1");
$("#d2").addClass("digit-2");
document.getElementById("d2").addEventListener("animationend", listener_1, false);
}
function progressAnimateStop(){
$("#d1").removeClass("digit-1");
$("#d2").removeClass("digit-2");
document.getElementById("d2").addEventListener("animationend", listener_2, false);
$("#d1").addClass("digit-3");
$("#d2").addClass("digit-4");
$("#d0").addClass("digit-5");
}
function animationProgress(){
$("#d1").addClass("s11");
$("#d2").addClass("s12");
document.getElementById("d2").addEventListener("animationend", endStep1, false);
}
function animationProgressStop(){
$("#d1").css('animation-duration', '0.5s');
$("#d2").css('animation-duration', '0.25s');
}
function endStep1(e) {
progressChange(20);
$("#d1").removeClass("s11");
$("#d2").removeClass("s12");
document.getElementById("d2").addEventListener("animationend", endStep2, false);
$("#d1").addClass("s21");
$("#d2").addClass("s22");
}
function endStep2(e) {
progressChange(40);
$("#d1").removeClass("s21");
$("#d2").removeClass("s22");
document.getElementById("d2").addEventListener("animationend", endStep3, false);
$("#d1").addClass("s31");
$("#d2").addClass("s32");
}
function endStep3(e) {
progressChange(60);
$("#d1").removeClass("s31");
$("#d2").removeClass("s32");
document.getElementById("d2").addEventListener("animationend", endStep4, false);
$("#d1").addClass("s41");
$("#d2").addClass("s42");
}
function endStep4(e) {
progressChange(80);
$("#d1").removeClass("s41");
$("#d2").removeClass("s42");
document.getElementById("d2").addEventListener("animationend", endStep5, false);
$("#d1").addClass("s51");
$("#d2").addClass("s52");
}
function endStep5(e) {
progressChange(100);
}
function progressChange(val)
{
if (val == 0)
{
return;
}
if (val == 100)
{
$("#d1").removeClass();
$("#d2").removeClass();
$("#d1").addClass("progress-digit");
$("#d2").addClass("progress-digit");
$("#d0").css('transform', 'translate(0, -' + 1*26 + 'px)');
$("#d1").css('transform', 'translate(0, -' + 0*26 + 'px)');
$("#d2").css('transform', 'translate(0, -' + 0*26 + 'px)');
return;
}
var d1 = Math.floor(val/10);
var d2 = Math.round(val - d1*10);
$("#d1").css('transform', 'translate(0, -' + d1*26 + 'px)');
$("#d2").css('transform', 'translate(0, -' + d2*26 + 'px)');
}
function listener_1(e){
progressChange(80);
}
function listener_2(e){
progressChange(100);
}
}
if (!banned)
{
//
var buildUrl = "//wpc-any.static.crazypanda.games/sb" + clientPath + "Build";
var loaderUrl = buildUrl + "/PokerUnity.loader.js";
var config = {
dataUrl: buildUrl + "/6642fa84eaa836e8eaef8da2028ca12b.data",
frameworkUrl: buildUrl + "/81c715d69671671e1dc38f9cf556bc04.js",
codeUrl: buildUrl + "/7e613fa480662f94bfc6a75f63c856d4.wasm",
streamingAssetsUrl: "StreamingAssets",
companyName: "Crazy Panda",
productName: "World",
productVersion: "1.61.24" };
//
var script = document.createElement('script');
/*if ("%USE_COMPRESSION%" === 'true')
{
script.src = "//wpc-any.static.crazypanda.games/sb/client/webgl/%UNITY_WEBGL_LOADER_URL%";
}
else
{
script.src = "//wpc-any.static.crazypanda.games/s//client/webgl/%UNITY_WEBGL_LOADER_URL%";
}*/
script.src = loaderUrl;
document.body.appendChild(script);
SendAnalyticsEvent( {
type: 'run.step.script_added'
} );
if ( typeof social !== "undefined" && social && social.config && social.config.app && social.config.app.data && social.config.app.data.poker && social.config.app.data.poker.fallback)
{
landingData = social.config.app.data.poker.fallback;
SendAnalyticsEvent( {
type: 'run.step.landing_data_get'
} );
}
function SendLandingClickEventToStat()
{
SendAnalyticsEvent
(
{
type: 'run.step.landing_link_click',
}
);
}
function HandleLandingClick( fromPlace )
{
if ( !landingData || !landingData.landing )
{
console.log("Missing landing data.")
return;
}
var link = landingData.landing + "?";
if ( typeof social !== "undefined" && social && social.config && social.config.app && social.config.app.data)
{
var data = social.config.app.data;
if (data.social && data.social.user)
{
var user = social.config.app.data.social.user;
link += "uuid=" + user.id + "&";
}
link += "site=" + data.provider + "&";
link += "inst=" + data.instname + "&";
}
link += "ref=" + fromPlace;
console.log("Landing link: "+link);
window.open(link);
}
function LandingAnimation()
{
if ( !landingData || !landingData.landing || !landingData.descr )
{
console.log("Missing landing data.")
return;
}
var showAnimateStart = 300;
var hint = document.querySelector(".hint");
var lightning = document.querySelector(".lightning");
var bannerBg = document.querySelector(".banner-bg");
var bannerHeader = document.getElementById("bannerHeader");
var bannerText = document.getElementById("bannerText");
if ( landingData.header )
{
bannerHeader.innerHTML = landingData.header;
}
bannerText.innerHTML = landingData.descr;
var banner = document.querySelector(".banner-bg");
banner.addEventListener("click", function ()
{
SendLandingClickEventToStat();
HandleLandingClick( "long_loading_banner" );
}
);
hint.classList.add(classHidden);
setTimeout(function(){
lightning.classList.add(classShowed);
},showAnimateStart)
setTimeout(function(){
bannerBg.classList.add(classShowed);
},showAnimateStart)
}
function Landing()
{
console.log('Long loading detected. Showing landing.');
document.getElementById("landingBanner").hidden = false;
LandingAnimation();
}
if ( social.config.app.data.provider != "YandexGames" && social.config.app.data.provider != "Odnoklassniki" && social.config.app.data.provider != "MyWorld" && social.config.app.data.provider != "Vkontakte" )
{
setTimeout(Landing, 10000);
}
// Banner like in landing
function ShowFrameBanner(title, description)
{
var bannerHeader = document.getElementById("bannerHeader");
var bannerText = document.getElementById("bannerText");
bannerHeader.innerHTML = title;
bannerText.innerHTML = description;
var lightning = document.querySelector(".lightning");
var bannerBg = document.querySelector(".banner-bg");
document.getElementById("hint").hidden = true;
document.getElementById("landingBanner").hidden = false;
lightning.classList.add(classShowed);
bannerBg.classList.add(classShowed);
}
var noCashBannerData = social.config.app.data.poker.unity.no_cash_banner;
if (noCashBannerData != null && social.config.app.data.social.auth.platform == 2) // Extcanvas
{
ShowFrameBanner(noCashBannerData.title, noCashBannerData.text);
}
function SendFlashDeathBannerClickEventToStat()
{
SendAnalyticsEvent
(
{
type: 'unity.banner_help',
'subtype/td16' : "click"
}
);
}
function SendUnityClearEventToStat( reasonText )
{
SendAnalyticsEvent
(
{
type: 'unity.need_to_reload',
'subtype/td16' : reasonText
}
);
}
function FlashDeathShow()
{
console.log( "Showing flash death banner" );
// send show banner event
SendAnalyticsEvent
(
{
type: 'unity.banner_help',
'subtype/td16' : "show"
}
);
// show banner
var footer = document.getElementById("appBanner");
var authBlock = social.config.app.data.social.auth;
var userLocale = authBlock.locale | authBlock.user.locale;
var l10nLocale = social.config.app.data.l10n.locale;
var isRu = true;
if ( userLocale )
{
isRu = userLocale === "ru_RU";
}
else if ( l10nLocale )
{
isRu = l10nLocale === "ru_RU";
}
var ourContent = document.createElement("div");
ourContent.className = "flashDeathBanner " + (isRu ? "Ru" : "En");
ourContent.id = "flashDeathBanner";
footer.prepend(ourContent);
ourContent.addEventListener("click", function () {
SendFlashDeathBannerClickEventToStat();
HandleLandingClick( "dead_flash_banner" );
})
}
if(social.config.app.data.provider != "Odnoklassniki" && social.config.app.data.provider != "MyWorld" && social.config.app.data.provider != "Vkontakte" && social.config.app.data.provider != "YandexGames") {
setTimeout(FlashDeathShow, 30000);
}
function CheckWithoutStoreLinks()
{
if ( social.config.app.data.provider === "Odnoklassniki" )
{
var hint = document.querySelector(".hint");
hint.innerHTML = "";
SendAnalyticsEvent( {
type: 'run.step.hint_cleared'
} );
}
}
function GetMemDynamicSize()
{
if (wasmInstance !== undefined)
{
return wasmInstance.Module["HEAPU8"].length;
}
return 0;
}
function GetMemStackSize()
{
if (wasmInstance !== undefined)
{
return wasmInstance.Module["stackSave"]();
}
return 0;
}
function GetMemStaticSize()
{
if (wasmInstance !== undefined)
{
return 0;
}
return 0;
}
CheckWithoutStoreLinks();
script.onerror = function ()
{
SendAnalyticsEvent("run.step.scripLoadFail");
}
script.onload = function()
{
window.flogs2ProjectName = "PokerUnityJS";
var date = new Date();
var now = date.getTime();
loadingClientTime = now - startTime;
console.log("--------------------------------- Downloading clientData time = " + loadingClientTime + "ms");
var os = "unknown";
var osVersion = "unknown";
var scriptLoadedEvent = {
type: 'run.step.scriptLoaded',
};
SendAnalyticsEvent( scriptLoadedEvent );
var memErrorWindowShown = false;
function ClearFocusEvents()
{
if ( window.FocusCallbackFunction )
{
console.log( "Try to remove event listener ( focus )" );
window.removeEventListener('focus', window.FocusCallbackFunction);
console.log( "Remove event listener is done ( focus )" );
}
else
{
console.log( "Can't find event listener to remove ( focus )" );
}
if ( window.BlurCallbackFunction )
{
console.log( "Try to remove event listener ( blur )" );
window.removeEventListener('blur', window.BlurCallbackFunction);
console.log( "Remove event listener is done ( blur )" );
}
else
{
console.log( "Can't find event listener to remove ( blur )" );
}
}
function HandleUnityError( message, placement )
{
var memoryError = null;
console.log( "-------------------- Handle unity error." );
if (message.message != null) {
message = message.message;
}
else if (message.error != null) {
message = message.error;
}
// Handle 'out of memory' errors.
if (message.indexOf("Cannot enlarge memory arrays") != -1
|| message.indexOf("Invalid array buffer length") != -1
|| message.indexOf("Invalid typed array length") != -1
|| message.indexOf("out of memory") != -1
|| message.indexOf("could not allocate memory") != -1
|| message.indexOf("memory access out of bounds") != -1
)
{
memoryError = message;
}
if ( memoryError )
{
console.log( "-------------------- Handle 'out of memory' errors." );
if ( memErrorWindowShown )
{
console.warn( "Memory error window is already shown." );
return;
}
ClearFocusEvents();
gameInstance = null;
var shortErrorIndex = memoryError.indexOf( "at Error" );
if ( shortErrorIndex < 0 )
{
shortErrorIndex = memoryError.indexOf("at jsStackTrace");
if ( shortErrorIndex < 0 )
{
shortErrorIndex = memoryError.indexOf( "\")" );
}
}
var shortError = shortErrorIndex >= 0 ? memoryError.substring(0, shortErrorIndex - 1) : "";
var memCrashEventData = {
type: 'unity.memory_crash',
'placement/s' : placement,
'error_short/s' : shortError,
'error/longs' : memoryError.substring(0, 10000),
'os/s' : os + " " + osVersion
};
SendAnalyticsEvent
(
$.extend(memCrashEventData, {'subtype/s' : "error"})
);
memErrorWindowShown = true;
var canvas = document.getElementById("canvascontainer");
canvas.parentElement.removeChild( canvas );
showMemError( /Windows/.test(os) ? "mw" : "m", function () { location.reload(); }, memCrashEventData);
}
else
{
console.log( "Catched error:" + message );
SendAnalyticsEvent( {
type: 'unity.unhandled_error',
'error/longs' : message.substring(0, 10000)
} );
// Handle other errors.
}
return false;
}
var buildUrl = "//wpc-any.static.crazypanda.games/sb" + clientPath;
/*if ( "%USE_COMPRESSION%" === 'true')
{
buildUrl = "//wpc-any.static.crazypanda.games/sb/client/webgl/";
}
else
{
buildUrl = "//wpc-any.static.crazypanda.games/s//client/webgl/";
}*/
//
var canvas = document.getElementById("canvascontainer");
var gameInstance = createUnityInstance(canvas, config, (progress) => {
progressWrapper(gameInstance, progress);
}).then( (unityInstance) => {
UnityInstanceLoaded(unityInstance);
}).catch((message) => {
console.error("createUnityInstance error. message = " + message);
HandleUnityError(message, "in_game");
});
//
function UnityInstanceLoaded(unityInstance){
console.log("createUnityInstance done. unityInstance = " + unityInstance);
wasmInstance = unityInstance;
messageToGame = function (msg) {
if ( typeof msg === 'string' )
unityInstance.SendMessage( 'JSGate', 'MessageFromJS', msg );
};
$("#canvascontainer").focusin( function() { unityInstance.SendMessage('WebGLFocusController', 'OnFocusGot') } );
$("#canvascontainer").focusout( function() { unityInstance.SendMessage('WebGLFocusController', 'OnFocusLost') } );
}
/*var gameInstance = UnityLoader.instantiate("canvascontainer", buildUrl.concat("%UNITY_WEBGL_BUILD_URL%") , {
onProgress: progressWrapper,
Module :{
locateFile: function(e) {
return buildUrl.concat("Build/").concat( e === "build.wasm" ? this.wasmCodeUrl : e );
}
}
});
var os = UnityLoader.SystemInfo.os;
var osVersion = UnityLoader.SystemInfo.osVersion;
UnityLoader.Error.handler = function( e, t, n )
{
HandleUnityError( e, "in_game" );
return true;
};*/
/*window.UnityClear = function( reasonText )
{
console.log( "Clearing unity reason: " + reasonText );
SendUnityClearEventToStat( reasonText );
ShowWindowNeedReload();
var canvas = document.getElementById("canvascontainer");
canvas.parentElement.removeChild( canvas );
ClearFocusEvents();
var provider = social.config.app.data.provider;
var blockClearing = provider === "Odnoklassniki" || provider === "Vkontakte";
if (!blockClearing) {
gameInstance.Quit().then(function () {
gameInstance = null;
/!*
var canvas = document.getElementById("canvascontainer");
canvas.parentElement.removeChild( canvas );
console.log( "Clearing unity is complete." );*!/
});
}
console.log( "Clearing unity is complete." );
};*/
}
}
function CopyID(userId)
{
window.prompt("Copy to clipboard: Ctrl+C, Enter", userId);
}
function ShowGiftsOnNY()
{
var $ccontainer = $("#canvascontainer");
if(!$ccontainer.find("#ny_gifts").size())
{
var $giftcontainer = $("<div/>").attr("id", "ny_gifts").addClass("ny_gifts");
$ccontainer.append($giftcontainer);
}
for(var i = 1; i < 6; i++){
var name = "ny_gift_" + i;
if(!$ccontainer.find("#" + name).size()){
var $gift = $("<div/>").attr("id", name).addClass(name);
$("#ny_gifts").append($gift);
}
}
}
function CreateNYGarlands()
{
var $ccontainer = document.getElementById("canvascontainer");
var $preloader = $("#preloaderView");
if(!$preloader.find("#ny_garlands").size())
{
console.log("creating gofts element");
var giftsContainerNode = document.createElement('div');
giftsContainerNode.className = "ny_garlands";
giftsContainerNode.setAttribute("id", "ny_garlands");
$ccontainer.insertAdjacentElement("beforebegin", giftsContainerNode);
console.log("gifts inserted");
}
if(!$preloader.find("#ny_garland_left").size())
{
var garlandLeft = document.createElement('div');
garlandLeft.setAttribute("id", "ny_garland_left");
garlandLeft.className = "ny_garland_left";
garlandLeft.style.visibility = "hidden";
$("#ny_garlands").append(garlandLeft);
}
if(!$preloader.find("#ny_garland_right").size())
{
var garlandRight = document.createElement('div');
garlandRight.setAttribute("id", "ny_garland_right");
garlandRight.className = "ny_garland_right";
garlandRight.style.visibility = "hidden";
$("#ny_garlands").append(garlandRight);
}
}
function SwitchRightNYGarland(on)
{
SwitchElementVisibility("ny_garland_right", on);
}
function SwitchLeftNYGarland(on)
{
SwitchElementVisibility("ny_garland_left", on);
}
function SwitchElementVisibility(elementId, value)
{
var element = document.getElementById(elementId);
if(element != null)
{
var visibleValue = "visible";
if (value == false)
{
visibleValue = "hidden";
}
element.style.visibility = visibleValue;
}
}
function makeFullscreen (id, keepAspectRatio) {
var fid = (Math.round((Math.random())*100000)).toString(16);
console.log("makeFullscreen start " + fid);
// get fullscreen object
var getFullScreenObject = function () {
var doc = window.document;
var objFullScreen = doc.mozFullScreenElement || doc.webkitFullscreenElement || doc.msFullscreenElement || doc.fullscreenElement;
return (objFullScreen);
};
// handle fullscreen event
var eventFullScreen = function (callback) {
document.addEventListener("fullscreenchange", callback, false);
document.addEventListener("webkitfullscreenchange", callback, false);
document.addEventListener("mozfullscreenchange", callback, false);
document.addEventListener("MSFullscreenChange", callback, false);
};
var removeEventFullScreen = function (callback) {
document.removeEventListener("fullscreenchange", callback, false);
document.removeEventListener("webkitfullscreenchange", callback, false);
document.removeEventListener("mozfullscreenchange", callback, false);
document.removeEventListener("MSFullscreenChange", callback, false);
};
var div = document.getElementById("fullscreenContainer");
if (!div) {
div = document.createElement("div");
div.id = "fullscreenContainer";
document.body.appendChild(div);
}
var canvas = document.getElementById(id);
var beforeParent;
var beforeWidth = 760;
var beforeHeight = 730;
if (!document.lastfullscreenParent) {
beforeParent = canvas.parentNode;
document.lastfullscreenParent = beforeParent;
// to keep element index after fullscreen
document.lastfullscreenParentIndex = Array.from(beforeParent.children).findIndex(function (v) { return v == canvas; });
} else {
beforeParent = document.lastfullscreenParent;
}
// recv fullscreen function
var fullscreenFunc = function () {
console.log("fullscreenFunc callback ");
if (getFullScreenObject()) {
canvas.style.width = "";
canvas.style.height = "";
div.appendChild(canvas);
console.log("fullscreenFunc + " + fid);
} else {
canvas.style.width = beforeWidth + 'px';
canvas.style.height = beforeHeight + 'px';
beforeParent.insertBefore(canvas, Array.from(beforeParent.children)[document.lastfullscreenParentIndex]);
removeEventFullScreen(fullscreenFunc);
console.log("fullscreenFunc - " + fid);
}
console.log("fullscreenFunc canvas.style.width:" + canvas.style.width + " canvas.style.height:" + canvas.style.height + ' ' + fid);
};
if (document.lastfullscreenFunc) {
document.lastfullscreenFunc();
}
var removeEventLastFullScreen = function (callback) {
removeEventFullScreen(fullscreenFunc);
console.log("makeFullscreen unlist last " + fid);
};
document.lastfullscreenFunc = removeEventLastFullScreen;
// listener fullscreen event
eventFullScreen(fullscreenFunc);
console.log("makeFullscreen preparation " + fid);
try {
if (div.mozRequestFullScreen) div.mozRequestFullScreen();
else if (div.webkitRequestFullScreen) div.webkitRequestFullScreen();
else if (div.msRequestFullscreen) div.msRequestFullscreen();
else if (div.requestFullscreen) div.requestFullscreen();
} catch (e) {
console.log("requestFullscreen exception: " + e.toString());
}
console.log("makeFullscreen requestFullscreen called " + fid);
}
function generateGuid() {
//http://stackoverflow.com/a/2117523
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8);
return v.toString(16);
});
}
function AddToBookmarkFunction(a, wText)
{//http://tradebenefit.ru/kak-dobavit-sait-v-izbrannoe
console.log("AddToBookmarkFunction");
var title = window.document.title; // запоминаем заголовок активной страницы/вкладки
var url = window.document.location; // адрес тоже запоминаем
console.log("AddToBookmarkFunction: title = " + title);
console.log("AddToBookmarkFunction: url = " + url);
if (window.sidebar) { // такой объект есть только в Gecko
window.sidebar.addPanel(title, url, ""); // используем его метод добавления закладки
console.log("AddToBookmarkFunction Gecko");
}
else if (typeof(opera)=="object") { // есть объект opera?
a.rel="sidebar"; // добавлем закладку, смотрите вызов функции ниже
a.title=title;
a.url=url;
console.log("AddToBookmarkFunction opera");
return true;
}
else if(document.all) { // ну значит это Internet Explorer
window.external.AddFavorite(url, title); // используем соответсвующий метод
console.log("AddToBookmarkFunction Explorer");
}
else {
alert(wText); // для всех остальных браузеров, в т.ч. Chrome
console.log("AddToBookmarkFunction alert");
}
return false;
}
</script>
</div></div></center>
<script>
social.bind('tabs.open.support', function () { $("#tabMenu .supportButton a").click() });
</script>
<style>
#newsPreview { display:none; }
</style>
</div>
</div>
<div id="altImgContainer" class="fixedAppHeight invisible"><img class="invisible" style="width:100%; height: 100%"></div>
<div id="altImgContainer" class="fixedAppHeight invisible"><img style="width:100%; height: 100%"></div>
<style>
.wrapper_img.webGl{
background-image: url(//wpc-any.static.crazypanda.games/m/i/click_to_play_webGl/poker/bg.png);
}
</style>
<input id="data_click_to_play_webGl_project" type="hidden" name="click_to_play_view" value="Poker"/>
<input id="data_click_to_play_webGl_bg" type="hidden" name="click_to_play_view" value="/m/i/click_to_play_webGl/poker/bg.png"/>
<div id="click_to_play_webGl">
<div class="wrapper_img webGl " id="click_to_play_wrapper_webGl">
<div class="wrapper_data start" id="start">
<div class="descr hidden" id="click_to_play_webGl_descr">
<h3>Уважаемый игрок!</h3>
<div class="descr_description"><p>К сожалению, современные браузеры больше не поддерживают технологию Flash (<a href="https://www.blog.google/products/chrome/saying-goodbye-flash-chrome/" target="_blank">подробнее</a>).
Чтобы вы могли и дальше играть в <b>World Poker Club</b>, мы перешли на новую технологию, но выросли системные требования к компьютеру.
Эту проблему можно решить, открыв игру на другом компьютере или установив отдельное приложение <b>World Poker Club</b> на свой компьютер, смартфон или планшет.</p></div>
</div>
<div class="step_one_webGl instruction_wrapper" id="click_to_play_webGl_step_one">
<div class="instruction_header">World Poker Club для Windows</div>
<div class="instruction_icon">
<img src="//wpc-any.static.crazypanda.games/i/click2play/icon_app.png">
</div>
<div class="instruction_description">
<div class="instruction_description_wrapper" id="click_to_play_webGl_instruction_description">
<p>Установите <b>World Poker Club Premium</b> и получите все преимущества программы нашего клуба.</p>
</div>
<div class="download_wrapper" id="click_to_play_webGl_download_btn">
<a href="" target="_blank" border="0" class="button_start_webGl">
<img src="//wpc-any.static.crazypanda.games/m/i/click_to_play_webGl/village/button/en_button.png">
<span>Скачать приложение</span>
</a>
</div>
<div class="reload_wrapper hidden" id="click_to_play_webGl_reload_btn">
<a border="0" class="reload_btn_webGl" >
<img src="//wpc-any.static.crazypanda.games">
<span>[nokey:click_to_play_webGl.download_desktop.reload_text]</span>
</a>
</div>
<div class="back_to_game_wrapper hidden" id="click_to_play_webGl_back_to_game">
<a border="0" class="reload_btn_webGl" >
<img src="//wpc-any.static.crazypanda.games">
<span>[nokey:click_to_play_webGl.download_desktop.back_to_game_text]</span>
</a>
</div>
</div>
</div>
<div class="step_two_webGl hidden" id="click_to_play_webGl_step_two">
<h3>World Poker Club для устройств</h3>
<p>Установите <b>World Poker Club</b> на смартфон или планшет. Все полученные фишки и достижения сохранятся, а сразу после установки вы получите бонус!</p>
<div class="btn_store_list">
<div class="btn_store app_store" id="click_to_play_webGl_open_appstore_btn">
<a href="https://apps.apple.com/ru/app/world-poker-club-mobile/id765350277" target="_blank">
<img src="//wpc-any.static.crazypanda.games/m/i/click_to_play_webGl/store_bage/app_store/RU.svg">
</a>
</div>
<div class="btn_store google_play" id="click_to_play_webGl_open_google_play_btn">
<a href="https://play.google.com/store/apps/details?id=air.ru.crazypanda.wpcm" target="_blank">
<img src="//wpc-any.static.crazypanda.games/m/i/click_to_play_webGl/store_bage/google_play/RU.png">
</a>
</div>
<div class="btn_store app_gallery" id="click_to_play_webGl_open_huawei_appgalery_btn">
<a href="https://appgallery.huawei.com/#/app/C102478121" target="_blank">
<img src="//wpc-any.static.crazypanda.games/m/i/click_to_play_webGl/store_bage/huawei/EN.png">
</a>
</div>
</div>
</div>
</div>
<div class="flash_btn_link" id="click_to_play_webGl_flash_btn_link">
<a target="_top" href="">[nokey:click_to_play_webGL.flash_btn_link.text]</a>
</div>
</div>
<div class="arrow_download_webGl hidden"> </div>
</div>
<script>
(function(){
var data_click_to_play_project = document.getElementById("data_click_to_play_webGl_project");
var data_click_to_play_bg = document.getElementById("data_click_to_play_webGl_bg");
var main = document.getElementById("click_to_play_wrapper_webGl");
var descr = document.getElementById("click_to_play_webGl_descr");
var step_one = document.getElementById("click_to_play_webGl_step_one");
var instruction_description = document.getElementById("click_to_play_webGl_instruction_description");
var download_btn = document.getElementById("click_to_play_webGl_download_btn");
var reload_btn = document.getElementById("click_to_play_webGl_reload_btn");
var back_to_game = document.getElementById("click_to_play_webGl_back_to_game");
var step_two = document.getElementById("click_to_play_webGl_step_two");
var flash_btn_link = document.getElementById("click_to_play_webGl_flash_btn_link");
var open_appstore_btn = document.getElementById("click_to_play_webGl_open_appstore_btn");
var open_google_play_btn = document.getElementById("click_to_play_webGl_open_google_play_btn");
var open_huawei_appgalery_btn = document.getElementById("click_to_play_webGl_open_huawei_appgalery_btn");
var classNameHidden = "hidden";
var social = $.extend({}, window.social) ;
var project = data_click_to_play_project.value;
var bg = data_click_to_play_bg.value;
var all_steps = true;
var hide_download_btn = false;
var alt_btn_by_soc = "";
var alt_btn_by_soc_arr = alt_btn_by_soc.split(",")
var use_alt_btn_by_soc = alt_btn_by_soc_arr.indexOf("PandaGuest") + 1;
var use_support_alt_btn_by_soc = Boolean();
var alt_instruction_by_soc = "";
var alt_instruction_by_soc_arr = alt_instruction_by_soc.split(",")
var use_alt_instruction_by_soc = alt_instruction_by_soc_arr.indexOf("PandaGuest") + 1;
var flash_btn_link_by_soc = "";
var flash_btn_link_common = "";
function set_url_download_btn(url){
var urlStr = url
if(url.indexOf('?') != -1){
urlStr +="&"
}else{
urlStr +="?"
}
urlStr += "clid=138442173";
download_btn.querySelector('a').setAttribute("href", urlStr);
}
set_url_download_btn("https://electron-poker.crazypanda.ru/download/latest");
if(!bg){
main.classList.add("default");
}
if(all_steps == true){
main.classList.add("all_steps");
descr.classList.remove(classNameHidden);
step_two.classList.remove(classNameHidden);
}
if(use_alt_btn_by_soc > 0){
set_url_download_btn("");
download_btn.querySelector('img').setAttribute("src", "");
download_btn.querySelector('span').textContent = "";
if(use_support_alt_btn_by_soc){
download_btn.onclick = function(){
hideWindow()
window.social.tabs.select("support")
}
download_btn.querySelector('a').removeAttribute("href");
}
}
if(use_alt_instruction_by_soc > 0){
instruction_description.innerHTML = '<p></p>';
instruction_description.querySelector('p').innerHTML = "";
}
if(hide_download_btn == true){
download_btn.classList.add(classNameHidden);
}
if(flash_btn_link_by_soc){
flash_btn_link.querySelector('a').setAttribute("href", flash_btn_link_by_soc);
}else if(flash_btn_link_common){
flash_btn_link.querySelector('a').setAttribute("href", flash_btn_link_common);
}else{
flash_btn_link.classList.add(classNameHidden);
}
function showWindow(){
var $appContainer = social.appContainer = $("#appContainer");
$('#click_to_play_webGl').css('display', 'block');
$(social.appContainer).addClass('invisible');
}
function hideWindow(){
var $appContainer = social.appContainer = $("#appContainer");
$('#click_to_play_webGl').css('display', 'none');
$(social.appContainer).removeClass('invisible');
}
function reloadPage(){
window.location.reload();
}
function showReloadBtn(){
reload_btn.classList.remove(classNameHidden);
}
function showBackToGame(){
back_to_game.classList.remove(classNameHidden);
}
var userDeviceArray = [
{device: 'Android', platform: /Android/},
{device: 'iPhone', platform: /iPhone/},
{device: 'iPad', platform: /iPad/},
{device: 'Symbian', platform: /Symbian/},
{device: 'Windows Phone', platform: /Windows Phone/},
{device: 'Tablet OS', platform: /Tablet OS/},
{device: 'Linux', platform: /Linux/},
{device: 'Windows', platform: /Windows NT/},
{device: 'Macintosh', platform: /Macintosh/}
];
function getParameter(name) {
var url = window.location.search;
var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"),
results = regex.exec(url);
if (!results) return null;
if (!results[2]) return '';
return decodeURIComponent(results[2].replace(/\+/g, " "));
}
function getPlatform() {
var platform = navigator.userAgent;
for (var i in userDeviceArray) {
if (userDeviceArray[i].platform.test(platform)) {
return userDeviceArray[i].device;
}
}
return 'undefined ' + platform;
}
var platform = getPlatform();
var userBrowserArray = [
{browser: 'firefox', platform: /(firefox)[ \/]([\w.]+)/},
{browser: 'firefox', platform: /(firefox)(?:.*? rv:([\w.]+))?/},//old ff version
{browser: 'opera', platform: /(opr)(?:.*version)?[ \/]([\w.]+)/},
{browser: 'chrome', platform: /(chrome)[ \/]([\w.]+)/},
{browser: 'safari', platform: /(fxios)[ \/]([\w.]+)/},
{browser: 'safari', platform: /(crios)[ \/]([\w.]+)/},
{browser: 'msie', platform: /(edge) ([\w.]+)/}
];
function getBrowser() {
var ua = navigator.userAgent.toLowerCase();
for (var i in userBrowserArray) {
if (userBrowserArray[i].platform.test(ua)) {
return {
"browser":userBrowserArray[i].browser,
"data":userBrowserArray[i].platform.exec(ua)
};
}
}
}
var browser = getBrowser();
var version = (browser.data[2].split('.')[0])- 0
function start_webGl_app(){
buttonClickByStat("download_desktop");
}
function start_webGl_open_appstore(){
buttonClickByStat("open_appstore");
}
function start_webGl_open_google_play(){
buttonClickByStat("open_google_play");
}
function start_webGl_open_huawei_appgalery(){
buttonClickByStat("open_huawei_appgalery");
}
var statProps = $.extend({}, social.config.stat,{
type:"webgl_unsupported",
});
function openByStat(){
var props = $.extend(true,statProps,{
"browser/s":browser.browser,
"browser_ver/dict":version,
"platform/s":platform,
} );
props["subtype/dict"] = "open";
statEventSender(props);
}
function buttonClickByStat (ident){
var props = $.extend(true,{},statProps);
props["subtype/dict"] = "button_click";
props["button_ident/dict"] = ident;
statEventSender(props);
}
function statEventSender(props){
$.ajax({
url: document.location.protocol + "//stat." + (social.config.dev ? "dev." : '') + social.config.panda_domain + "/event"
, type: 'POST'
, accepts: {
img: 'image/gif'
}
, crossDomain: true
, data: JSON.stringify([props])
, dataType: 'img'
});
}
download_btn.children[0].onclick = start_webGl_app;
reload_btn.children[0].onclick = reloadPage;
back_to_game.children[0].onclick = hideWindow;
open_appstore_btn.children[0].onclick = start_webGl_open_appstore;
open_google_play_btn.children[0].onclick = start_webGl_open_google_play;
open_huawei_appgalery_btn.children[0].onclick = start_webGl_open_huawei_appgalery;
window.initCTPWebGl = function(reload){
showWindow();
openByStat();
switch(reload){
case "no_reload_button": break;
case "reload": showReloadBtn(); break;
case "back_to_game": showBackToGame(); break;
default:break;
}
}
})()
</script>
<div id="tabContainer" class="fixedTabHeight fixedTabWidth invisible"></div>
<style>
#appBanner {
text-align: center;
}
#appBanner *{
margin:auto
}
</style>
<div id="appBanner"></div>
<div id="newsPreview" class="news fixedAppWidth invisible">
</div>
<script type="text/javascript">;(function () {
social.tabs.config.newsPreviewCount = 0;
})();</script>
</div>
<div id="library" style="display: none">
</div>
</div>
</body>
</html>