fix: chapter list toggle no longer overwrites title span with arrow
This commit is contained in:
@@ -2311,7 +2311,6 @@ const chapterTmpl = `
|
|||||||
// ── panel toggles (chapter list / settings) ───────────────────────────────────
|
// ── panel toggles (chapter list / settings) ───────────────────────────────────
|
||||||
window.closeChapterList = function () {
|
window.closeChapterList = function () {
|
||||||
chapterListPanel.style.display = 'none';
|
chapterListPanel.style.display = 'none';
|
||||||
chapterListBtn.querySelector('span:last-child').innerHTML = '▼';
|
|
||||||
};
|
};
|
||||||
window.toggleChapterList = function () {
|
window.toggleChapterList = function () {
|
||||||
var open = chapterListPanel.style.display !== 'none';
|
var open = chapterListPanel.style.display !== 'none';
|
||||||
@@ -2320,7 +2319,6 @@ const chapterTmpl = `
|
|||||||
closeChapterList();
|
closeChapterList();
|
||||||
} else {
|
} else {
|
||||||
chapterListPanel.style.display = 'block';
|
chapterListPanel.style.display = 'block';
|
||||||
chapterListBtn.querySelector('span:last-child').innerHTML = '▲';
|
|
||||||
var cur = chapterListPanel.querySelector('[data-current="1"]');
|
var cur = chapterListPanel.querySelector('[data-current="1"]');
|
||||||
if (cur) cur.scrollIntoView({ block: 'center' });
|
if (cur) cur.scrollIntoView({ block: 'center' });
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user