Created
September 13, 2022 18:38
-
-
Save nathan130200/10f6ad3f885f78da84317d72faf6e834 to your computer and use it in GitHub Desktop.
Xcloud on browser - Set game video to fill browser area.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Fill Xcloud Video Screen | |
// @author FRNathan13 | |
// @match https://www.xbox.com/pt-BR/play/launch/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=xbox.com | |
// @grant none | |
// @version 1.0 | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
var timer = -1; | |
timer = setInterval(() => { | |
try { | |
var arr = [...document.querySelectorAll('video')]; | |
for(let el of arr) { | |
if(el.style && el.style.objectFit) { | |
if(el.style.objectFit != 'fill'){ | |
el.style.objectFit = 'fill'; | |
console.info('[Fill Xcloud Video Screen] Element style set to fill content.'); | |
} | |
} | |
} | |
} | |
catch(e) { | |
// ignore | |
} | |
}, 1000); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment