Fix unsupported page display (#4251)
This commit is contained in:
parent
9e9c9bd672
commit
6146cf3a1b
@ -27,7 +27,21 @@ function compatTest() {
|
|||||||
console.warn('Intl.DisplayNames', hasDisplayNames);
|
console.warn('Intl.DisplayNames', hasDisplayNames);
|
||||||
}
|
}
|
||||||
|
|
||||||
document.body.innerHTML = '<iframe src="./unsupported.html" width="100%" height="100%">';
|
// Hardcoded page because server forbids iframe embedding
|
||||||
|
document.title = 'Unsupported Browser';
|
||||||
|
document.body.setAttribute('style', 'height: 100%; margin: 0; font-family: Arial, Helvetica, sans-serif;');
|
||||||
|
document.body.innerHTML = '<table style="width:100%;height:100%;border-collapse:collapse"><tr><td style="vertical-align:middle;text-align:center"><div style="display:inline-block"><img src=./unsupported.png><h3>Your browser is not supported</h3><p>Please, update it or use our <a href="http://telegram.org/dl" target="_blank">native clients</a>.</p><a id="ignore" href="#">I\'m Feeling Lucky</a></div></table>';
|
||||||
|
|
||||||
|
if (!window.ignore) return;
|
||||||
|
if (!window.ignore.addEventListener) {
|
||||||
|
window.ignore.style.display = 'none';
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
window.ignore.addEventListener('click', function() {
|
||||||
|
window.localStorage.setItem('tt-ignore-compat', '1');
|
||||||
|
window.location.reload();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
compatTest();
|
compatTest();
|
||||||
|
|||||||
@ -1,38 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html style="height: 100%">
|
|
||||||
<head>
|
|
||||||
<title>Unsupported browser</title>
|
|
||||||
<style>
|
|
||||||
body {
|
|
||||||
font-family: Arial, Helvetica, sans-serif;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<!--[if IE]>
|
|
||||||
<style>
|
|
||||||
.hide-for-ie {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<![endif]-->
|
|
||||||
</head>
|
|
||||||
<body style="height: 100%; margin: 0;">
|
|
||||||
<table style="width: 100%; height: 100%; border-collapse: collapse;">
|
|
||||||
<tr>
|
|
||||||
<td style="vertical-align: middle; text-align: center;">
|
|
||||||
<div style="display: inline-block;">
|
|
||||||
<img src="./unsupported.png">
|
|
||||||
<h3>Your browser is not supported</h3>
|
|
||||||
<p>Please, update it or use our <a href="http://telegram.org/dl" target="_blank">native clients</a>.</p>
|
|
||||||
<a class="hide-for-ie" onclick="forceLoad()" href="#">I'm Feeling Lucky</a>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<script>
|
|
||||||
function forceLoad() {
|
|
||||||
window.localStorage.setItem('tt-ignore-compat', true);
|
|
||||||
window.top.location.reload();
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
Loading…
x
Reference in New Issue
Block a user