Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
yangyang0507 committed Jul 25, 2024
1 parent 662e6b3 commit 484456e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/components/PageSidebar.astro
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import Ads from "@/components/Ads.astro";
<Ads />
</div>

<script lang="js">
<script lang="js" is:inline>
document.addEventListener("DOMContentLoaded", function () {
const toc = document.querySelector(".toc");
const ad = document.querySelector(".ad");
Expand Down Expand Up @@ -51,8 +51,6 @@ import Ads from "@/components/Ads.astro";
observer.observe(ad, { childList: true, subtree: true });
// 检测窗口变化时重新布局
window.addEventListener("resize", adjustLayout);
// 初始化布局
adjustLayout();
});
</script>

Expand Down

0 comments on commit 484456e

Please sign in to comment.