Skip to content

Commit

Permalink
⬆️ Upgrading @web-clipper/readability to 0.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
DiamondYuan committed Aug 12, 2020
1 parent 719a75e commit f56982c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"@web-clipper/extensions": "^0.0.17",
"@web-clipper/highlight": "^0.0.20",
"@web-clipper/message-listener-combiner": "^0.1.0",
"@web-clipper/readability": "^0.2.1",
"@web-clipper/readability": "^0.3.0",
"@web-clipper/remark-pangu": "^1.0.2",
"@web-clipper/shared": "^0.0.20",
"@web-clipper/turndown": "^0.4.0",
Expand Down
4 changes: 3 additions & 1 deletion src/extensions/extensions/readability.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ export default new TextExtension(
$(documentClone)
.find('#skPlayer')
.remove();
let article = new Readability(documentClone).parse();
let article = new Readability(documentClone, {
keepClasses: true,
}).parse();
return turndown.turndown(article.content);
},
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Service, Inject } from 'typedi';
import styles from '@/service/contentScript/browser/contentScript/contentScript.less';
import * as browser from '@web-clipper/chrome-promise';
import * as QRCode from 'qrcode';
import * as Readability from '@web-clipper/readability';
import { Readability } from '@web-clipper/readability';
import AreaSelector from '@web-clipper/area-selector';
import Highlighter from '@web-clipper/highlight';
import plugins from '@web-clipper/turndown';
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -951,10 +951,10 @@
dependencies:
dva-model-creator "^0.3.0"

"@web-clipper/readability@^0.2.1":
version "0.2.1"
resolved "https://registry.npm.taobao.org/@web-clipper/readability/download/@web-clipper/readability-0.2.1.tgz#1aef4b09d805c377ebf2aa61a20085876faa8221"
integrity sha1-Gu9LCdgFw3fr8qphogCFh2+qgiE=
"@web-clipper/readability@^0.3.0":
version "0.3.0"
resolved "https://registry.npm.taobao.org/@web-clipper/readability/download/@web-clipper/readability-0.3.0.tgz?cache=0&sync_timestamp=1597248627380&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40web-clipper%2Freadability%2Fdownload%2F%40web-clipper%2Freadability-0.3.0.tgz#d8e8201fe4bedbea3a0d2e4281e02f22092adc33"
integrity sha1-2OggH+S+2+o6DS5CgeAvIgkq3DM=

"@web-clipper/remark-pangu@^1.0.2":
version "1.0.2"
Expand Down

0 comments on commit f56982c

Please sign in to comment.