Skip to content

Commit d4ddfd5

Browse files
Add common room snippet (#916)
1 parent 109126b commit d4ddfd5

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

docs/.vuepress/config.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,9 @@ export default defineUserConfig({
123123
// Reo.Dev
124124
['script', { src: "/js/reoDev.js"}],
125125

126+
// CommonRoom
127+
['script', { src: "/js/commonRoom.js"}],
128+
126129
// CSS override to hide the modal mask and wrapper entirely
127130
['style', {}, `
128131
.redirect-modal-mask,
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
(function () {
2+
if (typeof window === 'undefined') return;
3+
if (typeof window.signals !== 'undefined') return;
4+
var script = document.createElement('script');
5+
script.src = 'https://cdn.cr-relay.com/v1/site/da9bc552-0721-4931-aae9-9706006d2986/signals.js';
6+
script.async = true;
7+
window.signals = Object.assign(
8+
[],
9+
['page', 'identify', 'form'].reduce(function (acc, method) {
10+
acc[method] = function () {
11+
signals.push([method, arguments]);
12+
return signals;
13+
};
14+
return acc;
15+
}, {})
16+
);
17+
document.head.appendChild(script);
18+
})();

0 commit comments

Comments
 (0)