blob: c516aad282eef2cb6643fd012cf05f11f4e5c788 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
<script data-cfasync="false">
// detect theme data in localStorage
var fujiThemeData = localStorage.getItem('fuji_data-theme');
// if first look, set theme mode to auto
if (!fujiThemeData) {
localStorage.setItem('fuji_data-theme', 'auto');
} else {
// if not auto mode, change the data-theme attribute of body
if (fujiThemeData !== 'auto') {
document.body.setAttribute('data-theme', fujiThemeData === 'dark' ? 'dark' : 'light');
}
}
</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) {
return true;
}
return false;
}
if (browserDetection()) {
window.location.href('{{ "/ie/" | absURL }}');
}
</script>
|