added 260907 version of worker toolkit
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
/*jshint node:true*/
|
||||
module.exports = {
|
||||
name: 'full-story',
|
||||
|
||||
isDevelopingAddon: function() {
|
||||
return true;
|
||||
},
|
||||
|
||||
contentFor: function(type, config) {
|
||||
var addonConfig = config['full-story'];
|
||||
if (type === 'head-footer' && addonConfig['enabled']) {
|
||||
var org = addonConfig['org'];
|
||||
return [
|
||||
"<script>",
|
||||
"window['_fs_debug'] = false;",
|
||||
"window['_fs_host'] = 'www.fullstory.com';",
|
||||
"window['_fs_org'] = '" + org + "';",
|
||||
"window['_fs_namespace'] = 'FS';",
|
||||
"(function(m,n,e,t,l,o,g,y){",
|
||||
" if (e in m && m.console && m.console.log) { m.console.log('FullStory namespace conflict. Please set window[\"_fs_namespace\"].'); return;}",
|
||||
" g=m[e]=function(a,b){g.q?g.q.push([a,b]):g._api(a,b);};g.q=[];",
|
||||
" o=n.createElement(t);o.async=1;o.src='https://'+_fs_host+'/s/fs.js';",
|
||||
" y=n.getElementsByTagName(t)[0];y.parentNode.insertBefore(o,y);",
|
||||
" g.identify=function(i,v){g(l,{uid:i});if(v)g(l,v)};g.setUserVars=function(v){g(l,v)};",
|
||||
" g.identifyAccount=function(i,v){o='account';v=v||{};v.acctId=i;g(o,v)};",
|
||||
" g.clearUserCookie=function(d,i){d=n.domain;while(1){n.cookie='fs_uid=;domain='+d+",
|
||||
" ';path=/;expires='+new Date(0);i=d.indexOf('.');if(i<0)break;d=d.slice(i+1)}}",
|
||||
"})(window,document,window['_fs_namespace'],'script','user');",
|
||||
"</script>"
|
||||
].join('\n');
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"name": "full-story",
|
||||
"keywords": [
|
||||
"ember-addon"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
/*jshint node:true*/
|
||||
module.exports = {
|
||||
name: 'heap-analytics',
|
||||
|
||||
isDevelopingAddon: function() {
|
||||
return true;
|
||||
},
|
||||
|
||||
contentFor: function(type, config) {
|
||||
var addonConfig = config['heap-analytics'];
|
||||
|
||||
if (type === 'head-footer' && addonConfig && addonConfig.key) {
|
||||
return [
|
||||
'<script type="text/javascript">',
|
||||
'window.heap=window.heap||[],heap.load=function(e,t){window.heap.appid=e,window.heap.config=t=t||{};var r=t.forceSSL||"https:"===document.location.protocol,a=document.createElement("script");a.type="text/javascript",a.async=!0,a.src=(r?"https:":"http:")+"//cdn.heapanalytics.com/js/heap-"+e+".js";var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(a,n);for(var o=function(e){return function(){heap.push([e].concat(Array.prototype.slice.call(arguments,0)))}},p=["addEventProperties","addUserProperties","clearEventProperties","identify","removeEventProperty","setEventProperties","track","unsetEventProperty"],c=0;c<p.length;c++)heap[p[c]]=o(p[c])};',
|
||||
'heap.load("' + addonConfig.key + '");',
|
||||
'</script>',
|
||||
].join('\n');
|
||||
}
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"name": "heap-analytics",
|
||||
"keywords": [
|
||||
"ember-addon"
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user