mirror of
https://codeberg.org/Hyperpipe/Hyperpipe
synced 2025-06-27 20:58:01 +02:00
Toggle title on pause ( closes #126)
This commit is contained in:
parent
b26e847557
commit
77209facb8
1 changed files with 10 additions and 0 deletions
|
@ -138,6 +138,16 @@ watch(
|
|||
player.state.status = 'play';
|
||||
audio.value.pause();
|
||||
}
|
||||
|
||||
const state = ['Playing', 'Paused'];
|
||||
|
||||
if (
|
||||
document.title.startsWith(state[0] + ':') ||
|
||||
document.title.startsWith(state[1] + ':')
|
||||
)
|
||||
document.title = audio.value.paused
|
||||
? document.title.replace(state[0], state[1])
|
||||
: document.title.replace(state[1], state[0]);
|
||||
},
|
||||
);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue