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

15 lines
410 B
TypeScript
Raw Normal View History

interface CrispWindow extends Window {
2020-08-20 00:57:33 +09:00
$crisp: unknown[]
CRISP_WEBSITE_ID: string
}
2020-08-20 00:57:33 +09:00
declare let window: CrispWindow
2019-12-24 01:57:07 +09:00
export function initCrisp(): void {
2020-08-20 00:57:33 +09:00
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)
}