From 2131d5fec97f6163678fdec40dd2d6e9f7a5e58c Mon Sep 17 00:00:00 2001 From: "Alex Pooley (@zuedev)" Date: Thu, 30 Oct 2025 23:40:37 +0000 Subject: restructure repo into a monorepo --- projects/about/public/tabAnimation.js | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 projects/about/public/tabAnimation.js (limited to 'projects/about/public/tabAnimation.js') 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,${currentAnimation.emoji}`; + document.title = currentAnimation.title; + tabAnimationStep++; + setTimeout(updateTab, 1000); +}; + +updateTab(); -- cgit v1.2.3