1.0.0 • Published 4 years ago
nuxt-detect-ie v1.0.0
nuxt-detect-ie
npm i nuxt-detect-ie
Simple
// nuxt.config.js
modules: [
'nuxt-detect-ie'
]
With options
// nuxt.config.js
modules: [
['nuxt-detect-ie', {
// default options
redirect: '/please-use-a-modern-browser.html',
redirectToEdge: false,
title: 'Unsupported browser',
text: "This website doesn't work in Internet Explorer.<br>...",
backgroundColor: '#fff',
textColor: '#fff',
modalBackground: '#1749dc'
}]
]
🔧 Options
option | default | info |
---|---|---|
redirect | /please-use-a-modern-browser.html | Set to false to disable redirect - then you'll be able to check if the browser is Internet Explorer with $isIETo add a custom page you need to create an HTML file in the static folder(example: /custom-page.html) |
redirectToEdge | false | Open website in the Edge browser |
title | 'Unsupported browser' | - |
text | 'This website doesn't work in Internet Explorer.We only support the major browsers like Chrome, Firefox, Safari and Edge.' | - |
backgroundColor | '#fff' | - |
textColor | '#fff' | - |
modalBackground | '#1794dc' | - |
If redirect and redirectToEdge are set to false you can use $isIE to check if the browser is Internet Explorer