
var iOS = navigator.userAgent.indexOf('iOS');
var ipad = navigator.userAgent.indexOf('iPad');
var android = navigator.userAgent.indexOf('Android');
var screen_size = [ Number(window.screen.width), Number(window.screen.height) ];
var screen_max = Math.max(... screen_size);

if (screen_max > 1024 && ipad == -1 && iOS == -1 && android == -1) { console.log('ok'); }
else {
  alert("Sorry but this study does not work on small screens or mobile devices. Please use a desktop computer!");
  window.location = 'http://prolific.ac/';
}