diff --git a/appview/pages/templates/repo/fragments/permalinkShortcut.html b/appview/pages/templates/repo/fragments/permalinkShortcut.html index 71fffd35..a6e0bd6a 100644 --- a/appview/pages/templates/repo/fragments/permalinkShortcut.html +++ b/appview/pages/templates/repo/fragments/permalinkShortcut.html @@ -7,7 +7,7 @@ document.addEventListener('keydown', (e) => { if(e.key === 'y' && !e.ctrlKey && !e.metaKey && !e.altKey) { if(e.target.tagName === 'INPUT' || e.target.tagName === 'TEXTAREA') return; - const permalinkUrl = '/{{ .RepoInfo.RepoIdentifier }}/tree/{{ .LastCommitInfo.Hash }}/{{ .Path }}'; + const permalinkUrl = '/{{ .RepoInfo.RepoIdentifier }}/tree/{{ .LastCommitInfo.Hash }}/{{ .Path }}' + window.location.hash; window.location.href = permalinkUrl; } }, {signal: abortController.signal});