diff options
author | amzrk2 | 2020-05-28 10:38:41 +0800 |
---|---|---|
committer | amzrk2 | 2020-05-28 10:38:41 +0800 |
commit | acc5ec346a8d5bf0b7fd96ea0d7bfe89731c7fe2 (patch) | |
tree | 40c4229a7d8e61bfe0d0032688f2d3e02aa9d8c2 /layouts/partials/scripts-front.html | |
parent | 280f80713158dd2c1c7f33069e2da7c21f740559 (diff) | |
download | hugo-theme-fuji-acc5ec346a8d5bf0b7fd96ea0d7bfe89731c7fe2.tar.gz hugo-theme-fuji-acc5ec346a8d5bf0b7fd96ea0d7bfe89731c7fe2.tar.bz2 hugo-theme-fuji-acc5ec346a8d5bf0b7fd96ea0d7bfe89731c7fe2.zip |
ie
Diffstat (limited to 'layouts/partials/scripts-front.html')
-rw-r--r-- | layouts/partials/scripts-front.html | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/layouts/partials/scripts-front.html b/layouts/partials/scripts-front.html index 9fa99b6..59c3bb0 100644 --- a/layouts/partials/scripts-front.html +++ b/layouts/partials/scripts-front.html @@ -15,4 +15,19 @@ } else { localStorage.setItem('fuji_theme', $('body').attr('data-theme')); } +</script> +<script data-cfasync="false"> + // ie + var ua = window.navigator.userAgent; + + function browserDetection() { + if (ua.indexOf('MSIE ') > 0 || ua.indexOf('Trident/') > 0 || ua.indexOf('Edge/') > 0) { + return true; + } + return false; + } + + if (browserDetection()) { + window.location.href('{{ "/ie/" | absURL }}'); + } </script>
\ No newline at end of file |