git.haldean.org docstore / 4e0fc36
Fix bug with trailing slashes, update title on load Will Brown 9 years ago
1 changed file(s) with 2 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
11
22 $.domReady(function() {
33 var page = document.location.search.substring(1)
4 if (page[-1] == '/') page = page.substring(0, page.length - 1)
4 if (page[page.length - 1] == '/') page = page.substring(0, page.length - 1)
55 if (!page) {
66 window.location = homepage
77 }
8 document.title = page;
89
910 $.ajax({
1011 url: 'text/' + page + '.md',