mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-23 14:40:37 +08: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
13 lines
465 B
HTML
13 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>
|