Hide type declarations by default
This commit is contained in:
parent
184156ed97
commit
73b97c7e7c
2 changed files with 166 additions and 139 deletions
|
@ -1833,11 +1833,16 @@
|
|||
onEach(e.getElementsByClassName('associatedconstant'), func);
|
||||
});
|
||||
|
||||
function createToggle() {
|
||||
function createToggle(otherMessage) {
|
||||
var span = document.createElement('span');
|
||||
span.className = 'toggle-label';
|
||||
span.style.display = 'none';
|
||||
span.innerHTML = ' Expand description';
|
||||
if (!otherMessage) {
|
||||
span.innerHTML = ' Expand description';
|
||||
} else {
|
||||
span.innerHTML = otherMessage;
|
||||
span.style.fontSize = '20px';
|
||||
}
|
||||
|
||||
var mainToggle = toggle.cloneNode(true);
|
||||
mainToggle.appendChild(span);
|
||||
|
@ -1850,7 +1855,14 @@
|
|||
|
||||
onEach(document.getElementById('main').getElementsByClassName('docblock'), function(e) {
|
||||
if (e.parentNode.id === "main") {
|
||||
e.parentNode.insertBefore(createToggle(), e);
|
||||
var otherMessage;
|
||||
if (hasClass(e, "type-decl")) {
|
||||
otherMessage = ' Show type declaration';
|
||||
}
|
||||
e.parentNode.insertBefore(createToggle(otherMessage), e);
|
||||
if (otherMessage) {
|
||||
collapseDocs(e.previousSibling.childNodes[0], "toggle");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue