Update polling rate's default text

This commit is contained in:
redphx 2024-10-22 20:47:45 +07:00
parent 540a50fb3a
commit b06dc6e219
3 changed files with 7 additions and 7 deletions

View File

@ -1,7 +1,7 @@
// ==UserScript==
// @name Better xCloud (Lite)
// @namespace https://github.com/redphx
// @version 5.9.0
// @version 5.9.1-beta
// @description Improve Xbox Cloud Gaming (xCloud) experience
// @author redphx
// @license MIT
@ -105,7 +105,7 @@ class UserAgent {
});
}
}
var SCRIPT_VERSION = "5.9.0", SCRIPT_VARIANT = "lite", AppInterface = window.AppInterface;
var SCRIPT_VERSION = "5.9.1-beta", SCRIPT_VARIANT = "lite", AppInterface = window.AppInterface;
UserAgent.init();
var userAgent = window.navigator.userAgent.toLowerCase(), isTv = userAgent.includes("smart-tv") || userAgent.includes("smarttv") || /\baft.*\b/.test(userAgent), isVr = window.navigator.userAgent.includes("VR") && window.navigator.userAgent.includes("OculusBrowser"), browserHasTouchSupport = "ontouchstart" in window || navigator.maxTouchPoints > 0, userAgentHasTouchSupport = !isTv && !isVr && browserHasTouchSupport, supportMkb = AppInterface || !userAgent.match(/(android|iphone|ipad)/), STATES = {
supportedRegion: !0,
@ -1393,7 +1393,7 @@ class GlobalSettingsStorage extends BaseSettingsStore {
customTextValue(value) {
value = parseInt(value);
let text = +(1000 / value).toFixed(2) + " Hz";
if (value === 4) text = `${t("default")} (${text})`;
if (value === 4) text = `${text} (${t("default")})`;
return text;
}
}

View File

@ -1,7 +1,7 @@
// ==UserScript==
// @name Better xCloud
// @namespace https://github.com/redphx
// @version 5.9.0
// @version 5.9.1-beta
// @description Improve Xbox Cloud Gaming (xCloud) experience
// @author redphx
// @license MIT
@ -107,7 +107,7 @@ class UserAgent {
});
}
}
var SCRIPT_VERSION = "5.9.0", SCRIPT_VARIANT = "full", AppInterface = window.AppInterface;
var SCRIPT_VERSION = "5.9.1-beta", SCRIPT_VARIANT = "full", AppInterface = window.AppInterface;
UserAgent.init();
var userAgent = window.navigator.userAgent.toLowerCase(), isTv = userAgent.includes("smart-tv") || userAgent.includes("smarttv") || /\baft.*\b/.test(userAgent), isVr = window.navigator.userAgent.includes("VR") && window.navigator.userAgent.includes("OculusBrowser"), browserHasTouchSupport = "ontouchstart" in window || navigator.maxTouchPoints > 0, userAgentHasTouchSupport = !isTv && !isVr && browserHasTouchSupport, supportMkb = AppInterface || !userAgent.match(/(android|iphone|ipad)/), STATES = {
supportedRegion: !0,
@ -1416,7 +1416,7 @@ class GlobalSettingsStorage extends BaseSettingsStore {
customTextValue(value) {
value = parseInt(value);
let text = +(1000 / value).toFixed(2) + " Hz";
if (value === 4) text = `${t("default")} (${text})`;
if (value === 4) text = `${text} (${t("default")})`;
return text;
}
}

View File

@ -404,7 +404,7 @@ export class GlobalSettingsStorage extends BaseSettingsStorage {
let text = +(1000 / value).toFixed(2) + ' Hz';
if (value === 4) {
text = `${t('default')} (${text})`;
text = `${text} (${t('default')})`;
}
return text;