aboutsummaryrefslogtreecommitdiff
path: root/source/about/public/tabAnimation.js
diff options
context:
space:
mode:
authorzuedev <zuedev@gmail.com>2025-12-01 00:45:32 +0000
committerzuedev <zuedev@gmail.com>2025-12-01 00:45:32 +0000
commitc1c330fe1dd34f02558ed69e841927cc6765fa45 (patch)
treec44ef96fc9e66ecb013e99b5d8e2dc8ce333ffc9 /source/about/public/tabAnimation.js
parent25f31c26bf153366628257849b3eaf216541f1ce (diff)
parentcbc17db44c18a19702938b3fe70ea3de81d326ea (diff)
downloadzue.dev-c1c330fe1dd34f02558ed69e841927cc6765fa45.tar
zue.dev-c1c330fe1dd34f02558ed69e841927cc6765fa45.tar.gz
zue.dev-c1c330fe1dd34f02558ed69e841927cc6765fa45.tar.bz2
zue.dev-c1c330fe1dd34f02558ed69e841927cc6765fa45.tar.xz
zue.dev-c1c330fe1dd34f02558ed69e841927cc6765fa45.zip
Merge pull request 'merged-worker' (#1) from merged-worker into main
Reviewed-on: https://forgejo.sovereign.zue.dev/zuedev/zue.dev/pulls/1
Diffstat (limited to 'source/about/public/tabAnimation.js')
-rw-r--r--source/about/public/tabAnimation.js27
1 files changed, 27 insertions, 0 deletions
diff --git a/source/about/public/tabAnimation.js b/source/about/public/tabAnimation.js
new file mode 100644
index 0000000..f0040d0
--- /dev/null
+++ b/source/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();