Тест сокрытия URL строки в браузерах
All checks were successful
Create and publish a Docker image / Publish image (push) Successful in 51s
Create and publish a Docker image / Deploy image (push) Successful in 4s

This commit is contained in:
Sergey Karmanov 2023-08-26 14:23:06 +03:00
parent f17307e5c0
commit 5c5661bef5
Signed by: serega404
GPG Key ID: B6AD49C8C835460C

View File

@ -5,6 +5,14 @@ const Start = (props) => {
const route = props.getValue; const route = props.getValue;
const kek = './circle.html' 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(() => { useEffect(() => {
const handler = (ev: MessageEvent<{ type: string }>) => { const handler = (ev: MessageEvent<{ type: string }>) => {
if (typeof ev.data !== 'object') return if (typeof ev.data !== 'object') return