mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 21:33:09 +00:00
80b658e247
The previous hack used to work around an OS X issue/bug where launching a URL with a #fragment appended would drop the fragment by using `osascript` does not seem to work any more. Append the section name as a query string (in addition to, not instead of #section) and then use some basic javascript appended to the user doc HTML template to parse that and jump to the correct section (if the section was dropped). Closes #4480
12 lines
465 B
HTML
12 lines
465 B
HTML
</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>
|