From 648f17428182b41aeae489b3f1831b3e38cb06c1 Mon Sep 17 00:00:00 2001 From: Ruben Date: Mon, 8 Jul 2024 00:52:21 -0500 Subject: [PATCH] add change title tab --- eepytab.js | 10 ++++++++++ index.html | 1 + 2 files changed, 11 insertions(+) create mode 100644 eepytab.js diff --git a/eepytab.js b/eepytab.js new file mode 100644 index 0000000..919299b --- /dev/null +++ b/eepytab.js @@ -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; +}); diff --git a/index.html b/index.html index 2ab856e..b328703 100644 --- a/index.html +++ b/index.html @@ -10,6 +10,7 @@ +