diff --git a/webapps/markdown-viewer/mdown b/webapps/markdown-viewer/mdown index e077947..ac4dede 100644 --- a/webapps/markdown-viewer/mdown +++ b/webapps/markdown-viewer/mdown @@ -47,6 +47,9 @@ function render(path) { .removeClass('navbar-fixed-top') $('#loading').hide() + + // set window title to first h1 or h2 in markdown text + document.title = document.querySelector("h1, h2").textContent; }) }