-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
16 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,45 +3,4 @@ | |
<script>(function () { window.counterscale = { q: [["set", "siteId", "hydejack.com"], ["trackPageview"]] } })()</script> | ||
<script defer id="counterscale-script" src="https://counterscale-bio.pages.dev/tracker.js"></script> | ||
{% endunless %} | ||
<link rel="dns-prefetch" href="https://assets.gumroad.com"> | ||
<script type="module"> | ||
const loadJS = x => new Promise(r => window.loadJS(x).addEventListener('load', r)); | ||
|
||
let p1, p2, io1, io2, embedCreated, overlayCreated; | ||
document.querySelector('hy-push-state').addEventListener('load', () => { | ||
io1 ||= new IntersectionObserver(async (entries) => { | ||
if (entries.some(x => x.isIntersecting)) { | ||
p1 = p1 || loadJS('https://gumroad.com/js/gumroad-embed.js'); | ||
await p1; | ||
!embedCreated && await new Promise(function check1(res) { | ||
if (typeof createGumroadEmbed !== 'undefined') { | ||
embedCreated = 1; | ||
res(createGumroadEmbed()); | ||
} | ||
else setTimeout(() => check1(res), 200); | ||
}); | ||
await new Promise(function check2(res) { | ||
if (typeof GumroadEmbed !== 'undefined') res(GumroadEmbed.reload()); | ||
else setTimeout(() => check2(res), 200); | ||
}); | ||
} | ||
}, { rootMargin: '1440px' }); | ||
|
||
io2 ||= new IntersectionObserver(async (entries) => { | ||
if (entries.some(x => x.isIntersecting)) { | ||
p2 = p2 || loadJS('https://gumroad.com/js/gumroad.js'); | ||
await p2; | ||
!overlayCreated && await new Promise(function check(res) { | ||
if (typeof createGumroadOverlay !== 'undefined') { | ||
overlayCreated = 1; | ||
res(createGumroadOverlay()); | ||
} | ||
else setTimeout(() => check(res), 200); | ||
}); | ||
} | ||
}, { rootMargin: '300px' }); | ||
|
||
document.querySelectorAll('.gumroad-product-embed').forEach(el => io1.observe(el)); | ||
document.querySelectorAll('.gumroad-button').forEach(el => io2.observe(el)); | ||
}); | ||
</script> | ||
<script defer src="https://cdn.jsdelivr.net/npm/@polar-sh/[email protected]/dist/embed.global.js" data-auto-init></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ | |
} | ||
} | ||
|
||
.btn, .gumroad-button { | ||
.btn { | ||
margin: 1rem 0; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters