This repository has been archived by the owner on Feb 20, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 25
/
embed.min.js
2 lines (2 loc) · 3.51 KB
/
embed.min.js
1
2
// b865c5b - 2016-05-01
var $jscomp={scope:{},findInternal:function(b,c,a){b instanceof String&&(b=String(b));for(var e=b.length,d=0;d<e;d++){var h=b[d];if(c.call(a,h,d,b))return{i:d,v:h}}return{i:-1,v:void 0}}};$jscomp.defineProperty="function"==typeof Object.defineProperties?Object.defineProperty:function(b,c,a){if(a.get||a.set)throw new TypeError("ES3 does not support getters and setters.");b!=Array.prototype&&b!=Object.prototype&&(b[c]=a.value)}; $jscomp.getGlobal=function(b){return"undefined"!=typeof window&&window===b?b:"undefined"!=typeof global&&null!=global?global:b};$jscomp.global=$jscomp.getGlobal(this);$jscomp.polyfill=function(b,c,a,e){if(c){a=$jscomp.global;b=b.split(".");for(e=0;e<b.length-1;e++){var d=b[e];d in a||(a[d]={});a=a[d]}b=b[b.length-1];e=a[b];c=c(e);c!=e&&null!=c&&$jscomp.defineProperty(a,b,{configurable:!0,writable:!0,value:c})}}; $jscomp.polyfill("Array.prototype.find",function(b){return b?b:function(b,a){return $jscomp.findInternal(this,b,a).v}},"es6-impl","es3"); (function(b,c,a,e){if(!b.wellcomeTimelineScriptIncluded){b.wellcomeTimelineScriptIncluded=!0;for(var d=c.getElementsByTagName("script"),h,n=d.length-1;0<=n;n--){var p=d[n];if(p.src){h=p.src;break}}var k,q,f=!1;if(!(k=b.jQuery)||a>k.fn.jquery||e(k,h,f)){var l=c.createElement("script");l.type="text/javascript";l.src="//ajax.googleapis.com/ajax/libs/jquery/"+a+"/jquery.min.js";l.onload=l.onreadystatechange=function(){f||(q=this.readyState)&&"loaded"!=q&&"complete"!=q||(e((k=b.jQuery).noConflict(1),h, f=!0),k(l).remove())};c.documentElement.childNodes[0].appendChild(l)}}})(window,document,"1.7.2",function(b,c,a){function e(a,e,q){function f(){m&&(r?(m.width(b(this).width()),m.height(b(this).height())):(m.width(g.width()),m.height(g.height())))}var l,g,m,k,p,r,t,u,v;g=b(a);g.empty();k=g.attr("data-uri");k=encodeURIComponent(k);p=g.attr("data-eventid");r=!1;t=g.height();a=g.position();u=a.top;v=a.left;b(window).resize(function(){f()});window.onorientationchange=function(){f()};(function(){l=new easyXDM.Socket({remote:h+ "//"+d+n+"/timeline.html?isHomeDomain="+e+"&isOnlyInstance="+q+"&dataUri="+k+"&eventId="+p+"&embedScriptUri="+c+"&url="+document.URL,container:g.get(0),props:{style:{width:"100%",height:g.height()+"px"},scrolling:"no"},onReady:function(){m=g.find("iframe")},onMessage:function(a,c){a=b.parseJSON(a);switch(a.eventName){case "onToggleFullScreen":(r=a.eventObject)?(b("html").css("overflow","hidden"),window.scrollTo(0,0),m.css({position:"fixed","z-index":9999,height:b(window).height(),width:b(window).width(), top:0,left:0})):(b("html").css("overflow","auto"),m.css({position:"static","z-index":"auto",height:t,width:"100%",top:u,left:v}));f();l.postMessage(JSON.stringify({eventName:"onToggleFullScreen",eventObject:r}));break;case "onRedirect":window.location.replace(a.eventObject);break;case "onRefresh":window.location.reload();break;case "onTrackEvent":"undefined"!==typeof trackEvent&&trackEvent(a.eventObject.category,a.eventObject.action,a.eventObject.label,a.eventObject.value);break;case "onTrackVariable":"undefined"!== typeof trackVariable&&trackVariable(a.eventObject.slot,a.eventObject.name,a.eventObject.value,a.eventObject.scope);break;default:jQuery(document).trigger(a.eventName,[a.eventObject])}}})})()}b.support.cors=!0;a=document.createElement("a");a.href=c;var d=a.hostname,h=a.protocol,n=80==a.port?"":":"+a.port;b.when(b.getScript("//"+d+n+"/js/libs/easyXDM.min.js"),b.getScript("//"+d+n+"/js/libs/json2.min.js")).done(function(){for(var a=b(".timeline"),c=document.domain===d,h=1===a.length,f=0;f<a.length;f++)e(a[f], c,h)})});