diff --git a/works/Danja Vasiliev/otastaImg/data/index.html b/works/Danja Vasiliev/otastaImg/data/index.html index 2a9b2c5..3c0dcbb 100644 --- a/works/Danja Vasiliev/otastaImg/data/index.html +++ b/works/Danja Vasiliev/otastaImg/data/index.html @@ -189,7 +189,7 @@
@@ -324,7 +324,7 @@ var th_handles = function(e) { }; -if(window.DeviceOrientationEvent) { +if(window.DeviceOrientationEvent && iOS()==false) { window.addEventListener('deviceorientation', do_handles); @@ -339,7 +339,19 @@ if(window.DeviceOrientationEvent) { } - +//detect ios +function iOS() { + return [ + 'iPad Simulator', + 'iPhone Simulator', + 'iPod Simulator', + 'iPad', + 'iPhone', + 'iPod' + ].includes(navigator.platform) + // iPad on iOS 13 detection + || (navigator.userAgent.includes("Mac") && "ontouchend" in document) +}