Вы находитесь на странице: 1из 3

;window.CloudflareApps=window.Eager=window.CloudflareApps||window.

Eager||
{};window.CloudflareApps=window.CloudflareApps||
{};CloudflareApps.siteId="deb1f220f889c44c0006ce08868c4090";CloudflareApps.installs
=CloudflareApps.installs||{};;(function(){'use strict'
CloudflareApps.internal=CloudflareApps.internal||{}
var errors=[]
CloudflareApps.internal.placementErrors=errors
var errorHashes={}
function noteError(options){var hash=options.selector+'::'+options.type+'::'+
(options.installId||'')
if(errorHashes[hash]){return}
errorHashes[hash]=true
errors.push(options)}
var initializedSelectors={}
var currentInit=false
CloudflareApps.internal.markSelectors=function markSelectors(){if(!currentInit)
{check()
currentInit=true
setTimeout(function(){currentInit=false})}}
function check(){var installs=window.CloudflareApps.installs
for(var installId in installs){if(!installs.hasOwnProperty(installId)){continue}
var selectors=installs[installId].selectors
if(!selectors){continue}
for(var key in selectors){if(!selectors.hasOwnProperty(key)){continue}
var hash=installId+'::'+key
if(initializedSelectors[hash]){continue}
var els=document.querySelectorAll(selectors[key])
if(els&&els.length>1){noteError({type:'init:too-
many',option:key,selector:selectors[key],installId:installId})
initializedSelectors[hash]=true
continue}else if(!els||!els.length){continue}
initializedSelectors[hash]=true
els[0].setAttribute('cfapps-selector',selectors[key])}}}
CloudflareApps.querySelector=function querySelector(selector)
{if(selector==='body'||selector==='head'){return document[selector]}
CloudflareApps.internal.markSelectors()
var els=document.querySelectorAll('[cfapps-selector="'+selector+'"]')
if(!els||!els.length){noteError({type:'select:not-found:by-
attribute',selector:selector})
els=document.querySelectorAll(selector)
if(!els||!els.length){noteError({type:'select:not-found:by-
query',selector:selector})
return null}else if(els.length>1){noteError({type:'select:too-many:by-
query',selector:selector})}
return els[0]}
if(els.length>1){noteError({type:'select:too-many:by-
attribute',selector:selector})}
return els[0]}}());(function(){'use strict'
var prevEls={}
CloudflareApps.createElement=function createElement(options,prevEl)
{options=options||{}
CloudflareApps.internal.markSelectors()
try{if(prevEl&&prevEl.parentNode){var replacedEl
if(prevEl.cfAppsElementId){replacedEl=prevEls[prevEl.cfAppsElementId]}
if(replacedEl){prevEl.parentNode.replaceChild(replacedEl,prevEl)
delete prevEls[prevEl.cfAppsElementId]}else{prevEl.parentNode.removeChild(prevEl)}}
var element=document.createElement('cloudflare-app')
var container
if(options.pages&&options.pages.URLPatterns&&!
CloudflareApps.matchPage(options.pages.URLPatterns)){return element}
try{container=CloudflareApps.querySelector(options.selector)}catch(e){}
if(!container){return element}
if(!container.parentNode&&(options.method==='after'||options.method==='before'||
options.method==='replace')){return element}
if(container===document.body){if(options.method==='after')
{options.method='append'}else if(options.method==='before')
{options.method='prepend'}}
switch(options.method){case'prepend':if(container.firstChild)
{container.insertBefore(element,container.firstChild)
break}
case'append':container.appendChild(element)
break
case'after':if(container.nextSibling)
{container.parentNode.insertBefore(element,container.nextSibling)}else{container.pa
rentNode.appendChild(element)}
break
case'before':container.parentNode.insertBefore(element,container)
break
case'replace':try{var id=element.cfAppsElementId=Math.random().toString(36)
prevEls[id]=container}catch(e){}
container.parentNode.replaceChild(element,container)}
return element}catch(e){if(typeof console!=='undefined'&&typeof console.error!
=='undefined'){console.error('Error creating Cloudflare Apps element',e)}}}}());
(function(){'use strict'
CloudflareApps.matchPage=function matchPage(patterns){if(!patterns||!
patterns.length){return true}
var loc=document.location.host+document.location.pathname
if(window.CloudflareApps&&CloudflareApps.proxy&&CloudflareApps.proxy.originalURL)
{var url=CloudflareApps.proxy.originalURL.parsed
loc=url.host+url.path}
for(var i=0;i<patterns.length;i++){var re=new RegExp(patterns[i],'i')
if(re.test(loc)){return true}}
return false}}());CloudflareApps.installs["oGESOSd-
bc1f"]={appId:"lMxPPXVOqmoE",scope:{}};;CloudflareApps.installs["oGESOSd-
bc1f"].options={"account":
{"accountId":"9qy4KDoqnBND","service":"googleanalytics","userId":"10887549319963200
5565"},"id":"UA-44778688-
1","social":false};;if(CloudflareApps.matchPage(CloudflareApps.installs['oGESOSd-
bc1f'].URLPatterns)){(function(i,s,o,g,r,a,m)
{i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||
[]).push(arguments)},i[r].l=1*new
Date();a=s.createElement(o),m=s.getElementsByTagName(o)
[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})
(window,document,'script','https://www.google-
analytics.com/analytics.js','ga');};if(CloudflareApps.matchPage(CloudflareApps.inst
alls['oGESOSd-bc1f'].URLPatterns)){(function(){var
options=CloudflareApps.installs['oGESOSd-bc1f'].options
if(!options.id)return
function queue(callback){if('addEventListener'in window)
{window.addEventListener('load',callback,false)}else{window.attachEvent('onload',ca
llback)}}
function resolveParameter(uri,parameter){if(uri){var parameters=uri.split('#')
[0].match(/[^?=&]+=([^&]*)?/g)
for(var i=0,chunk;chunk=parameters[i];++i){if(chunk.indexOf(parameter)===0){return
unescape(chunk.split('=')[1])}}}}
window.ga('create',options.id,'auto')
window.ga('set','forceSSL',true)
window.ga('send','pageview')
if(options.social){queue(function(){var FB=window.FB
var twttr=window.twttr
if('FB'in window&&'Event'in FB&&'subscribe'in window.FB.Event)
{FB.Event.subscribe('edge.create',function(targetUrl)
{window.ga('send','social','facebook','like',{page:targetUrl})})
FB.Event.subscribe('edge.remove',function(targetUrl)
{window.ga('send','social','facebook','unlike',{page:targetUrl})})
FB.Event.subscribe('message.send',function(targetUrl)
{window.ga('send','social','facebook','send',{page:targetUrl})})}
if('twttr'in window&&'events'in twttr&&'bind'in twttr.events)
{twttr.events.bind('tweet',function(event){if(event){var targetUrl
if(event.target&&event.target.nodeName==='IFRAME')
{targetUrl=resolveParameter(event.target.src,'url')}
window.ga('send','social','twitter','tweet',{page:targetUrl})}})}})}}())}

Вам также может понравиться