diff options
| author | Alex Pooley (@zuedev) <zuedev@gmail.com> | 2025-10-30 23:40:37 +0000 |
|---|---|---|
| committer | Alex Pooley (@zuedev) <zuedev@gmail.com> | 2025-10-30 23:40:37 +0000 |
| commit | 2131d5fec97f6163678fdec40dd2d6e9f7a5e58c (patch) | |
| tree | 4e914c764809acdaa869598f10fd5016e386ac53 /projects/about/public/tabAnimation.js | |
| parent | e9b62b2bc620bae72daa32d6b96bd5e59b2a293f (diff) | |
| download | zue.dev-2131d5fec97f6163678fdec40dd2d6e9f7a5e58c.tar zue.dev-2131d5fec97f6163678fdec40dd2d6e9f7a5e58c.tar.gz zue.dev-2131d5fec97f6163678fdec40dd2d6e9f7a5e58c.tar.bz2 zue.dev-2131d5fec97f6163678fdec40dd2d6e9f7a5e58c.tar.xz zue.dev-2131d5fec97f6163678fdec40dd2d6e9f7a5e58c.zip | |
restructure repo into a monorepo
Diffstat (limited to 'projects/about/public/tabAnimation.js')
| -rw-r--r-- | projects/about/public/tabAnimation.js | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/projects/about/public/tabAnimation.js b/projects/about/public/tabAnimation.js new file mode 100644 index 0000000..f0040d0 --- /dev/null +++ b/projects/about/public/tabAnimation.js @@ -0,0 +1,27 @@ +// animated tab +const animation = [ + { + emoji: "🌍", + title: "AROUND the world", + }, + { + emoji: "🌏", + title: "around THE world", + }, + { + emoji: "🌎", + title: "around the WORLD", + }, +]; + +let tabAnimationStep = 0; +const favicon = document.querySelector("link[rel='icon']"); +const updateTab = () => { + const currentAnimation = animation[tabAnimationStep % animation.length]; + favicon.href = `data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><text y=".9em" font-size="90">${currentAnimation.emoji}</text></svg>`; + document.title = currentAnimation.title; + tabAnimationStep++; + setTimeout(updateTab, 1000); +}; + +updateTab(); |
