mirror of
https://activitypub.software/TransFem-org/Sharkey.git
synced 2024-11-16 16:57:14 +01:00
126826eb5a
* Resolve #6804 Implement unison reload * ✌️ * fix * Update share.vue fix Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
10 lines
389 B
TypeScript
10 lines
389 B
TypeScript
// SafariがBroadcastChannel未実装なのでライブラリを使う
|
|
import { BroadcastChannel } from 'broadcast-channel';
|
|
|
|
export const reloadChannel = new BroadcastChannel<'reload'>('reload');
|
|
|
|
// BroadcastChannelを用いて、クライアントが一斉にreloadするようにします。
|
|
export function unisonReload() {
|
|
reloadChannel.postMessage('reload');
|
|
location.reload();
|
|
}
|