Platform
Resources
Pricing
Sign in
Get started
samchencode
Workspace
Fork
Public
By
samchencode
Edited
Sep 22, 2024
Insert cell
Insert cell
viewof
input
=
Inputs
.
textarea
(
{
title
:
'html'
}
)
Insert cell
viewof
exp1Css
=
Inputs
.
text
(
)
Insert cell
exp
(
(
$
)
=>
{
return
$
(
exp1Css
)
.
text
(
)
;
}
)
Insert cell
exp
(
(
$
)
=>
{
$
(
"img[src]"
)
.
map
(
(
_
,
e
)
=>
{
const
newEl
=
$
(
e
)
.
clone
(
)
;
newEl
.
attr
(
"src"
,
"ffs.png"
)
;
$
(
e
)
.
replaceWith
(
newEl
)
;
}
)
;
return
$
.
html
(
)
;
}
)
Insert cell
exp
(
(
$
)
=>
{
const
indexEl
=
$
(
"a[name=INDEX] ~ a[name=A]"
)
.
nextUntil
(
`hr,
a[name=Guideline_Navigation_Instructions],
.content:has(hr),
.content:has(a[name=Guideline_Navigation_Instructions])`
)
;
return
$
.
html
(
indexEl
)
;
}
)
Insert cell
exp
(
(
$
)
=>
{
const
aboutEl
=
$
(
"a[name=about], p:has(> a[name=about])"
)
;
const
siblings
=
aboutEl
.
nextAll
(
)
;
return
$
.
html
(
siblings
)
;
}
)
Insert cell
Insert cell
cheerio
=
require
(
'https://bundle.run/cheerio@1.0.0-rc.5'
)
Insert cell
Purpose-built for displays of data
Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Try it for free
Learn more
Fork
View
Export
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
input
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
exp1Css
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
exp
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
cheerio
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML