fix(frontend): クライアント起動時にURLに #pswp がある場合は取り除くように
(cherry picked from commit 8f37fb6713c1e094acdf995d47741c0447306b41) Co-authored-by: かっこかり <67428053+kakkokari-gtyih@users.noreply.github.com>
This commit is contained in:
parent
d18599458c
commit
c029bc9b5f
1 changed files with 5 additions and 0 deletions
|
@ -99,6 +99,11 @@ export async function common(createVue: () => App<Element>) {
|
||||||
// タッチデバイスでCSSの:hoverを機能させる
|
// タッチデバイスでCSSの:hoverを機能させる
|
||||||
document.addEventListener('touchend', () => {}, { passive: true });
|
document.addEventListener('touchend', () => {}, { passive: true });
|
||||||
|
|
||||||
|
// URLに#pswpを含む場合は取り除く
|
||||||
|
if (location.hash === '#pswp') {
|
||||||
|
history.replaceState(null, '', location.href.replace('#pswp', ''));
|
||||||
|
}
|
||||||
|
|
||||||
// 一斉リロード
|
// 一斉リロード
|
||||||
reloadChannel.addEventListener('message', path => {
|
reloadChannel.addEventListener('message', path => {
|
||||||
if (path !== null) location.href = path;
|
if (path !== null) location.href = path;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue