Тест сокрытия URL строки в браузерах
This commit is contained in:
parent
f17307e5c0
commit
5c5661bef5
@ -5,6 +5,14 @@ const Start = (props) => {
|
||||
const route = props.getValue;
|
||||
const kek = './circle.html'
|
||||
|
||||
function hideAddressBar(){
|
||||
if(document.documentElement.scrollHeight<window.outerHeight/window.devicePixelRatio)
|
||||
document.documentElement.style.height=(window.outerHeight/window.devicePixelRatio)+'px';
|
||||
setTimeout(window.scrollTo(1,1),0);
|
||||
}
|
||||
window.addEventListener("load",function(){hideAddressBar();});
|
||||
window.addEventListener("orientationchange",function(){hideAddressBar();});
|
||||
|
||||
useEffect(() => {
|
||||
const handler = (ev: MessageEvent<{ type: string }>) => {
|
||||
if (typeof ev.data !== 'object') return
|
||||
|
Loading…
x
Reference in New Issue
Block a user