blob: 9425769ed1687a1c6d679dbe999fb6a1cfc49af3 (
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
29
30
31
|
<script data-cfasync="false">
// detect theme data in localStorage
// if diff change the data-theme attribute of body
var fujiThemeData = localStorage.getItem('fuji_theme');
if (fujiThemeData) {
if ($('body').attr('data-theme') !== fujiThemeData) {
$('body').attr('data-theme', (index, attr) => {
if (fujiThemeData === 'dark') {
return 'dark';
} else {
return '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>
|