mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-28 18:31:44 +02:00
Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
458928d615 | |||
20bf2b1ab6 | |||
901f55c683 | |||
15bb18644f | |||
873f6546a4 | |||
1db7d4f8d7 |
17
dist/better-xcloud.lite.user.js
vendored
17
dist/better-xcloud.lite.user.js
vendored
File diff suppressed because one or more lines are too long
2
dist/better-xcloud.meta.js
vendored
2
dist/better-xcloud.meta.js
vendored
@ -1,5 +1,5 @@
|
||||
// ==UserScript==
|
||||
// @name Better xCloud
|
||||
// @namespace https://github.com/redphx
|
||||
// @version 6.0.5
|
||||
// @version 6.0.6
|
||||
// ==/UserScript==
|
||||
|
33
dist/better-xcloud.user.js
vendored
33
dist/better-xcloud.user.js
vendored
File diff suppressed because one or more lines are too long
@ -194,7 +194,7 @@ div[class*=SupportedInputsBadge] {
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 1;
|
||||
background: #0000008c;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
display: flex;
|
||||
border-radius: 4px 0 4px 0;
|
||||
align-items: center;
|
||||
@ -214,6 +214,18 @@ div[class*=SupportedInputsBadge] {
|
||||
font-weight: bold;
|
||||
margin-left: 2px;
|
||||
}
|
||||
|
||||
&[data-duration=short] {
|
||||
background-color: rgba(0, 133, 133, 0.75);
|
||||
}
|
||||
|
||||
&[data-duration=medium] {
|
||||
background-color: rgba(213, 133, 0, 0.75);
|
||||
}
|
||||
|
||||
&[data-duration=long] {
|
||||
background-color: rgba(150, 0, 0, 0.75);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -440,7 +440,9 @@ export class EmulatedMkbHandler extends MkbHandler {
|
||||
}
|
||||
|
||||
if (this.enabled) {
|
||||
document.body.requestPointerLock();
|
||||
document.body.requestPointerLock({
|
||||
unadjustedMovement: true,
|
||||
});
|
||||
} else {
|
||||
document.pointerLockElement && document.exitPointerLock();
|
||||
}
|
||||
|
@ -835,9 +835,9 @@ if (this.baseStorageKey in window.BX_EXPOSED.overrideSettings) {
|
||||
return str;
|
||||
},
|
||||
|
||||
// 24225.js#4127, 24.17.11
|
||||
patchSetCurrentlyFocusedInteractable(str: string) {
|
||||
let index = str.indexOf('.setCurrentlyFocusedInteractable=(');
|
||||
// 49851.js#4083, 27.0.4
|
||||
patchSetCurrentFocus(str: string) {
|
||||
let index = str.indexOf('.setCurrentFocus=(');
|
||||
if (index < 0) {
|
||||
return false;
|
||||
}
|
||||
@ -1017,7 +1017,7 @@ let PATCH_ORDERS = PatcherUtils.filterPatches([
|
||||
|
||||
'supportLocalCoOp',
|
||||
'overrideStorageGetSettings',
|
||||
getPref(PrefKey.UI_GAME_CARD_SHOW_WAIT_TIME) && 'patchSetCurrentlyFocusedInteractable',
|
||||
getPref(PrefKey.UI_GAME_CARD_SHOW_WAIT_TIME) && 'patchSetCurrentFocus',
|
||||
|
||||
getPref<UiLayout>(PrefKey.UI_LAYOUT) !== UiLayout.DEFAULT && 'websiteLayout',
|
||||
getPref(PrefKey.GAME_FORTNITE_FORCE_CONSOLE) && 'forceFortniteConsole',
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { BxEvent } from "@/utils/bx-event";
|
||||
import { BxIcon } from "@/utils/bx-icon";
|
||||
import { CE, createSvgIcon, getReactProps, isElementVisible, secondsToHms } from "@/utils/html";
|
||||
import { CE, createSvgIcon, getReactProps, isElementVisible, secondsToHm } from "@/utils/html";
|
||||
import { XcloudApi } from "@/utils/xcloud-api";
|
||||
|
||||
interface GameTimeElement extends HTMLElement {
|
||||
@ -30,8 +30,14 @@ export class GameTile {
|
||||
if (typeof totalWaitTime === 'number' && isElementVisible($elm)) {
|
||||
const $div = CE('div', { class: 'bx-game-tile-wait-time' },
|
||||
createSvgIcon(BxIcon.PLAYTIME),
|
||||
CE('span', {}, secondsToHms(totalWaitTime)),
|
||||
CE('span', {}, totalWaitTime < 60 ? totalWaitTime + 's' : secondsToHm(totalWaitTime)),
|
||||
);
|
||||
|
||||
const duration = (totalWaitTime >= 15 * 60) ? 'long' : (totalWaitTime >= 10 * 60) ? 'medium' : (totalWaitTime >= 5 * 60 ) ? 'short' : '';
|
||||
if (duration) {
|
||||
$div.dataset.duration = duration;
|
||||
}
|
||||
|
||||
$elm.insertAdjacentElement('afterbegin', $div);
|
||||
}
|
||||
}
|
||||
|
@ -54,7 +54,7 @@ export namespace BxEvent {
|
||||
target.dispatchEvent(event);
|
||||
AppInterface && AppInterface.onEvent(eventName);
|
||||
|
||||
BX_FLAGS.Debug && BxLogger.warning('BxEvent', 'dispatch', eventName, data);
|
||||
BX_FLAGS.Debug && BxLogger.warning('BxEvent', 'dispatch', target, eventName, data);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -8,6 +8,7 @@ export let FeatureGates: { [key: string]: boolean } = {
|
||||
EnableWifiWarnings: false,
|
||||
EnableUpdateRequiredPage: false,
|
||||
ShowForcedUpdateScreen: false,
|
||||
EnableTakControlResizing: true, // Experimenting
|
||||
};
|
||||
|
||||
// Enable Native Mouse & Keyboard
|
||||
|
@ -114,6 +114,7 @@ export class BxNumberStepper extends HTMLInputElement implements BxHtmlSettingEl
|
||||
self.$range = $range;
|
||||
options.hideSlider && $range.classList.add('bx-gone');
|
||||
|
||||
$range.addEventListener('input', self.onRangeInput);
|
||||
self.addEventListener('input', self.onRangeInput);
|
||||
self.appendChild($range);
|
||||
|
||||
|
Reference in New Issue
Block a user