From a42a54670b7e9644f57708ed9352663ccc57acaf Mon Sep 17 00:00:00 2001 From: Danny Coates Date: Fri, 28 Jul 2017 16:13:45 -0700 Subject: [PATCH] redirect ie to /unsupported --- views/jsconfig.handlebars | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/views/jsconfig.handlebars b/views/jsconfig.handlebars index c9ddf16d..3dbe827c 100644 --- a/views/jsconfig.handlebars +++ b/views/jsconfig.handlebars @@ -1,8 +1,15 @@ +{{!-- This file should be es5 only --}} +var isIE = /trident\/7\.|msie/i.test(navigator.userAgent); +var isUnsupportedPage = /\/unsupported/.test(location.pathname); +if (isIE && !isUnsupportedPage) { + window.location.replace('/unsupported/ie'); +} + {{#if dsn}} window.dsn = '{{{dsn}}}'; {{/if}} {{#if trackerId}} window.trackerId = '{{{trackerId}}}'; {{/if}} -const MAXFILESIZE = {{{maxFileSize}}}; -const EXPIRE_SECONDS = {{{expireSeconds}}}; +var MAXFILESIZE = {{{maxFileSize}}}; +var EXPIRE_SECONDS = {{{expireSeconds}}};