This repository has been archived by the owner on Dec 13, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sugoio-jslib-snippet.min.js
6 lines (6 loc) · 2.25 KB
/
sugoio-jslib-snippet.min.js
1
2
3
4
5
6
/*!
* sugo-sdk-javascript JavaScript Lib v1.3.13
* http://sugo.io
* Date: 2017-11-28
*/
var SUGOIO_LIB_URL="//localhost:8000/_bc/sugo-sdk-js/libs/sugoio-latest.min.js";!function(e,o){function t(e,o){for(var t=0,n=e.length;t<n;t++)o(e[t],t,e)}if(!o.__SV){var n,r,s,c=window,i="sugoio";c[i]=o;try{!function(o){var t=c.atob(o),n=JSON.parse(t).state,r={accessToken:n.access_token,accessTokenExpiresAt:Date.now()+1e3*Number(n.expires_in),projectToken:n.token,projectId:n.project_id,userId:n.user_id,choosePage:n.choose_page};c.sessionStorage.setItem("editorParams",JSON.stringify(r)),n.hash?c.location.hash=n.hash:c.history?c.history.replaceState("",e.title,c.location.pathname+c.location.search):c.location.hash=""}(c.location.hash.replace("#",""))}catch(a){}finally{!function(o){var n={},r=e,s="blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" ");o.proxy={proxy:function(e,t){return(n[e]||(n[e]=[])).push(t),o.proxy},off:function(e,r){var s=n[e]||[],c=[];return t(s,function(e){e!==r&&c.push(e)}),s[e]=c,o.proxy}},t(s,function(e){n[e]=[],function(e,o,t){"function"==typeof e.addEventListener?e.addEventListener(o,t,!0):e.attachEvent("on"+o,t)}(r,e,function(o){try{t(n[e],function(e){e(o)})}catch(a){console&&"function"==typeof console.error&&console.error(a.stack)}})})}(o)}o._i=[],o.init=function(e,n,r){var c=o;void 0!==r?c=o[r]=[]:r=i,c.people=c.people||[],c.toString=function(e){var o=i;return r!==i&&(o+="."+r),e||(o+=" (stub)"),o},c.people.toString=function(){return c.toString(1)+".people (stub)"},t(s="time_event track track_pageview register register_once unregister set_config".split(" "),function(e){!function(e,o){var t=o.split(".");2===t.length&&(e=e[t[0]],o=t[1]),e[o]=function(){e.push([o].concat(Array.prototype.slice.call(arguments,0)))}}(c,e)}),o._i.push([e,n,r])},o.__SV=1.2,(n=e.createElement("script")).type="text/javascript",n.async=!0,"undefined"!=typeof SUGOIO_CUSTOM_LIB_URL?n.src=SUGOIO_CUSTOM_LIB_URL:"file:"===c.location.protocol&&SUGOIO_LIB_URL.match(/^\/\//)?n.src="https:"+SUGOIO_LIB_URL:n.src=SUGOIO_LIB_URL,(r=e.getElementsByTagName("script")[0]).parentNode.insertBefore(n,r)}}(document,window.sugoio||[]);