loading.js
1.71 KB
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
32
33
34
35
36
37
38
39
40
function getUrlParams() {
function e(e) {
return decodeURIComponent(e.replace(t, ' '));
}
for (var o, t = /\+/g, l = /([^&=]+)=?([^&]*)/g, r = window.location.search.substring(1), c = {}; (o = l.exec(r)); )
c[e(o[1])] = e(o[2]);
return c;
}
var params = getUrlParams(),
notoolbar = 'false' == params.toolbar,
compact = 'true' == params.compact,
view = 'view' == params.mode,
visible = !0,
elem =
((compact || view || notoolbar) && document.querySelector('.brendpanel > :nth-child(2)').remove(),
compact || view
? notoolbar
? (document.querySelector('.brendpanel > :nth-child(1)').remove(), (visible = !1))
: (document.querySelector('.brendpanel > :nth-child(1)').style.height = '32px')
: notoolbar && (document.querySelector('.brendpanel > :nth-child(1)').style.height = '28px'),
compact &&
(document.querySelectorAll('.not-compact').forEach(function (e) {
e.remove();
}),
document.querySelectorAll('.compact').forEach(function (e) {
e.style.display = 'inline-block';
}),
(document.querySelector('.fat').style.left = '655px')),
visible && (document.querySelector('.brendpanel').style.display = 'block'),
(view && 'true' !== params.toolbar) || notoolbar || (document.querySelector('.sktoolbar').style.display = 'block'),
view && (document.querySelector('.placeholder').style.marginTop = '19px'),
(document.querySelector('.placeholder').style.display = 'block'),
document.querySelector('.loading-logo img'));
elem &&
((logo || logoDark) &&
elem.setAttribute(
'src',
/theme-(?:[a-z]+-)?dark(?:-[a-z]*)?/.test(document.body.className) ? logoDark || logo : logo || logoDark,
),
(elem.style.opacity = 1));