mirror of
https://github.com/imezx/Warp.git
synced 2025-04-25 15:40:02 +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 };
|