mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-04-17 04:40:53 +08:00
28 lines
694 B
Plaintext
28 lines
694 B
Plaintext
//- https://sidecar.gitter.im/
|
|
script.
|
|
var isChatBtn = !{theme.chat_btn}
|
|
|
|
if (isChatBtn) {
|
|
((window.gitter = {}).chat = {}).options = {
|
|
room: '#{theme.gitter.room}',
|
|
activationElement: '#chat_btn'
|
|
};
|
|
} else {
|
|
((window.gitter = {}).chat = {}).options = {
|
|
room: '#{theme.gitter.room}',
|
|
};
|
|
|
|
if (!{theme.chat_hide_show}) {
|
|
var gitterBtn = document.getElementsByClassName('gitter-open-chat-button')
|
|
|
|
function chatBtnHide () {
|
|
gitterBtn[0].style.display= 'none'
|
|
}
|
|
|
|
function chatBtnShow () {
|
|
gitterBtn[0].style.display= 'block'
|
|
}
|
|
}
|
|
}
|
|
|
|
script(src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer) |