Skip to content

Commit

Permalink
remove confetti
Browse files Browse the repository at this point in the history
  • Loading branch information
carsakiller committed Feb 14, 2024
1 parent 0fa4e31 commit 13ce189
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 20 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
"astro": "^4.0.3",
"autoprefixer": "^10.4.14",
"axios": "^1.6.0",
"canvas-confetti": "^1.6.0",
"dayjs": "^1.11.9",
"fuse.js": "^6.6.2",
"highlight.js": "^11.8.0",
Expand Down
19 changes: 0 additions & 19 deletions src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -327,22 +327,6 @@ exec "<path-to-directory>/bin/lua-language-server" "$@&quot
import axios from "axios";
import { TimeCache } from "~/classes/TimeCache";
import { assertElement } from "~/util/DOM";
import confetti from "canvas-confetti";

const spawnConfetti = (element: HTMLElement) => {
const rect = element.getBoundingClientRect();
const x = (rect.left + rect.width / 2) / window.innerWidth;
const y = (rect.top + rect.height / 2) / window.innerHeight;

confetti({
startVelocity: 6,
origin: { x, y },
decay: 0.98,
gravity: 0.7,
disableForReducedMotion: true,
zIndex: 15,
});
};

const ENDPOINT =
"https://corsproxy.io/?https://marketplace.visualstudio.com/_apis/public/gallery/extensionquery";
Expand Down Expand Up @@ -396,9 +380,6 @@ exec "<path-to-directory>/bin/lua-language-server" "$@&quot
} else {
installElement.textContent = numberFormatter.format(installs);
}
if (installs ?? 0 >= 1e6) {
spawnConfetti(installElement);
}
</script>

<script>
Expand Down

0 comments on commit 13ce189

Please sign in to comment.