Skip to content

Commit

Permalink
Don't display the apply permissions button in firefox
Browse files Browse the repository at this point in the history
I hate firefox
  • Loading branch information
kakaroto committed Jun 18, 2022
1 parent 9187ce9 commit 9a98a64
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions src/common/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -1659,7 +1659,17 @@ function createCustomDomainsSetting(name, short) {
const description_p = opt.description.split("\n").map(desc => E.p({}, desc));
for (let p of description_p)
p.classList.add("select");

let apply_button = null;
if (getBrowser() === "Firefox") {
apply_button = E.div({class: "save button-group"},
E.span({}, "You", E.b({}, " must click "), " the Beyond 20 icon from the Firefox toolbar on the VTT page to load the addon")
);
} else {
apply_button = E.div({class: "save button-group"},
E.span({}, "You", E.b({}, " must "), " press Apply to request missing permissions"),
E.button({ class: "beyond20-option-input btn", type: "button"}, "Apply")
);
}
const setting = E.li({
id: "beyond20-option-custom-domains",
class: "list-group-item beyond20-option beyond20-option-text"
Expand All @@ -1670,10 +1680,8 @@ function createCustomDomainsSetting(name, short) {
E.div({},
E.textarea({ id: name, name, class: "beyond20-option-input"}),
),
E.div({class: "save button-group"},
E.span({}, "You", E.b({}, " must "), " press Apply to request missing permissions"),
E.button({ class: "beyond20-option-input btn", type: "button"}, "Apply"),
)
apply_button

)
);
const button = $(setting).find("button");
Expand Down

0 comments on commit 9a98a64

Please sign in to comment.