site/eepytab.js
2024-07-08 00:52:21 -05:00

10 lines
420 B
JavaScript

/* i took this from https://dev.to/codepo8/showing-different-titles-depending-if-the-tab-is-active-or-not-hef */
let activeTitle = 'sneexy dot pages dot gay';
let inactiveTitle = 'zzz... synth is eepy... - sneexy dot pages dot gay';
document.title = activeTitle;
window.addEventListener('blur', e => {
document.title = inactiveTitle;
});
window.addEventListener('focus', e => {
document.title = activeTitle;
});