stuff idk

This commit is contained in:
sky
2025-08-26 23:27:41 -04:00
parent c28d24ba9b
commit 9270c8183e
9 changed files with 45 additions and 4 deletions

View File

@ -6,13 +6,13 @@ function setBackground() {
}
function loadPJS() {
let div = document.createElement("div");
div.id = "particles-js";
div.id = "pjs";
document.body.appendChild(div);
let script = document.createElement("script");
script.src = "https://cdn.jsdelivr.net/particles.js/2.0.0/particles.min.js";
document.head.appendChild(script);
script.addEventListener("load", ()=>{
particlesJS.load('particles-js', "/js/particlesjs-config.json", ()=>{});
particlesJS.load('pjs', "/js/particlesjs-config.json", ()=>{});
});
}
@ -47,7 +47,7 @@ document.addEventListener("DOMContentLoaded", ()=>{
})
document.addEventListener("scroll", ()=>{
document.getElementById("particles-js").style.top = window.scrollY + "px";
document.getElementById("pjs").style.top = window.scrollY + "px";
})