/********************************* MyBB.ru, Просмотр полного профиля на странице profile.php Версия: V2.0.0 Автор: Alex_63 Дата: 21.08.2016 Последние изменения: 21.08.2016 *********************************/ //============ РАБОТА ВО ФРЕЙМЕ =============// if(self!==top&&window.name=='load_Guest_profile')(function(){ if (GroupID!=3 && location.hostname.substr(0,4)=='www.'){$.get('/login.php?action=out&id='+UserID,function(){location.reload()}); } else $(document).ready(function(){ var cnt = $('#viewprofile-next')[0]; //alert(cnt); if(cnt){cnt = cnt.outerHTML;}else cnt = 'NULL'; var Data = {Profile_Preview_content:cnt}; //console.log(Data); self.parent.postMessage(Data,'*'); }); }()); //==== //END//- Работа во фрейме ============// //==== РАБОТА НА СТРАНИЦЕ /profile.php =====// if(self===top && $('#pun-profile').length && document.URL.indexOf('section=')==-1)(function() { var GroupAccess = false; if(GroupID!=3&&(+document.URL.match(/(?:profile.php\?id=)(\d+)(?:.*?)$/)[1]==UserID||GroupID<=2))GroupAccess = true; if(!GroupAccess)return; //======= Получаем контент из фрейма ========// window.onmessage = function(e){ //console.log(e); if(e.data && e.data.Profile_Preview_content && e.data.Profile_Preview_content!='NULL'){ $('#profile').replaceWith(e.data.Profile_Preview_content); // alert(e.data.Profile_Preview_content); $('head > iframe[name="load_Guest_profile"]').replaceWith(''); var li = $('