aboutsummaryrefslogtreecommitdiffstats
path: root/src/pages/options/widgets
diff options
context:
space:
mode:
authorBobIsMyManager <bimmgitsignature.nly8m@simplelogin.co>2022-07-28 17:30:38 +0100
committerBobIsMyManager <bimmgitsignature.nly8m@simplelogin.co>2022-07-28 17:30:38 +0100
commit29295b82373f5ccdeee79afe70b7f21288c5c129 (patch)
tree02ffe5f52c449e73ca30d5e00705701d9f7f46b7 /src/pages/options/widgets
parentFallback on codeberg for instance fetching (diff)
downloadlibredirect-29295b82373f5ccdeee79afe70b7f21288c5c129.zip
Added lbry embeds and codeberg issue templates
Diffstat (limited to 'src/pages/options/widgets')
-rw-r--r--src/pages/options/widgets/lbry.js5
-rw-r--r--src/pages/options/widgets/lbry.pug7
2 files changed, 11 insertions, 1 deletions
diff --git a/src/pages/options/widgets/lbry.js b/src/pages/options/widgets/lbry.js
index 76e212cb..d50de843 100644
--- a/src/pages/options/widgets/lbry.js
+++ b/src/pages/options/widgets/lbry.js
@@ -5,6 +5,7 @@ const protocols = new Array("normal", "tor", "i2p", "loki")
const enable = document.getElementById("lbry-enable")
const lbry = document.getElementById("lbry_page")
+const redirectType = document.getElementById("lbry-redirect_type")
const frontend = document.getElementById("lbry-frontend")
let protocol
@@ -33,9 +34,10 @@ function changeProtocolSettings() {
}
}
-browser.storage.local.get(["disableLbryTargets", "protocol", "lbryFrontend"], r => {
+browser.storage.local.get(["disableLbryTargets", "protocol", "lbryFrontend", "lbryRedirectType"], r => {
enable.checked = !r.disableLbryTargets
protocol = r.protocol
+ redirectType.value = r.lbryRedirectType
frontend.value = r.lbryFrontend
changeFrontendsSettings()
changeProtocolSettings()
@@ -44,6 +46,7 @@ browser.storage.local.get(["disableLbryTargets", "protocol", "lbryFrontend"], r
lbry.addEventListener("change", () => {
browser.storage.local.set({
disableLbryTargets: !enable.checked,
+ lbryRedirectType: redirectType.value,
lbryFrontend: frontend.value,
})
changeFrontendsSettings()
diff --git a/src/pages/options/widgets/lbry.pug b/src/pages/options/widgets/lbry.pug
index 678b87d9..e4278438 100644
--- a/src/pages/options/widgets/lbry.pug
+++ b/src/pages/options/widgets/lbry.pug
@@ -12,6 +12,13 @@ section#lbry_page.option-block
option(value="librarian") Librarian
option(value="lbryDesktop" data-localise="__MSG_lbryDesktop__") LBRY Desktop
+ .some-block.option-block
+ h4(data-localise="__MSG_redirectType__") Redirect Type
+ select#lbry-redirect_type
+ option(value="both" data-localise="__MSG_both__") both
+ option(value="sub_frame" data-localise="__MSG_onlyEmbedded__") Only Embedded
+ option(value="main_frame" data-localise="__MSG_onlyNotEmbedded__") Only Not Embedded
+
#librarian
hr
.normal