Compare commits

..

4 Commits

Author SHA1 Message Date
d9a14f9d83 Bump version to 1.14.1 2023-08-27 15:04:41 +07:00
18dd006aad Bump version to 1.14.1 2023-08-27 15:04:25 +07:00
f74de11e10 Fix Clarity Boost mode detection 2023-08-27 15:03:24 +07:00
2a71e17d2d Fix the stats selection box not working on mobile 2023-08-27 14:39:35 +07:00
2 changed files with 15 additions and 12 deletions

View File

@ -1,5 +1,5 @@
// ==UserScript== // ==UserScript==
// @name Better xCloud // @name Better xCloud
// @namespace https://github.com/redphx // @namespace https://github.com/redphx
// @version 1.14 // @version 1.14.1
// ==/UserScript== // ==/UserScript==

View File

@ -1,7 +1,7 @@
// ==UserScript== // ==UserScript==
// @name Better xCloud // @name Better xCloud
// @namespace https://github.com/redphx // @namespace https://github.com/redphx
// @version 1.14 // @version 1.14.1
// @description Improve Xbox Cloud Gaming (xCloud) experience // @description Improve Xbox Cloud Gaming (xCloud) experience
// @author redphx // @author redphx
// @license MIT // @license MIT
@ -13,7 +13,7 @@
// ==/UserScript== // ==/UserScript==
'use strict'; 'use strict';
const SCRIPT_VERSION = '1.14'; const SCRIPT_VERSION = '1.14.1';
const SCRIPT_HOME = 'https://github.com/redphx/better-xcloud'; const SCRIPT_HOME = 'https://github.com/redphx/better-xcloud';
console.log(`[Better xCloud] readyState: ${document.readyState}`); console.log(`[Better xCloud] readyState: ${document.readyState}`);
@ -1496,19 +1496,21 @@ class Preferences {
const $option = CE('option', {value: value}, label); const $option = CE('option', {value: value}, label);
$option.selected = currentValue.indexOf(value) > -1; $option.selected = currentValue.indexOf(value) > -1;
$option.addEventListener('mousedown', function(e) {
e.preventDefault();
e.target.selected = !e.target.selected;
const $parent = e.target.parentElement;
$parent.focus();
$parent.dispatchEvent(new Event('change'));
});
$control.appendChild($option); $control.appendChild($option);
} }
$control.addEventListener('mousedown', function(e) { $control.addEventListener('mousedown', e => {
e.preventDefault();
const $this = this; const $this = this;
const orgScrollTop = $this.scrollTop; const orgScrollTop = $this.scrollTop;
e.target.selected = !e.target.selected;
const $parent = e.target.parentElement;
$parent.focus();
$parent.dispatchEvent(new Event('change'));
setTimeout(() => ($this.scrollTop = orgScrollTop), 0); setTimeout(() => ($this.scrollTop = orgScrollTop), 0);
}); });
@ -2943,7 +2945,8 @@ function injectStreamMenuButtons() {
e.preventDefault(); e.preventDefault();
e.stopPropagation(); e.stopPropagation();
if ($STREAM_VIDEO.msVideoProcessing) { const msVideoProcessing = $STREAM_VIDEO.msVideoProcessing;
if (msVideoProcessing && msVideoProcessing !== 'default') {
alert('This feature doesn\'t work when the Clarity Boost mode is ON'); alert('This feature doesn\'t work when the Clarity Boost mode is ON');
return; return;
} }