Fixed bug in RedirectType in settings
This commit is contained in:
parent
e3474b4b96
commit
ec1b517639
|
@ -41,19 +41,22 @@ async function changeFrontendsSettings(service) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (config.services[service].frontends[divs[service].frontend.value].embeddable) {
|
if (document.getElementById(`${service}-redirectType`)) {
|
||||||
document.getElementById(`${service}-redirectType`).innerHTML = `
|
const frontend = options[service].frontend ?? Object.keys(config.services[service].frontends)[0]
|
||||||
<option value="both" data-localise="__MSG_both__">both</options>
|
if (config.services[service].frontends[frontend].embeddable) {
|
||||||
<option value="sub_frame" data-localise="__MSG_onlyEmbedded__">Only Embedded</option>
|
document.getElementById(`${service}-redirectType`).innerHTML = `
|
||||||
<option value="main_frame" data-localise="__MSG_onlyNotEmbedded__">Only Not Embedded</option>
|
<option value="both" data-localise="__MSG_both__">both</options>
|
||||||
`
|
<option value="sub_frame" data-localise="__MSG_onlyEmbedded__">Only Embedded</option>
|
||||||
document.getElementById(`${service}-redirectType`).value = options[divs[service].frontend.value].redirectType = options[service].redirectType
|
<option value="main_frame" data-localise="__MSG_onlyNotEmbedded__">Only Not Embedded</option>
|
||||||
} else {
|
`
|
||||||
document.getElementById(`${service}-redirectType`).innerHTML = `
|
document.getElementById(`${service}-redirectType`).value = options[frontend].redirectType = options[service].redirectType
|
||||||
<option value="main_frame" data-localise="__MSG_onlyNotEmbedded__">Only Not Embedded</option>
|
} else {
|
||||||
`
|
document.getElementById(`${service}-redirectType`).innerHTML = `
|
||||||
options[service].redirectType = "main_frame"
|
<option value="main_frame" data-localise="__MSG_onlyNotEmbedded__">Only Not Embedded</option>
|
||||||
browser.storage.local.set({ options })
|
`
|
||||||
|
options[service].redirectType = "main_frame"
|
||||||
|
browser.storage.local.set({ options })
|
||||||
|
}
|
||||||
}
|
}
|
||||||
const frontend_name_element = document.getElementById(`${service}_page`).getElementsByClassName("frontend_name")[0]
|
const frontend_name_element = document.getElementById(`${service}_page`).getElementsByClassName("frontend_name")[0]
|
||||||
if (divs[service].frontend) {
|
if (divs[service].frontend) {
|
||||||
|
|
Loading…
Reference in New Issue