diff options
author | zotlabs <mike@macgirvin.com> | 2017-02-12 17:40:45 -0800 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2017-02-12 17:40:45 -0800 |
commit | 7c72886b1b00aea2b53233c0299e9f35b45dc34d (patch) | |
tree | 7b58ac7e99c312126d7ecb56d82462d866ec9748 /doc/toc.html | |
parent | 2a525922929d5d9d54fd898e6f1658f0b959e667 (diff) | |
parent | f62b2fc114ff479e3b0bd524b90efc799b5403e6 (diff) | |
download | volse-hubzilla-7c72886b1b00aea2b53233c0299e9f35b45dc34d.tar.gz volse-hubzilla-7c72886b1b00aea2b53233c0299e9f35b45dc34d.tar.bz2 volse-hubzilla-7c72886b1b00aea2b53233c0299e9f35b45dc34d.zip |
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev_merge
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> |