Skip to content

Commit

Permalink
improve: remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
KawaiiZapic committed Sep 5, 2024
1 parent 69bb235 commit 3d1adb7
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/pages/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ export function init() {
});
parent.classList.add("matecho-article-card__animating");
document.body.appendChild(parent);
document.body.style.overflow = "hidden";
Object.assign(listMain.style, {
opacity: "0",
pointerEvents: "none"
Expand All @@ -48,14 +47,9 @@ export function init() {
document.addEventListener(
"pjax:complete",
() => {
document.body.style.overflow = "";
(parent as HTMLElement).style.position = "absolute";
const articleMain = document.querySelector("#matecho-pjax-main");
if (
!articleMain ||
!articleMain.parentElement ||
articleMain.querySelector("#matecho-password-form")
) {
if (!articleMain || !articleMain.parentElement) {
parent.remove();
return;
}
Expand Down

0 comments on commit 3d1adb7

Please sign in to comment.