MCPcopy
hub / github.com/github/awesome-copilot / updateHash

Function updateHash

website/src/scripts/modal.ts:789–804  ·  view source on GitHub ↗

* Update URL hash for deep linking

(filePath: string | null)

Source from the content-addressed store, hash-verified

787 * Update URL hash for deep linking
788 */
789function 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

Callers 2

openFileModalFunction · 0.85
closeModalFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected