mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-06 15:47:18 +02:00
Optimize Safari's workaround
This commit is contained in:
parent
6dbc0990cd
commit
780deccae2
@ -2689,7 +2689,6 @@ if (ENABLE_SAFARI_WORKAROUND && document.readyState !== 'loading') {
|
|||||||
window.stop();
|
window.stop();
|
||||||
|
|
||||||
// Show the reloading overlay
|
// Show the reloading overlay
|
||||||
const $elm = createElement('div', {'class': 'bx-reload-overlay'}, __('safari-failed-message'));
|
|
||||||
const css = `
|
const css = `
|
||||||
.bx-reload-overlay {
|
.bx-reload-overlay {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
@ -2705,8 +2704,11 @@ if (ENABLE_SAFARI_WORKAROUND && document.readyState !== 'loading') {
|
|||||||
font-size: 1.3rem;
|
font-size: 1.3rem;
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
document.documentElement.appendChild(createElement('style', {}, css));
|
const $fragment = document.createDocumentFragment();
|
||||||
document.documentElement.appendChild($elm);
|
$fragment.appendChild(CE('style', {}, css));
|
||||||
|
$fragment.appendChild(CE('div', {'class': 'bx-reload-overlay'}, __('safari-failed-message')));
|
||||||
|
|
||||||
|
document.documentElement.appendChild($fragment);
|
||||||
|
|
||||||
// Reload the page
|
// Reload the page
|
||||||
window.location.reload(true);
|
window.location.reload(true);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user