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:
14
web/src/util/crip.ts
Normal file
14
web/src/util/crip.ts
Normal 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);
|
||||
}
|
Reference in New Issue
Block a user