Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

release-notes.ts 711 B

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
  1. export default function releaseNotes() {
  2. // @ts-ignore
  3. if (window.IS_NEXTJS_PAGE) return
  4. const patches = Array.from(document.querySelectorAll('.js-release-notes-patch'))
  5. if (patches.length === 0) return
  6. const observer = new IntersectionObserver(
  7. (entries) => {
  8. for (const entry of entries) {
  9. const { version } = (entry.target as HTMLElement).dataset
  10. const patchLink = document.querySelector(
  11. `.js-release-notes-patch-link[data-version="${version}"]`
  12. )
  13. patchLink?.classList.toggle('selected', entry.isIntersecting)
  14. }
  15. },
  16. {
  17. rootMargin: '-40% 0px -50%',
  18. }
  19. )
  20. patches.forEach((patch) => {
  21. observer.observe(patch)
  22. })
  23. }
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...