-
Notifications
You must be signed in to change notification settings - Fork 3
/
clientside-scripts.js
38 lines (31 loc) · 1.02 KB
/
clientside-scripts.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
var allowedHost = 'docs.seqera.io';
var hotjarAppID = 3836890;
function canProceed() {
if (typeof window === 'undefined') return false;
if (window.location.hostname !== allowedHost) return false;
return true;
}
function addScripts() {
if(!canProceed()) return;
// Usersnap
(function usersnap() {
window.onUsersnapLoad = function (api) {
api.init();
};
var script = document.createElement("script");
script.defer = 1;
script.src =
"https://widget.usersnap.com/global/load/feddb12e-0a8b-45c2-86c1-56f5a9d428f6?onload=onUsersnapLoad";
document.getElementsByTagName("head")[0].appendChild(script);
})();
// HotJar
(function(h,o,t,j,a,r){
h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};
h._hjSettings={hjid:hotjarAppID,hjsv:6};
a=o.getElementsByTagName('head')[0];
r=o.createElement('script');r.async=1;
r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;
a.appendChild(r);
})(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv=');
}
addScripts();