Skip to content

Commit 2c41d18

Browse files
authored
Improve performance: remove every.org inline script (#657)
1 parent 6bdba98 commit 2c41d18

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,6 @@ stats.html
4949

5050
# sanity generated schema
5151
schema.json
52+
53+
# lighthouse
54+
.unlighthouse

web/src/layouts/BaseLayout.astro

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,6 @@ const pageTitle = Astro.url.pathname === "/" ? title : `${title} · Namesake`;
7878
title="Namesake"
7979
href={new URL("rss.xml", Astro.site)}
8080
/>
81-
<script is:inline async defer src="https://embeds.every.org/0.4/button.js"
82-
></script>
8381
</head>
8482
<body data-color={color}>
8583
<Header />
@@ -89,9 +87,9 @@ const pageTitle = Astro.url.pathname === "/" ? title : `${title} · Namesake`;
8987
<Footer />
9088
<script>
9189
// Print media lazy-loading bypass
92-
window.addEventListener('beforeprint', () => {
93-
document.querySelectorAll('img[loading]').forEach(img => {
94-
img.removeAttribute('loading');
90+
window.addEventListener("beforeprint", () => {
91+
document.querySelectorAll("img[loading]").forEach((img) => {
92+
img.removeAttribute("loading");
9593
});
9694
});
9795
</script>

0 commit comments

Comments
 (0)