diff options
author | Andrew Manning <tamanning@zoho.com> | 2017-02-11 20:52:17 -0500 |
---|---|---|
committer | Andrew Manning <tamanning@zoho.com> | 2017-02-11 20:52:17 -0500 |
commit | 1cd1328b0c03996532ccbe452ff293654ed1d68a (patch) | |
tree | c712926183d294518f3c1e18e8abacbc42cbe9fe /doc/toc.html | |
parent | 8ff9ad76365eced6dd466c491148381dae677a6c (diff) | |
parent | 1ba1c5b44ec08820fcc134aaffb977a51dca67df (diff) | |
download | volse-hubzilla-1cd1328b0c03996532ccbe452ff293654ed1d68a.tar.gz volse-hubzilla-1cd1328b0c03996532ccbe452ff293654ed1d68a.tar.bz2 volse-hubzilla-1cd1328b0c03996532ccbe452ff293654ed1d68a.zip |
Merge remote-tracking branch 'upstream/dev' into webimport
Diffstat (limited to 'doc/toc.html')
-rw-r--r-- | doc/toc.html | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/doc/toc.html b/doc/toc.html index 4c52c5e74..851f356e6 100644 --- a/doc/toc.html +++ b/doc/toc.html @@ -74,7 +74,7 @@ $(".panel-collapse.in").find('a').each(function(){ var url = document.createElement('a'); url.href = window.location; - var pageName = url.href.split('/').pop().split('#').shift(); + var pageName = url.href.split('/').pop().split('#').shift().split('?').shift(); var linkName = $(this).attr('href').split('/').pop(); if(pageName === linkName) { var tocUl = $(this).closest('li').append('<ul>').find('ul'); @@ -116,8 +116,15 @@ // When the page loads, it does not scroll to the section specified in the URL because it // has not been constructed yet by the script. This will reload the URL - if (typeof(location.href.split('#')[1]) !== 'undefined') { - location.replace(location.href) + if (typeof(location.href.split('#')[1]) !== 'undefined') { + var p = document.createElement('a'); + p.href = location.href; + var portstr = ''; + if(p.port !== '') { + portstr = ':'+ p.port; + } + var newref = p.protocol + '//'+ p.hostname + portstr + p.pathname + p.hash.split('?').shift(); + location.replace(newref) } }); </script> |