Skip to content

Commit 04b3569

Browse files
committed
fix: Qualtrics on staging env not showing
1 parent b5902e6 commit 04b3569

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

biome.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@
2424
"**/highlight.css",
2525
"**/*-overrides.css",
2626

27-
"exampleSite"
27+
"exampleSite",
28+
"public/*",
29+
"test-results/*"
2830
]
2931
},
3032
"formatter": {

layouts/partials/qualtrics-feedback.html

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,17 +47,23 @@
4747
a.src=g;
4848
document.body&&document.body.appendChild(a)
4949
}
50-
};
51-
50+
};
51+
5252
this.start=function(){
5353
var t=this;
5454
"complete"!==document.readyState?window.addEventListener ?
5555
window.addEventListener("load",function(){t.go()},!1) :
56-
window.attachEvent&&window.attachEvent("onload",function(){t.go()}):t.go()};};
57-
try{
58-
(new g(100,"r","QSI_S_ZN_2QSTn2r41YlXrYk","https://zn2qstn2r41ylxryk-f5.siteintercept.qualtrics.com/SIE/?Q_ZID=ZN_2QSTn2r41YlXrYk")).start()
59-
}
60-
catch(i){}})();
56+
window.attachEvent&&window.attachEvent("onload",function(){t.go()}):t.go()};
57+
};
58+
59+
try{
60+
(new g(100,"r", window.location.hostname.includes("staging") ? "QSI_S_ZN_2YG73ads2zp5bN0" : "QSI_S_ZN_2QSTn2r41YlXrYk", window.location.hostname.includes("staging") ? "https://zn2yg73ads2zp5bn0-f5.siteintercept.qualtrics.com/SIE/?Q_ZID=ZN_2YG73ads2zp5bN0" : "https://zn2qstn2r41ylxryk-f5.siteintercept.qualtrics.com/SIE/?Q_ZID=ZN_2QSTn2r41YlXrYk")).start()
61+
}
62+
catch(i){}})();
63+
64+
document.addEventListener("DOMContentLoaded", function () {
65+
document.querySelector(".qualtrics-feedback").id = window.location.hostname.includes("staging") ? "ZN_2YG73ads2zp5bN0" : "ZN_2QSTn2r41YlXrYk"
66+
});
6167
</script>
6268
<hr>
6369
<div style="height: 60px;"></div>

0 commit comments

Comments
 (0)