52 lines
2.4 KiB
JavaScript
52 lines
2.4 KiB
JavaScript
// Generated, do not edit. sha256:2c49affa1ec432e4d1ea7c40091c250afc875d5da6a7e1f18da77761d64a9168
|
|||
|
|
(function () {
|
||
|
|
var show = false;
|
||
|
|
var gewisseld = false;
|
||
|
|
try {
|
||
|
|
gewisseld = localStorage.getItem('portfolio_switching') === '1';
|
||
|
|
if (gewisseld) localStorage.removeItem('portfolio_switching');
|
||
|
|
} catch (e0) { }
|
||
|
|
try {
|
||
|
|
var KEY = 'splash_last_shown';
|
||
|
|
var d = new Date();
|
||
|
|
var today = d.getFullYear() + '-' + String(d.getMonth() + 1).padStart(2, '0') + '-' + String(d.getDate()).padStart(2, '0');
|
||
|
|
show = gewisseld
|
||
|
|
|| location.search.indexOf('splash') !== -1
|
||
|
|
|| location.hash.indexOf('splash') !== -1
|
||
|
|
|| localStorage.getItem(KEY) !== today;
|
||
|
|
if (show) localStorage.setItem(KEY, today);
|
||
|
|
} catch (e) { show = true; }
|
||
|
|
if (show) document.documentElement.dataset.splash = 'on';
|
||
|
|
|
||
|
|
try {
|
||
|
|
var naam = localStorage.getItem('portfolio_active');
|
||
|
|
if (naam) {
|
||
|
|
document.documentElement.dataset.portfolio = naam;
|
||
|
|
document.documentElement.style.setProperty('--portfolio-name', JSON.stringify(naam));
|
||
|
|
}
|
||
|
|
} catch (e1) { }
|
||
|
|
|
||
|
|
try {
|
||
|
|
var achtervoegsel = document.documentElement.dataset.portfolio
|
||
|
|
? ':' + document.documentElement.dataset.portfolio : '';
|
||
|
|
var theme = localStorage.getItem('ui_theme' + achtervoegsel);
|
||
|
|
var accent = localStorage.getItem('ui_accent' + achtervoegsel);
|
||
|
|
var depth = localStorage.getItem('ui_depth' + achtervoegsel);
|
||
|
|
if (theme === 'dark' || theme === 'light') document.documentElement.dataset.theme = theme;
|
||
|
|
if (accent) document.documentElement.dataset.accent = accent;
|
||
|
|
if (depth === 'flat' || depth === 'deep') document.documentElement.dataset.depth = depth;
|
||
|
|
} catch (e2) { }
|
||
|
|
try {
|
||
|
|
var look = JSON.parse(localStorage.getItem('ui_look' + achtervoegsel) || '{}');
|
||
|
|
var LOOK_ATTRS = ['profile', 'glow', 'glowshape', 'motion', 'rowsel', 'render'];
|
||
|
|
for (var i = 0; i < LOOK_ATTRS.length; i++) {
|
||
|
|
var v = look && look[LOOK_ATTRS[i]];
|
||
|
|
if (typeof v === 'string' && /^[a-z]+$/.test(v)) document.documentElement.dataset[LOOK_ATTRS[i]] = v;
|
||
|
|
}
|
||
|
|
var LOOK_TOKENS = ['--glass-transparency', '--glass-frost', '--dialog-transparency'];
|
||
|
|
for (var j = 0; j < LOOK_TOKENS.length; j++) {
|
||
|
|
var w = look && look[LOOK_TOKENS[j]];
|
||
|
|
if (typeof w === 'string' && /^\d{1,3}(%|px)?$/.test(w)) document.documentElement.style.setProperty(LOOK_TOKENS[j], w);
|
||
|
|
}
|
||
|
|
} catch (e3) { }
|
||
|
|
})();
|