* Update URL hash for deep linking
(filePath: string | null)
| 787 | * Update URL hash for deep linking |
| 788 | */ |
| 789 | function updateHash(filePath: string | null): void { |
| 790 | if (filePath) { |
| 791 | const newHash = `#file=${encodeURIComponent(filePath)}`; |
| 792 | if (window.location.hash !== newHash) { |
| 793 | history.pushState(null, "", newHash); |
| 794 | } |
| 795 | } else { |
| 796 | if (window.location.hash) { |
| 797 | history.pushState( |
| 798 | null, |
| 799 | "", |
| 800 | window.location.pathname + window.location.search |
| 801 | ); |
| 802 | } |
| 803 | } |
| 804 | } |
| 805 | |
| 806 | /** |
| 807 | * Setup install dropdown toggle functionality |
no outgoing calls
no test coverage detected