mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-30 03:11:43 +02:00
Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
d9a14f9d83 | |||
18dd006aad | |||
f74de11e10 | |||
2a71e17d2d |
@ -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==
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user