scripts/htdocs/www/js/errorpages/scale.fix.js
casjay 9b376b0fd6
🦈🏠🐜 Initial Commit 🐜🦈🏠
2023-04-06 19:28:01 -04:00

21 lines
562 B
JavaScript

var metas = document.getElementsByTagName('meta');
var i;
if (navigator.userAgent.match(/iPhone/i)) {
for (i = 0; i < metas.length; i++) {
if (metas[i].name == 'viewport') {
metas[i].content =
'width=device-width, minimum-scale=1.0, maximum-scale=1.0';
}
}
document.addEventListener('gesturestart', gestureStart, false);
}
function gestureStart() {
for (i = 0; i < metas.length; i++) {
if (metas[i].name == 'viewport') {
metas[i].content =
'width=device-width, minimum-scale=0.25, maximum-scale=1.6';
}
}
}