Chat Federation: using S2S if available.
* if both local and remote instance have external XMPP connections enabled, the user joins the remote room with his local account * some code refactoring (builtin.ts) Note: documentation and settings descriptions are to do. Related to #112
This commit is contained in:
25
conversejs/lib/dom.ts
Normal file
25
conversejs/lib/dom.ts
Normal file
@ -0,0 +1,25 @@
|
||||
import type { InitConverseParams } from './types'
|
||||
|
||||
function initDom ({ forceReadonly, transparent }: InitConverseParams, isInIframe: boolean): void {
|
||||
const body = document.querySelector('body')
|
||||
if (isInIframe) {
|
||||
if (body) {
|
||||
body.classList.add('livechat-iframe')
|
||||
// prevent horizontal scrollbar when in iframe. (don't know why, but does not work if done by CSS)
|
||||
body.style.overflowX = 'hidden'
|
||||
}
|
||||
}
|
||||
if (forceReadonly) {
|
||||
body?.classList.add('livechat-readonly')
|
||||
if (forceReadonly === 'noscroll') {
|
||||
body?.classList.add('livechat-noscroll')
|
||||
}
|
||||
}
|
||||
if (transparent) {
|
||||
body?.classList.add('livechat-transparent')
|
||||
}
|
||||
}
|
||||
|
||||
export {
|
||||
initDom
|
||||
}
|
Reference in New Issue
Block a user