-
Notifications
You must be signed in to change notification settings - Fork 166
/
plain.js
66 lines (65 loc) · 2.13 KB
/
plain.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
(function(d, script) {
script = d.createElement('script');
script.async = false;
script.onload = function (){
Plain.init({
appId: 'liveChatApp_01JDPPAPQS2V6A8FH59N33PHDY',
links: [
{
icon: 'book',
text: 'View our docs',
url: 'https://nova.laravel.com/docs',
}, {
icon: 'discord',
text: 'Join our Discord',
url: 'https://discord.com/invite/laravel',
}
],
style: {
brandColor: '#00E1FF',
chatButtonColor: '#00E1FF',
chatButtonIconColor: '#ffffff',
},
threadDetails: {
labelTypeIds: ['lt_01JAZTMNYM3EQVS854CK6JKAA9'],
},
theme: 'auto',
position: {
right: '25px',
bottom: '25px',
},
requireAuthentication: true,
chatButtons: [
{
icon: 'chat',
text: 'Ask a question',
threadDetails: {
labelTypeIds: ['lt_01JD7S0WAJGF5215238S62F82V'],
},
},
{
icon: 'bulb',
text: 'Send feedback',
threadDetails: {
labelTypeIds: ['lt_01JD7S1HJ38125D0QGE3FQ8HRT'],
},
},
{
icon: 'error',
text: 'Report an issue',
threadDetails: {
labelTypeIds: ['lt_01JD7S15A3HAD7PM8X8AR4BD9N'],
},
},
],
});
};
script.src = 'https://chat.cdn-plain.com/index.js';
d.getElementsByTagName('head')[0].appendChild(script);
document.querySelector("#navbar ul a[href='mailto:[email protected]']").onclick = function (e) {
if (typeof window.Plain !== 'undefined') {
e.preventDefault();
Plain.open()
}
}
}(document));