summaryrefslogtreecommitdiffstats
path: root/layouts/partials/scripts-front.html
diff options
context:
space:
mode:
authorDSRKafuU2020-06-13 00:45:30 +0800
committerGitHub2020-06-13 00:45:30 +0800
commit1a9b75fa6216334d0a9a1c379dba212888ce6f76 (patch)
tree7c2790788da7b3fd41a8775b058b62cff581be5f /layouts/partials/scripts-front.html
parent1d734cd6b1566f5b99e3aafa389b0ff2f847b52c (diff)
parentd6a2a5d08804ce712185a41229d531a96d03fe95 (diff)
downloadhugo-theme-fuji-1a9b75fa6216334d0a9a1c379dba212888ce6f76.tar.gz
hugo-theme-fuji-1a9b75fa6216334d0a9a1c379dba212888ce6f76.tar.bz2
hugo-theme-fuji-1a9b75fa6216334d0a9a1c379dba212888ce6f76.zip
Merge pull request #29 from amzrk2/dev
Release v2.0.1
Diffstat (limited to 'layouts/partials/scripts-front.html')
-rw-r--r--layouts/partials/scripts-front.html9
1 files changed, 4 insertions, 5 deletions
diff --git a/layouts/partials/scripts-front.html b/layouts/partials/scripts-front.html
index c516aad..6b4d78b 100644
--- a/layouts/partials/scripts-front.html
+++ b/layouts/partials/scripts-front.html
@@ -13,16 +13,15 @@
</script>
<script data-cfasync="false">
// ie detection
- var ua = window.navigator.userAgent;
-
- function browserDetection() {
- if (ua.indexOf('MSIE ') > 0 || ua.indexOf('Trident/') > 0 || ua.indexOf('Edge/') > 0) {
+ function browserDetection(ua) {
+ if (ua.indexOf('MSIE ') > 0 || ua.indexOf('Trident/') > 0) {
return true;
}
return false;
}
- if (browserDetection()) {
+ var ua = window.navigator.userAgent;
+ if (browserDetection(ua)) {
window.location.href('{{ "/ie/" | absURL }}');
}
</script> \ No newline at end of file