mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-30 11:21:43 +02:00
Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
d9a14f9d83 | |||
18dd006aad | |||
f74de11e10 | |||
2a71e17d2d |
@ -1,5 +1,5 @@
|
||||
// ==UserScript==
|
||||
// @name Better xCloud
|
||||
// @namespace https://github.com/redphx
|
||||
// @version 1.14
|
||||
// @version 1.14.1
|
||||
// ==/UserScript==
|
||||
|
@ -1,7 +1,7 @@
|
||||
// ==UserScript==
|
||||
// @name Better xCloud
|
||||
// @namespace https://github.com/redphx
|
||||
// @version 1.14
|
||||
// @version 1.14.1
|
||||
// @description Improve Xbox Cloud Gaming (xCloud) experience
|
||||
// @author redphx
|
||||
// @license MIT
|
||||
@ -13,7 +13,7 @@
|
||||
// ==/UserScript==
|
||||
'use strict';
|
||||
|
||||
const SCRIPT_VERSION = '1.14';
|
||||
const SCRIPT_VERSION = '1.14.1';
|
||||
const SCRIPT_HOME = 'https://github.com/redphx/better-xcloud';
|
||||
|
||||
console.log(`[Better xCloud] readyState: ${document.readyState}`);
|
||||
@ -1496,19 +1496,21 @@ class Preferences {
|
||||
const $option = CE('option', {value: value}, label);
|
||||
$option.selected = currentValue.indexOf(value) > -1;
|
||||
|
||||
$control.appendChild($option);
|
||||
}
|
||||
|
||||
$control.addEventListener('mousedown', function(e) {
|
||||
$option.addEventListener('mousedown', function(e) {
|
||||
e.preventDefault();
|
||||
const $this = this;
|
||||
const orgScrollTop = $this.scrollTop;
|
||||
e.target.selected = !e.target.selected;
|
||||
|
||||
const $parent = e.target.parentElement;
|
||||
$parent.focus();
|
||||
$parent.dispatchEvent(new Event('change'));
|
||||
});
|
||||
|
||||
$control.appendChild($option);
|
||||
}
|
||||
|
||||
$control.addEventListener('mousedown', e => {
|
||||
const $this = this;
|
||||
const orgScrollTop = $this.scrollTop;
|
||||
setTimeout(() => ($this.scrollTop = orgScrollTop), 0);
|
||||
});
|
||||
|
||||
@ -2943,7 +2945,8 @@ function injectStreamMenuButtons() {
|
||||
e.preventDefault();
|
||||
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');
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user