1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-06-11 05:24:01 +02:00

Refine browser back button implementation using hash-based approach

Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2025-09-16 03:46:10 +00:00
parent a1c93d9b25
commit fb864ecd6c
2 changed files with 18 additions and 20 deletions

View File

@@ -106,6 +106,11 @@ export async function common(createVue: () => Promise<App<Element>>) {
window.history.replaceState(null, '', window.location.href.replace('#pswp', ''));
}
// URLに#folder-を含む場合は取り除くFolderPageView用
if (window.location.hash.startsWith('#folder-')) {
window.history.replaceState(null, '', window.location.href.replace(window.location.hash, ''));
}
// 一斉リロード
reloadChannel.addEventListener('message', path => {
if (path !== null) window.location.href = path;