diff --git a/app/index.jade b/app/index.jade index 24cddfb2d..b81faede9 100644 --- a/app/index.jade +++ b/app/index.jade @@ -17,17 +17,6 @@ html h=d.documentElement,t=setTimeout(function(){h.className=h.className.replace(/\bwf-loading\b/g,"")+" wf-inactive";},config.scriptTimeout),tk=d.createElement("script"),f=false,s=d.getElementsByTagName("script")[0],a;h.className+=" wf-loading";tk.src='https://use.typekit.net/'+config.kitId+'.js';tk.async=true;tk.onload=tk.onreadystatechange=function(){a=this.readyState;if(f||a&&a!="complete"&&a!="loaded")return;f=true;clearTimeout(t);try{Typekit.load(config)}catch(e){}};s.parentNode.insertBefore(tk,s) })(document); - script. - (function() { - var s = document.createElement("script"); - s.type = "text/javascript"; - s.async = true; - s.src = '//api.usersnap.com/load/'+ - '3e7c8f0c-6cf6-41b6-9f2c-e8e4e60dfc59.js'; - var x = document.getElementsByTagName('script')[0]; - x.parentNode.insertBefore(s, x); - })(); - include ../assets/scripts/google.analytics.jade include ../assets/scripts/zendesk-widget.jade include ../assets/scripts/raven-js.jade diff --git a/app/listings/listings.controller.js b/app/listings/listings.controller.js index ee1c87791..d6428e864 100755 --- a/app/listings/listings.controller.js +++ b/app/listings/listings.controller.js @@ -24,6 +24,18 @@ import { loadUser } from '../services/userv3.service.js' activate() function activate() { + + // add usersnap widget to /listings/ route + (function() { + var s = document.createElement('script') + s.type = 'text/javascript' + s.async = true + s.src = '//api.usersnap.com/load/'+ + '3e7c8f0c-6cf6-41b6-9f2c-e8e4e60dfc59.js' + var x = document.getElementsByTagName('script')[0] + x.parentNode.insertBefore(s, x) + })() + $scope.myChallenges = [] $scope.reactProps = { config: CONSTANTS,