This commit is contained in:
tophf 2022-02-14 12:11:11 +03:00
parent 0fe08826ac
commit fa6a7eee07
2 changed files with 10 additions and 9 deletions

View File

@ -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;

View File

@ -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});