FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
readability/test/debug-testcase.js at main · dispatchqueue/readability · GitHub
dispatchqueue
/
readability
Public
forked from
mozilla/readability
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
readability
/
test
/
debug-testcase.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
24 lines (18 loc) · 561 Bytes
Breadcrumbs
readability
/
test
/
debug-testcase.js
Copy path
File metadata and controls
24 lines (18 loc) · 561 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
/* eslint-env node */
var
Readability
=
require
(
"../Readability"
)
;
var
{
JSDOM
}
=
require
(
"jsdom"
)
;
var
fs
=
require
(
"fs"
)
;
var
path
=
require
(
"path"
)
;
var
testcaseRoot
=
path
.
join
(
__dirname
,
"test-pages"
)
;
if
(
process
.
argv
.
length
<
3
)
{
console
.
log
(
"No testcase provided."
)
;
process
.
exit
(
1
)
;
}
var
src
=
fs
.
readFileSync
(
`
${
testcaseRoot
}
/
${
process
.
argv
[
2
]
}
/source.html`
,
{
encoding
:
"utf-8"
,
}
)
.
trim
(
)
;
var
doc
=
new
JSDOM
(
src
,
{
url
:
"http://fakehost/test/page.html"
}
)
.
window
.
document
;
new
Readability
(
doc
,
{
debug
:
true
}
)
.
parse
(
)
;
Back
|
FazBrowse Home
|
New Git URL