⚡ Improved the comments plug-in load function, close #12
This commit is contained in:
19
static/js/third-party/chat/chatra.js
vendored
Normal file
19
static/js/third-party/chat/chatra.js
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
/* global CONFIG, Chatra */
|
||||
|
||||
(function() {
|
||||
if (CONFIG.chatra.embed) {
|
||||
window.ChatraSetup = {
|
||||
mode : 'frame',
|
||||
injectTo: CONFIG.chatra.embed
|
||||
};
|
||||
}
|
||||
|
||||
window.ChatraID = CONFIG.chatra.id;
|
||||
|
||||
const chatButton = document.querySelector('.sidebar-button button');
|
||||
if (chatButton) {
|
||||
chatButton.addEventListener('click', () => {
|
||||
Chatra('openChat', true);
|
||||
});
|
||||
}
|
||||
})();
|
||||
5
static/js/third-party/chat/gitter.js
vendored
Normal file
5
static/js/third-party/chat/gitter.js
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
/* global CONFIG */
|
||||
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: CONFIG.gitter.room
|
||||
};
|
||||
10
static/js/third-party/chat/tidio.js
vendored
Normal file
10
static/js/third-party/chat/tidio.js
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
/* global tidioChatApi */
|
||||
|
||||
(function() {
|
||||
const chatButton = document.querySelector('.sidebar-button button');
|
||||
if (chatButton) {
|
||||
chatButton.addEventListener('click', () => {
|
||||
tidioChatApi.open();
|
||||
});
|
||||
}
|
||||
})();
|
||||
Reference in New Issue
Block a user