1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt-doc.git synced 2025-04-26 04:17:11 -07:00

setTitle()

This commit is contained in:
Cedric Beust 2015-10-08 18:42:04 -07:00
parent 28682f4e4b
commit 538f088527

View file

@ -2,6 +2,8 @@
// Nav bar // Nav bar
// //
var title = "Kobalt, by Cedric Beust"
var content = [ var content = [
{ {
url: "../home/index.html", url: "../home/index.html",
@ -72,7 +74,6 @@ function generateToc() {
ind = indentAttribute.textContent; ind = indentAttribute.textContent;
} }
if (! ind) ind = 0; if (! ind) ind = 0;
var currentCounter = 0;
if (ind > currentLevel) { if (ind > currentLevel) {
if (ind == 0) { if (ind == 0) {
toc += '<ul class="nav">\n'; toc += '<ul class="nav">\n';
@ -98,7 +99,12 @@ function generateToc() {
} }
function generateKobalt(index) { function setTitle() {
generateToc(); document.getElementsByTagName("title")[0].innerHTML = title;
generateNavBar(index); }
function generateKobalt(index) {
setTitle();
generateToc();
generateNavBar(index);
} }