FB._https = (window.location.protocol == "https:"); FB.init({ appId: '2511208999168874', status: true, cookie: true, xfbml: true, channelUrl: 'https://'+window.location.hostname+'/channel.html', oauth: true, version: 'v3.0' }); FB.AppEvents.logPageView(); function FBresize() { FB.Canvas.setSize({width: 640, height: 810}); FB.Canvas.setAutoGrow(); } function fwl() { var time = new Date().getTime(); top.location.href = 'https://'+window.location.hostname+'/main'; } function FB_login() { FB.login(function (response) { if (response.authResponse) { setTimeout(fwl(), 1000); } else { setTimeout(fwl(), 1000); } }, {scope: 'email,pages_manage_posts,pages_show_list,pages_read_engagement,business_management,ads_management,read_insights,public_profile,pages_manage_ads,instagram_content_publish,instagram_basic,publish_to_groups,leads_retrieval,pages_manage_metadata,ads_read,pages_read_user_content,publish_video,read_insights,instagram_manage_insights'}); }; function auto_grow(element) { element.style.height = "5px"; if (element.scrollHeight < 100) { element.style.height = "99px"; } else { element.style.height = element.scrollHeight + "px"; } } $(document).ready(function () { FB.getLoginStatus(function (response) { if (response.status === 'connected') { } else if (response.status === 'not_authorized') { } else { } }); }); setTimeout(function () { var ap = 1; $('.ap').hover(function () { $(this).css('animation-name', 'pulse'); }).mouseleave(function () { if (ap == 1) { ap = 0; setTimeout(function () { $('.ap').css('animation-name', 'none'); ap = 1; }, 2500); } }); }, 4000); //menu_post //onmousein=\"$('.promo-item2').toggle(300);\" $('.ti-menu').click(function () { $('.promo-item2').toggle(300); }) //formularz dodawania posta $(document).ready(function () { $('#link_form').submit(function (event) { $('#post_add_title').html('Trwa dodawanie Twojego posta'); $('#ModalPost').modal(focus); $('#modal_send').html('
'); event.preventDefault(); var options = { xhrFields: {withCredentials: true}, success: function (html) { event.preventDefault(); var html = html.split('||'); $('#modal_send').html(html[0]); $('#post_add_title').html(html[1]); } }; $('#link_form').ajaxSubmit(options); }) var bwidth_mobile = $('body').width(); if (bwidth_mobile < 600) { $('.on_mobile').show(); $('.ti-help-alt').css('color','black'); $('.ti-help-alt').css('margin-left','0px'); $('#h4-header').css('font-size','10px'); }else{ var body_height=$('body').height(); body_height=body_height-45; $('.login-signup-wrap').css('height', body_height+'px'); $('.login-signup-wrap').css('margin-top', '45px'); } //zmiana na dark $('.light-dark-mode').click(function(){ console.log('dark mode'); }) }) window.onresize = function() { var bwidth_mobile = $('body').width(); if (bwidth_mobile < 600) { $('.on_mobile').show(); $('.ti-help-alt').css('color','black'); $('.ti-help-alt').css('margin-left','0px'); $('#h4-header').css('font-size','10px'); }else{ var body_height=$(window).height(); body_heightn=body_height-45; $('.login-signup-wrap').css('height', body_heightn+'px'); $('.login-signup-wrap').css('margin-top', '45px'); //$('.row .align-items-center').css('height',body_height+'px'); } }