From fa6a7eee0745c04cb92f2467c71a76d08c78a214 Mon Sep 17 00:00:00 2001 From: tophf Date: Mon, 14 Feb 2022 12:11:11 +0300 Subject: [PATCH] oops --- edit/edit.css | 10 ++-------- edit/edit.js | 9 ++++++++- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/edit/edit.css b/edit/edit.css index 7c53f783..353cf64f 100644 --- a/edit/edit.css +++ b/edit/edit.css @@ -1054,18 +1054,12 @@ body:not(.find-open) [data-match-highlight-count="1"] .CodeMirror-selection-high #header.sticky .buttons > button, #header.sticky .split-btn-pedal, #heading, - #header-sticker { - top: 0; - height: 1px; - position: absolute; - visibility: hidden; + h2 { + display: none; } .popup-window #details-wrapper { margin-right: var(--popup-button-width); } - h2 { - display: none; - } #basic-info { margin: 0 var(--popup-button-width) var(--pad05) 0; box-sizing: border-box; diff --git a/edit/edit.js b/edit/edit.js index eafbb212..910ea6d1 100644 --- a/edit/edit.js +++ b/edit/edit.js @@ -60,7 +60,14 @@ baseInit.ready.then(async () => { }).then(() => { // Set up mini-header on scroll const {isUsercss} = editor; - const el = $create('#header-sticker'); + const el = $create({ + style: ` + top: 0; + height: 1px; + position: absolute; + visibility: hidden; + `.replace(/;/g, '!important;'), + }); const scroller = isUsercss ? $('.CodeMirror-scroll') : document.body; const xoRoot = isUsercss ? scroller : undefined; const xo = new IntersectionObserver(onScrolled, {root: xoRoot});