mirror of
https://github.com/kiwix/kiwix-js-pwa.git
synced 2025-09-14 23:09:46 -04:00
Merge 32ebe0c71edfb67a4a9334f4ae755503ea3dba7f into 0b2246eee0eef7c3ffbc33cdc5fbf743a5ddc6fe
This commit is contained in:
commit
b62c3219c9
@ -7401,6 +7401,15 @@ function setupTableOfContents () {
|
||||
var tableOfContents = new uiUtil.ToC(innerDoc);
|
||||
var headings = tableOfContents.getHeadingObjects();
|
||||
|
||||
if(headings.length <= 1) {
|
||||
var dropupElement = document.getElementById('dropup');
|
||||
dropupElement.classList.remove('btn-default');
|
||||
dropupElement.style.pointerEvents = 'none';
|
||||
dropupElement.innerHTML = '<b> ToC </b>';
|
||||
document.getElementById('ToCList').style.visibility = 'hidden';
|
||||
return;
|
||||
}
|
||||
|
||||
dropup.style.fontSize = ~~(params.relativeUIFontSize * 0.14) + 'px';
|
||||
var dropupHtml = '';
|
||||
headings.forEach(function (heading) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user