Share dialog: new page when no option is selected.
This commit is contained in:
parent
20317f9023
commit
3dcc05bf26
@ -290,22 +290,30 @@ async function shareChatUrl (registerOptions: RegisterClientOptions, settings: a
|
|||||||
let shareStringValue
|
let shareStringValue
|
||||||
let shareStringOpen: string | undefined
|
let shareStringOpen: string | undefined
|
||||||
if (!form.radioProtocolXMPP?.checked) {
|
if (!form.radioProtocolXMPP?.checked) {
|
||||||
shareStringValue = getIframeUri(registerOptions, settings, video, uriOptions)
|
if (form.readonly?.checked || form.autoColors?.checked || form.generateIframe?.checked) {
|
||||||
if (form.generateIframe.checked) {
|
shareStringValue = getIframeUri(registerOptions, settings, video, uriOptions)
|
||||||
form.openButton.disabled = true
|
if (form.generateIframe.checked) {
|
||||||
if (shareStringValue) {
|
form.openButton.disabled = true
|
||||||
// To properly escape all attributes, we are constructing an HTMLIframeElement
|
if (shareStringValue) {
|
||||||
const iframe = document.createElement('iframe')
|
// To properly escape all attributes, we are constructing an HTMLIframeElement
|
||||||
iframe.setAttribute('src', shareStringValue)
|
const iframe = document.createElement('iframe')
|
||||||
iframe.setAttribute('title', labelChatFor + ' ' + video.name)
|
iframe.setAttribute('src', shareStringValue)
|
||||||
iframe.setAttribute('sandbox', 'allow-same-origin allow-scripts allow-popups allow-forms')
|
iframe.setAttribute('title', labelChatFor + ' ' + video.name)
|
||||||
iframe.setAttribute('width', '560')
|
iframe.setAttribute('sandbox', 'allow-same-origin allow-scripts allow-popups allow-forms')
|
||||||
iframe.setAttribute('height', '315')
|
iframe.setAttribute('width', '560')
|
||||||
iframe.setAttribute('frameborder', '0')
|
iframe.setAttribute('height', '315')
|
||||||
shareStringValue = iframe.outerHTML
|
iframe.setAttribute('frameborder', '0')
|
||||||
|
shareStringValue = iframe.outerHTML
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
form.openButton.disabled = false
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
form.openButton.disabled = false
|
shareStringValue = window.location.protocol +
|
||||||
|
'//' +
|
||||||
|
window.location.host +
|
||||||
|
'/p/livechat/room?room=' +
|
||||||
|
encodeURIComponent(video.uuid)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// we must generate a XMPP room address
|
// we must generate a XMPP room address
|
||||||
|
Loading…
x
Reference in New Issue
Block a user