mirror of
https://github.com/hensm/fx_cast.git
synced 2026-06-11 10:09:59 +00:00
Add custom user agent option
This commit is contained in:
@@ -10,14 +10,20 @@
|
||||
import options, { Options } from "../../lib/options";
|
||||
import defaultOptions from "../../defaultOptions";
|
||||
|
||||
import { getChromeUserAgent } from "../../lib/userAgents";
|
||||
|
||||
const _ = browser.i18n.getMessage;
|
||||
|
||||
let formElement: HTMLFormElement;
|
||||
let isFormValid = true;
|
||||
let showSavedIndicator = false;
|
||||
|
||||
let platform: string;
|
||||
|
||||
let opts: Options | undefined;
|
||||
onMount(async () => {
|
||||
platform = (await browser.runtime.getPlatformInfo()).os;
|
||||
|
||||
opts = await options.getAll();
|
||||
options.addEventListener("changed", async () => {
|
||||
opts = await options.getAll();
|
||||
@@ -277,6 +283,23 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="option">
|
||||
<label class="option__label" for="siteWhitelistCustomUserAgent">
|
||||
{_("optionsSiteWhitelistCustomUserAgent")}
|
||||
</label>
|
||||
<div class="option__control">
|
||||
<input
|
||||
type="text"
|
||||
class="user-agent-string-custom"
|
||||
bind:value={opts.siteWhitelistCustomUserAgent}
|
||||
placeholder={getChromeUserAgent(platform)}
|
||||
/>
|
||||
<div class="option__description">
|
||||
{_("optionsSiteWhitelistCustomUserAgentDescription")}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="option">
|
||||
<div class="option__label">
|
||||
{_("optionsSiteWhitelistContent")}
|
||||
|
||||
Reference in New Issue
Block a user