FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
docs-1/javascripts/release-notes.ts at main · developerdino/docs-1 · GitHub
developerdino
/
docs-1
Public
forked from
github/docs
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
docs-1
/
javascripts
/
release-notes.ts
Copy path
More file actions
More file actions
Latest commit
History
History
History
26 lines (23 loc) · 711 Bytes
Breadcrumbs
docs-1
/
javascripts
/
release-notes.ts
Copy path
File metadata and controls
26 lines (23 loc) · 711 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
export
default
function
releaseNotes
(
)
{
//
@ts
-ignore
if
(
window
.
IS_NEXTJS_PAGE
)
return
const
patches
=
Array
.
from
(
document
.
querySelectorAll
(
'.js-release-notes-patch'
)
)
if
(
patches
.
length
===
0
)
return
const
observer
=
new
IntersectionObserver
(
(
entries
)
=>
{
for
(
const
entry
of
entries
)
{
const
{
version
}
=
(
entry
.
target
as
HTMLElement
)
.
dataset
const
patchLink
=
document
.
querySelector
(
`.js-release-notes-patch-link[data-version="
${
version
}
"]`
)
patchLink
?.
classList
.
toggle
(
'selected'
,
entry
.
isIntersecting
)
}
}
,
{
rootMargin
:
'-40% 0px -50%'
,
}
)
patches
.
forEach
(
(
patch
)
=>
{
observer
.
observe
(
patch
)
}
)
}
Back
|
FazBrowse Home
|
New Git URL