mirror of
https://github.com/janishutz/MusicPlayer.git
synced 2026-09-10 14:25:24 +02:00
feat: basic design of share page, various small fixes
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
export const reauth = () => {
|
||||
localStorage.setItem( 'close-tab', 'true' );
|
||||
|
||||
const listener = () => {
|
||||
if ( localStorage.getItem( 'reauth-ok' ) === 'true' ) {
|
||||
try {
|
||||
window.removeEventListener( 'storage', listener );
|
||||
} catch { /* empty */ }
|
||||
|
||||
localStorage.removeItem( 'reauth-ok' );
|
||||
|
||||
document.dispatchEvent( new CustomEvent( 'musicplayer:reauth' ) );
|
||||
}
|
||||
};
|
||||
|
||||
window.addEventListener( 'storage', listener );
|
||||
};
|
||||
Reference in New Issue
Block a user