1
0
mirror of https://github.com/uetchy/namae.git synced 2025-07-03 14:50:03 +09:00
namae/src/util/crisp.ts
2020-07-29 14:39:03 +09:00

15 lines
419 B
TypeScript

interface CrispWindow extends Window {
$crisp: unknown[];
CRISP_WEBSITE_ID: string;
}
declare let window: CrispWindow;
export function initCrisp(): void {
window.$crisp = [];
window.CRISP_WEBSITE_ID = '92b2e096-6892-47dc-bf4a-057bad52d82e';
const s = document.createElement('script');
s.src = 'https://client.crisp.chat/l.js';
s.async = true;
document.getElementsByTagName('head')[0].appendChild(s);
}