This commit is contained in:
thednp 2016-11-26 19:00:32 +02:00
parent a92a45f77f
commit 1a44fbe465

View file

@ -8,6 +8,11 @@ var mobileType = '',
mobileType += checkW ? 'Windows Phones.' : '';
return checkW;
},
Chrome: function() {
var checkC = /Chrome/i.test(navigator.userAgent);
// mobileType += checkC ? 'Android Phones.' : '';
return checkC;
},
Android: function() {
var checkA = /Android/i.test(navigator.userAgent);
mobileType += checkA ? 'Android Phones.' : '';
@ -26,13 +31,14 @@ var mobileType = '',
any: function() {
return ( isMobile.Android() || isMobile.BlackBerry() || isMobile.iOS() || isMobile.Windows());
}
};
},
checkMOBS = isMobile.any();
// protect older / low end devices
if (document.body.offsetWidth < 1200 || isMobile.any()) {
if (document.body.offsetWidth < 1200 || checkMOBS) {
var explain = '';
explain += mobileType !== '' ? 'For safety reasons, this page does not work with ' + mobileType : '';
explain += document.body.offsetWidth < 1200 && mobileType === '' ? 'For safety reasons this page does not work on your machine because it might be very old. In other cases the browser window size is not enough for the animation to work properly, so if that\'s the case, maximize the window, refresh and proceed with the tests.' : '';
explain += checkMOBS && mobileType !== '' ? ('For safety reasons, this page does not work with ' + mobileType) : '';
explain += !checkMOBS && document.body.offsetWidth < 1200 && mobileType === '' ? 'For safety reasons this page does not work on your machine because it might be very old. In other cases the browser window size is not enough for the animation to work properly, so if that\'s the case, maximize the window, refresh and proceed with the tests.' : '';
var warning = '<div style="padding: 20px;">';
warning +='<h1 class="text-danger">Warning!</h1>';
warning +='<p class="lead text-danger">This web page is only for high-end desktop computers.</p>';