add change title tab

This commit is contained in:
Ruben 2024-07-08 00:52:21 -05:00
commit 648f174281
No known key found for this signature in database
GPG key ID: AE181294E97E4802
2 changed files with 11 additions and 0 deletions

10
eepytab.js Normal file
View file

@ -0,0 +1,10 @@
/* 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;
});

View file

@ -10,6 +10,7 @@
<meta lang="en-US">
<meta property="og:url" content="https://sneexy.pages.gay/">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="./eepytab.js" defer="defer"></script>
</head>
<body>