Skip to content

Commit

Permalink
Merge pull request #1064 from appirio-tech/tom-usersnap-fix
Browse files Browse the repository at this point in the history
Tom usersnap fix
  • Loading branch information
tladendo authored Mar 1, 2017
2 parents b43c482 + 5cd7324 commit a9d156d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
11 changes: 0 additions & 11 deletions app/index.jade
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 12 additions & 0 deletions app/listings/listings.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit a9d156d

Please sign in to comment.