play4ever.net Open in urlscan Pro
2a05:7880:874:ba0a:9774:141b:3f92:4723  Public Scan

URL: https://play4ever.net/play4ever.js
Submission: On August 21 via api from LU — Scanned from GB

Form analysis 0 forms found in the DOM

Text Content

if(typeof play4ever==='undefined'||!play4ever.l4pHost){Array.indexOf||(Array.prototype.indexOf=function(a){for(var b=0;b<this.length;b++){if(this[b]==a){return b;}}
return-1;});var locationSearch=window.location.search;if(locationSearch){var searchParams=locationSearch.slice(1).split('&');for(var i=0;i<searchParams.length;i++){var splitParam=searchParams[i].split('=');if(splitParam[0]=='sameOrigRedirect'){if(window.opener&&!window.opener.closed){window.opener.location=decodeURIComponent(splitParam[1]);window.opener.focus();window.close();}}}}
var l4pStaticHost=(function(a){var url='play4ever.net';if(a.length>0){var b,c;for(c in a){if(c in a&&a[c].src&&0<a[c].src.indexOf('play4ever.js')){b=a[c];break;}}
if(typeof b!=='undefined'){a=b.src.match(/^.*\/\/([^/]+)/);if(a.length&&a[1]&&a[1].indexOf(window.location.hostname.replace('www.',''))===-1){url=a[1].replace(/^www\./,'');}}}
return url;})(document.getElementsByTagName("script"));var play4ever={tpl:{"middle":{"visible":{"block":"{items_visible}{block_hidden}","item":"<span class=\"play4ever-social-icons-md play4ever-icon-md-{social_id}\" title=\"{social_name}\" x-login-button=\"{social_id}\"><\/span>"},"hidden":{"block":"<span class=\"play4ever-social-icons-md play4ever-icon-arrow play4ever-tooltip-link\"><div class=\"play4ever-tooltip-list\">{items_hidden}<\/div><\/span>","item":"<div class=\"play4ever-tooltip-item\" x-login-button=\"{social_id}\"><span class=\"play4ever-social-icons-md play4ever-icon-md-{social_id}\" title=\"{social_name}\"><\/span><p>{social_name}<\/p><\/div>"}},"small":{"visible":{"block":"{items_visible}{block_hidden}","item":"<span class=\"play4ever-social-icons play4ever-icon-{social_id}\" title=\"{social_name}\" x-login-button=\"{social_id}\"><\/span>"},"hidden":{"block":"<span class=\"play4ever-social-icons play4ever-icon-arrow play4ever-tooltip-link\"><div class=\"play4ever-tooltip-list\">{items_hidden}<\/div><\/span>","item":"<div class=\"play4ever-tooltip-item\" x-login-button=\"{social_id}\"><span class=\"play4ever-social-icons play4ever-icon-{social_id}\" title=\"{social_name}\" x-login-button=\"{social_id}\"><\/span><p>{social_name}<\/p><\/div>"}},"block":{"visible":"<div class=\"play4ever-social-block\"><p>\u0412\u043e\u0439\u0442\u0438:<\/p><span class=\"play4ever-social-icons play4ever-icon-vkontakte\"><\/span><span class=\"play4ever-social-icons play4ever-icon-odnoklassniki\"><\/span><span class=\"play4ever-social-icons play4ever-icon-mailru\"><\/span><span class=\"play4ever-social-icons play4ever-icon-facebook\"><\/span><p>...<\/p><\/div>","popup":"<div id=\"{id}\" class=\"play4ever-popup\"><div class=\"play4ever-popup-overlay\"><\/div><div id=\"popup-login\" class=\"play4ever-popup-block\"><div class=\"play4ever-popup-header\"><div class=\"play4ever-popup-close\"><\/div><h1 class=\"play4ever-popup-title\">\u0412\u043e\u0439\u0442\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e:<\/h1><span class=\"play4ever-powered\">powered by {app_name}<\/span><\/div><section class=\"play4ever-popup-content\"><ul class=\"play4ever-check-list play4ever-check-list-inline\"> {items} <\/ul><div style=\"clear: both;\"><\/div><\/section><\/div><\/div>","item":"<li x-login-button=\"{social_id}\"><span class=\"play4ever-social-icons-md play4ever-icon-md-{social_id}\"><\/span><p>{social_name}<\/p><\/li>"},"internal":{"visible":{"block":"{items_visible}","item":"<div class=\"play4ever-icon-item play4ever-{social_id}\" title=\"{social_name}\" x-login-button=\"{social_id}\"><\/div>"}}},css:"",appName:'Play4Ever',l4pHost:"play4ever.net",callback:null,translate:function(name){var phrases={vkontakte:'ВКонтакте',odnoklassniki:'Одноклассники',mailru:'Mail.ru',facebook:'Facebook',twitter:'Twitter',google:'Google',yandex:'Яндекс',linkedin:'LinkedIn',steam:'Steam',instagram:'Instagram',telegram:'Telegram',tiktok:'Tiktok'};return phrases[name]||name;},l4pDivId:'play4ever',protocol:location.href.match(/^https/i)?"https":"http",l4pStaticHost:l4pStaticHost,providerNames:"vkontakte odnoklassniki mailru facebook twitter google yandex linkedin steam instagram telegram tiktok".split(" "),linkParams:{},generateButtons:true,openWindow:true,nWay:true,custom:false,onload:false,lastClickTime:0,isMobile:/Mobile|mini|Fennec|Android|iP(ad|od|hone)/.test(window.navigator.appVersion),get:function(id){return document.getElementById(id);},init:function(){var l4pDiv=play4ever.get(play4ever.l4pDivId);if(!l4pDiv){return;}
play4ever.getLinkParameters(l4pDiv);play4ever.nWay=typeof play4ever.linkParams.receiver==='undefined'?1:0;if(play4ever.linkParams.size==='block'){var phrases={id:play4ever.l4pDivId+'-popup',app_name:play4ever.appName};var items=[];for(p in play4ever.providerNames){phrases.social_id=play4ever.providerNames[p];phrases.social_name=play4ever.translate(play4ever.providerNames[p]);items.push(this.makeHTML(play4ever.tpl.block.item,phrases));}
phrases.items=items.join('');this.appendHTML(l4pDiv,this.makeHTML(play4ever.tpl.block.visible));this.appendHTML(document.getElementsByTagName('body')[0],this.makeHTML(play4ever.tpl.block.popup,phrases));this.add(l4pDiv.childNodes[0],"click",function(){play4ever.get(phrases.id).style.display='block';});}else if(play4ever.generateButtons){play4ever.createButtons();}
play4ever.setProperties();},customInit:function(id,generateButtons){var fun=function(){play4ever.generateButtons=generateButtons||false;play4ever.onload=true;play4ever.l4pDivId=id;play4ever.init();};play4ever.custom=true;if(!play4ever.onload){play4ever.add(window,"load",fun);}else{fun();}},setProperties:function(){var l4pDiv=this.get(this.l4pDivId);var l4pDivPopup=this.get(this.l4pDivId+'-popup');this.findAllObjects(l4pDiv);l4pDivPopup&&this.findAllObjects(l4pDivPopup);},getLinkParameters:function(el){if(el.getAttribute('login-data')){var params=el.getAttribute('login-data').split(';');for(var i=0;i<params.length;i++){var arr=params[i].split('=');var value=arr[1];if(arr[0]==='redirect_uri'||arr[0]==='receiver'){var matchArr=params[i].match(/=(.+)$/);value=matchArr&&matchArr.length>1?matchArr[1]:'';}
value=this.autoDetectProtocol(value);this.linkParams[arr[0]]=value;}}},autoDetectProtocol:function(parameter){return parameter.replace(/^\/\//g,play4ever.protocol+'://');},findAllObjects:function(parentObject){var nodes=parentObject.childNodes;for(var i=0;i<nodes.length;i++){var node=nodes[i];if(node.getAttribute&&node.getAttribute('x-login-button')){this.initButton(node);}
if(/icon\-arrow/.test(node.className)){node.onmouseover=function(){node.childNodes[0].style.display='block';};node.onmouseout=function(){node.childNodes[0].style.display='none';};}
if(/popup\-close/.test(node.className)){node.onclick=function(){node.parentNode.parentNode.parentNode.style.display='none';};}
this.findAllObjects(node);}},initButton:function(node){var providerName=node.getAttribute("x-login-button");if(providerName&&-1<this.providerNames.indexOf(providerName)){!this.isMobile&&this.add(node,"mouseover",function(el){if(/disabled|no-opacity/.test(el.className)){return!1;}
opacity=75;el.style.filter="alpha(opacity="+opacity+") progid:DXImageTransform.Microsoft.AlphaImageLoader(src=transparent.png, sizingMethod='crop')";el.style.opacity=parseFloat(opacity)/100;});!this.isMobile&&this.add(node,"mouseout",function(el){if(/disabled|no-opacity/.test(el.className)){return!1;}
el.style.filter="";el.style.opacity="";});this.add(node,"click",function(el,ev){if(play4ever.linkParams.demo){return false;}
if(/disabled/.test(el.className)){return!1;}
var time=+new Date();if(play4ever.lastClickTime>time-1000){return false;}
play4ever.lastClickTime=time;var providerName=el.getAttribute("x-login-button");var href=play4ever.protocol+'://'+play4ever.l4pHost+'/'+providerName+'?host='+'&redirect_uri='+play4ever.linkParams.redirect_uri;if(typeof play4ever.linkParams['receiver']!=='undefined'){href+='&receiver='+play4ever.linkParams.receiver;}
if(typeof play4ever.linkParams['required']!=='undefined'){href+='&required='+play4ever.linkParams.required;}
if(typeof play4ever.linkParams['optional']!=='undefined'){href+='&optional='+play4ever.linkParams.optional;}
if(typeof play4ever.linkParams['nocache']!=='undefined'){href+='&nocache='+play4ever.linkParams.nocache;}
if(typeof play4ever.linkParams['close_uri']!=='undefined'){href+='&close_uri='+play4ever.linkParams.close_uri;}
var url=play4ever.protocol+'://'+play4ever.l4pHost+'/'+providerName+'?token&xmlhttprequest=1';if(play4ever.openWindow){var m=window.open(href,"Play4Ever","scrollbars=1,width=800,height=600,left="+(screen.width-800)/2+",top="+(screen.height-600)/2);if(play4ever.nWay===1){var n=window.setInterval(function(){if(m&&m.closed){var xhr=new XMLHttpRequest();xhr.withCredentials=true;xhr.open('GET',url,true);xhr.onload=function(){var token=this.responseText;if(play4ever.callback&&typeof play4ever.callback==='function'){play4ever.callback({token:token});}else{redirectForm(token,play4ever.linkParams.redirect_uri);}
window.clearInterval(n);}
xhr.onerror=function(){window.clearInterval(n);}
xhr.send();clearInterval(n);}},100);}}
else location.href=href;});}},createButtons:function(){var visible=play4ever.linkParams.visible?play4ever.linkParams.visible.split(','):[];var hidden=play4ever.linkParams.hidden?play4ever.linkParams.hidden.split(','):[];var phrases={};if(!visible.length&&!hidden.length){visible=this.providerNames;play4ever.linkParams.size='middle';}
var tpl=play4ever.tpl[play4ever.linkParams.size];var items=[];for(p in visible){phrases.social_id=visible[p];phrases.social_name=play4ever.translate(visible[p]);items.push(this.makeHTML(tpl.visible.item,phrases));}
phrases.items_visible=items.join('');if(hidden.length&&hidden[0]){items=[];for(p in hidden){phrases.social_id=hidden[p];phrases.social_name=play4ever.translate(hidden[p]);items.push(this.makeHTML(tpl.hidden.item,phrases));}
phrases.items_hidden=items.join('');phrases.block_hidden=this.makeHTML(tpl.hidden.block,phrases);}
this.appendHTML(this.get(this.l4pDivId),this.makeHTML(tpl.visible.block,phrases));},add:function(a,b,c){a.addEventListener?a.addEventListener(b,function(b){c(a,b);},!1):a.attachEvent?a.attachEvent("on"+b,function(b){c(a,b);}):a["on"+b]=function(b){c(a,b);};},isIE:function(){if(/MSIE (\d+\.\d+);/.test(navigator.userAgent)){var ieversion=new Number(RegExp.$1);if(ieversion<=9){return true;}}
return false;},appendHTML:function(parent,html){var e=document.createElement('div');e.innerHTML=html;while(e.firstChild){parent.appendChild(e.firstChild);}},makeHTML:function(tpl,phrases){return tpl.replace(/\{([a-zA-Z0-9_]+)\}/g,function(find,name){return phrases[name]||'';});}};if(document.readyState==="loading"){play4ever.add(window,"DOMContentLoaded",actionAfterDomLoad);}else{actionAfterDomLoad();}
function actionAfterDomLoad(){play4ever.onload=true;if(!play4ever.custom){play4ever.init();}
var style=document.createElement('style');style.type='text/css';style.innerHTML=play4ever.css.replace(/l4pStaticHostForReplace/g,play4ever.l4pStaticHost);document.getElementsByTagName('body')[0].appendChild(style);var elements=document.getElementsByClassName('play4ever');for(var i=0;i<elements.length;i++){var dataId=elements[i].getAttribute('data-id');if(!dataId){continue;}
elements[i].setAttribute('id','play4ever-'+dataId);var script=document.createElement('script');script.type='text/javascript';script.src=play4ever.protocol+'://'+play4ever.l4pHost+'/widget?id='+dataId+'&callback=play4everCallback';document.getElementsByTagName('body')[0].appendChild(script);}}
function redirectForm(token,url){var form=document.createElement("form");form.action=decodeURIComponent(url);form.method="post";form.target="_top";form.style.display="none";var field=document.createElement("input");field.type="hidden";field.name="access_token";field.value=token;form.appendChild(field);document.body.appendChild(form);form.submit();};function play4everCallback(data){var id='play4ever-'+data.widget_id;var el=document.getElementById(id);var attr=document.createAttribute('login-data');attr.value=data.code;el.setAttributeNode(attr);play4ever.customInit(id,true);}
var social=play4ever;var login4play=play4ever;}