diff --git a/install-usercss/install-usercss.css b/install-usercss/install-usercss.css index efee1150..2054de0f 100644 --- a/install-usercss/install-usercss.css +++ b/install-usercss/install-usercss.css @@ -38,7 +38,7 @@ input:disabled + span { #header { --child-gap: 1rem; } -#header-contents > :nth-last-child(n + 3) { +#header-contents > :nth-last-child(n + 2) { margin-bottom: var(--child-gap); } #header.meta-init-error { diff --git a/js/localization.js b/js/localization.js index 99c471fb..b413e255 100644 --- a/js/localization.js +++ b/js/localization.js @@ -120,12 +120,13 @@ Object.assign(t, { }, async fetchTemplate(url, name) { - return t.template[name] || download(url, {responseType: 'document'}).then(doc => { - const el = doc.body.firstElementChild; + let el = t.template[name]; + if (!el) { + el = (await download(url, {responseType: 'document'})).body.firstElementChild; t.NodeList(el.getElementsByTagName('*')); t.template[name] = el; - return el; - }); + } + return el; }, sanitizeHtml(root) {