mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-12-21 06:27:00 +01: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