mirror of
https://github.com/imezx/Warp.git
synced 2025-11-18 17:22:52 +00:00
10 lines
258 B
JavaScript
10 lines
258 B
JavaScript
|
|
import { inBrowser } from '../../shared';
|
||
|
|
import { ref } from 'vue';
|
||
|
|
const hashRef = ref(inBrowser ? location.hash : '');
|
||
|
|
if (inBrowser) {
|
||
|
|
window.addEventListener('hashchange', () => {
|
||
|
|
hashRef.value = location.hash;
|
||
|
|
});
|
||
|
|
}
|
||
|
|
export { hashRef };
|