single-file-core 1.0.25 → 1.0.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -142,7 +142,9 @@
|
|
|
142
142
|
let singleFileComment = result && result.singleNodeValue;
|
|
143
143
|
if (singleFileComment && isSingleFileComment(singleFileComment)) {
|
|
144
144
|
const info = singleFileComment.textContent.split("\n");
|
|
145
|
-
const [, ,
|
|
145
|
+
const [, , urlData, saveDate, ...infoData] = info;
|
|
146
|
+
const urlMatch = urlData.match(/^ url: (.*) $/);
|
|
147
|
+
const url = urlMatch && urlMatch[1];
|
|
146
148
|
if (url && saveDate) {
|
|
147
149
|
let options;
|
|
148
150
|
if (browser && browser.runtime && browser.runtime.sendMessage) {
|
package/package.json
CHANGED
package/single-file-helper.js
CHANGED
|
@@ -138,7 +138,7 @@ function preProcessDoc(doc, win, options) {
|
|
|
138
138
|
const invalidElements = new Map();
|
|
139
139
|
let elementsInfo;
|
|
140
140
|
if (win && doc.documentElement) {
|
|
141
|
-
doc.querySelectorAll("button button, a a
|
|
141
|
+
doc.querySelectorAll("button button, a a").forEach(element => {
|
|
142
142
|
const placeHolderElement = doc.createElement("template");
|
|
143
143
|
placeHolderElement.setAttribute(INVALID_ELEMENT_ATTRIBUTE_NAME, "");
|
|
144
144
|
placeHolderElement.content.appendChild(element.cloneNode(true));
|