mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-08-06 05:08:26 +02:00
Refactor Translations
This commit is contained in:
@@ -19,13 +19,12 @@ export class UserAgent {
|
||||
return (window.navigator as any).orgUserAgent || window.navigator.userAgent;
|
||||
}
|
||||
|
||||
static get(profile: string): string {
|
||||
static get(profile: UserAgentProfile): string {
|
||||
const defaultUserAgent = UserAgent.getDefault();
|
||||
if (profile === UserAgentProfile.CUSTOM) {
|
||||
return getPref(PrefKey.USER_AGENT_CUSTOM);
|
||||
}
|
||||
|
||||
// TODO: check type
|
||||
return (UserAgent.#USER_AGENTS as any)[profile] || defaultUserAgent;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user