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.js 590 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
  1. export default function releaseNotes () {
  2. const patches = Array.from(document.querySelectorAll('.js-release-notes-patch'))
  3. if (patches.length === 0) return
  4. const observer = new IntersectionObserver((entries) => {
  5. for (const entry of entries) {
  6. const { version } = entry.target.dataset
  7. const patchLink = document.querySelector(`.js-release-notes-patch-link[data-version="${version}"]`)
  8. patchLink.classList.toggle('selected', entry.isIntersecting)
  9. }
  10. }, {
  11. rootMargin: '-40% 0px -50%'
  12. })
  13. patches.forEach(patch => {
  14. observer.observe(patch)
  15. })
  16. }
Tip!

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

Comments

Loading...