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

Commit 5025acf

Browse files
committed
Route checking to limit usersnap component to listings page
1 parent b43c482 commit 5025acf

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

app/index.jade

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,17 @@ html
1818
})(document);
1919

2020
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-
})();
21+
if (location.href.match(/listings\/$/)) {
22+
(function() {
23+
var s = document.createElement("script");
24+
s.type = "text/javascript";
25+
s.async = true;
26+
s.src = '//api.usersnap.com/load/'+
27+
'3e7c8f0c-6cf6-41b6-9f2c-e8e4e60dfc59.js';
28+
var x = document.getElementsByTagName('script')[0];
29+
x.parentNode.insertBefore(s, x);
30+
})();
31+
}
3032

3133
include ../assets/scripts/google.analytics.jade
3234
include ../assets/scripts/zendesk-widget.jade

0 commit comments

Comments
 (0)