1
0
mirror of https://github.com/uetchy/namae.git synced 2025-08-20 18:08:11 +09:00

feat: add crisp (#7)

* feat: add crisp

* test: add codacy

* fix: coverage
This commit is contained in:
2019-10-24 12:55:09 +09:00
committed by GitHub
parent 664801205c
commit 2fc4d94779
11 changed files with 706 additions and 7 deletions

14
web/src/util/crip.ts Normal file
View File

@@ -0,0 +1,14 @@
interface CrispWindow extends Window {
$crisp: any[];
CRISP_WEBSITE_ID: string;
}
declare var window: CrispWindow;
export function initCrisp() {
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);
}