Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Commit a9d156d

Browse files
authored
Merge pull request #1064 from appirio-tech/tom-usersnap-fix
Tom usersnap fix
2 parents b43c482 + 5cd7324 commit a9d156d

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

app/index.jade

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,6 @@ html
1717
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)
1818
})(document);
1919

20-
script.
21-
(function() {
22-
var s = document.createElement("script");
23-
s.type = "text/javascript";
24-
s.async = true;
25-
s.src = '//api.usersnap.com/load/'+
26-
'3e7c8f0c-6cf6-41b6-9f2c-e8e4e60dfc59.js';
27-
var x = document.getElementsByTagName('script')[0];
28-
x.parentNode.insertBefore(s, x);
29-
})();
30-
3120
include ../assets/scripts/google.analytics.jade
3221
include ../assets/scripts/zendesk-widget.jade
3322
include ../assets/scripts/raven-js.jade

app/listings/listings.controller.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,18 @@ import { loadUser } from '../services/userv3.service.js'
2424
activate()
2525

2626
function activate() {
27+
28+
// add usersnap widget to /listings/ route
29+
(function() {
30+
var s = document.createElement('script')
31+
s.type = 'text/javascript'
32+
s.async = true
33+
s.src = '//api.usersnap.com/load/'+
34+
'3e7c8f0c-6cf6-41b6-9f2c-e8e4e60dfc59.js'
35+
var x = document.getElementsByTagName('script')[0]
36+
x.parentNode.insertBefore(s, x)
37+
})()
38+
2739
$scope.myChallenges = []
2840
$scope.reactProps = {
2941
config: CONSTANTS,

0 commit comments

Comments
 (0)