Add periodic user agent string updates

This commit is contained in:
hensm
2025-12-27 02:13:57 +00:00
parent 50851b4831
commit 1f200bef9a
7 changed files with 131 additions and 27 deletions

View File

@@ -10,7 +10,7 @@
import options, { Options } from "../../lib/options";
import defaultOptions from "../../defaultOptions";
import { getChromeUserAgent } from "../../lib/userAgents";
import { getChromeUserAgentString } from "../../lib/userAgents";
const _ = browser.i18n.getMessage;
@@ -23,7 +23,7 @@
let opts: Options | undefined;
onMount(async () => {
const platform = (await browser.runtime.getPlatformInfo()).os;
defaultUserAgent = getChromeUserAgent(platform);
defaultUserAgent = await getChromeUserAgentString(platform);
opts = await options.getAll();
options.addEventListener("changed", async () => {