mirror of
https://github.com/zadam/trilium.git
synced 2026-02-27 00:53:35 +01:00
fix(web-clipper): clipping whole page not working
This commit is contained in:
parent
5d07a079ef
commit
59f2fc8d03
@ -1,4 +1,5 @@
|
|||||||
import { getBaseUrl, getPageLocationOrigin, randomString } from "../../utils.js";
|
import { getBaseUrl, getPageLocationOrigin, randomString } from "../../utils.js";
|
||||||
|
import Readability from "../../lib/Readability.js";
|
||||||
|
|
||||||
export default defineContentScript({
|
export default defineContentScript({
|
||||||
matches: [
|
matches: [
|
||||||
|
|||||||
@ -25,7 +25,7 @@
|
|||||||
* @param {HTMLDocument} doc The document to parse.
|
* @param {HTMLDocument} doc The document to parse.
|
||||||
* @param {Object} options The options object.
|
* @param {Object} options The options object.
|
||||||
*/
|
*/
|
||||||
function Readability(doc, options) {
|
export default function Readability(doc, options) {
|
||||||
// In some older versions, people passed a URI as the first argument. Cope:
|
// In some older versions, people passed a URI as the first argument. Cope:
|
||||||
if (options && options.documentElement) {
|
if (options && options.documentElement) {
|
||||||
doc = options;
|
doc = options;
|
||||||
@ -2277,7 +2277,3 @@ Readability.prototype = {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
if (typeof module === "object") {
|
|
||||||
module.exports = Readability;
|
|
||||||
}
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user