mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-08 16:58:38 +09:00
Initial updates for Reader View.
This commit is contained in:
parent
faaff24342
commit
1c494e80a6
27 changed files with 1757 additions and 1786 deletions
|
|
@ -2,6 +2,8 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
/* eslint-env mozilla/chrome-worker */
|
||||
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
|
|
@ -40,11 +42,12 @@ var Agent = {
|
|||
*
|
||||
* @param {object} uri URI data for the document.
|
||||
* @param {string} serializedDoc The serialized document.
|
||||
* @param {object} options Options object to pass to Readability.
|
||||
*
|
||||
* @return {object} Article object returned from Readability.
|
||||
*/
|
||||
parseDocument: function (uri, serializedDoc) {
|
||||
parseDocument(uri, serializedDoc, options) {
|
||||
let doc = new JSDOMParser().parse(serializedDoc);
|
||||
return new Readability(uri, doc).parse();
|
||||
return new Readability(uri, doc, options).parse();
|
||||
},
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue