string vkUrl = webBrowser1.Url.AbsoluteUri;
if (vkUrl.Contains("access_token"))
{
var match = Regex.Match(vkUrl, @"=(.*?)&");
vkAT = match.Groups[1].ToString();
match = Regex.Match(vkUrl, @"&user_id=(.*)");
vkUserId = match.Groups[1].ToString();
string[] dataNames = {"UID", "AT"};
string[] data = {vkUserId, vkAT};
}
$("#b").fancybox({
openEffect : 'none',
closeEffect : 'none',
type : 'iframe',
width: 800,
onComplete : function(e) {
$('#fancybox-frame').load(function() {
var iframe = document.getElementById("fancybox-frame");
var iframewrap = document.getElementById("fancybox-content");
console.log(iframe);
console.log(iframewrap.height);
iframewrap.style.height = iframe.contentDocument.body.scrollHeight + 30 + 'px';
iframe.style.height = iframe.contentDocument.body.scrollHeight + 'px';
});
}
});