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();
|
||||
|
||||
// Show the reloading overlay
|
||||
const $elm = createElement('div', {'class': 'bx-reload-overlay'}, __('safari-failed-message'));
|
||||
const css = `
|
||||
.bx-reload-overlay {
|
||||
position: fixed;
|
||||
@ -2705,8 +2704,11 @@ if (ENABLE_SAFARI_WORKAROUND && document.readyState !== 'loading') {
|
||||
font-size: 1.3rem;
|
||||
}
|
||||
`;
|
||||
document.documentElement.appendChild(createElement('style', {}, css));
|
||||
document.documentElement.appendChild($elm);
|
||||
const $fragment = document.createDocumentFragment();
|
||||
$fragment.appendChild(CE('style', {}, css));
|
||||
$fragment.appendChild(CE('div', {'class': 'bx-reload-overlay'}, __('safari-failed-message')));
|
||||
|
||||
document.documentElement.appendChild($fragment);
|
||||
|
||||
// Reload the page
|
||||
window.location.reload(true);
|
||||
|
Loading…
x
Reference in New Issue
Block a user