Merge pull request #4581 from mqudsi/help_section_workaround

Work around OS X issue with dropped #fragment in launched URLs
This commit is contained in:
Mahmoud Al-Qudsi
2017-12-07 18:59:16 -06:00
committed by GitHub
2 changed files with 17 additions and 14 deletions

View File

@@ -1,2 +1,12 @@
</body>
<script type='text/javascript'>
// Some platforms don't handle launching a browser to navigate a page with
// a #fragment specified, so we use this workaround combined with a query string.
// See https://github.com/fish-shell/fish-shell/issues/4480
var params = new URLSearchParams(window.location.search); //?section=foo
var section = params.get("section");
if (section != null && location.hash == "") {
location.hash = "#" + section;
}
</script>
</html>