// //
var ua = window.navigator.userAgent; var ie = ua.indexOf('MSIE ') > 0 || ua.indexOf('Trident/') > 0; var oldEdge = false; var edgeMatch = ua.match(/.*Edge\/(\d+)\.(\d+)/); if (edgeMatch) { var minor = parseInt(edgeMatch[2], 10); oldEdge = minor < 14393; } var oldFirefox = false; var firefoxMatch = ua.match(/Firefox\/(\d+)/); if (firefoxMatch) { var major = parseInt(firefoxMatch[1], 10); oldFirefox = major <= 55; } var oldChrome = false; var chromeMatch = ua.match(/Chrome\/(\d+)/); var botMatch = ua.match(/Googlebot|Google Page Speed Insights/); if (chromeMatch) { var major = parseInt(chromeMatch[1], 10); oldChrome = major <= 58; } // https://msdn.microsoft.com/en-us/library/windows/desktop/ms724834(v=vs.85).aspx // https://www.computerhope.com/jargon/u/useragen.htm#windows var windowsXp = ua.match(/Windows NT (5.1|5.2)/); var windowsVista = ua.match(/Windows NT 6.0/); if (windowsXp || windowsVista) { window.location.href = '/katsomo.fi/vanhentunut-kayttojarjestelma.html'; } else if ((ie || oldEdge || oldFirefox || oldChrome) && !botMatch) { window.location.href = '/katsomo.fi/vanhentunut-selain.html'; }
Loading