Commit 4f7bbd5b authored by Laurent Wouters's avatar Laurent Wouters
Browse files

Preempts the page's content when looking at raw data

parent 8fbe926391f8
......@@ -193,9 +193,22 @@ export class DataSourcePage implements DataSource {
*/
function doFetchSourcePage(page: DataSourcePage): Promise<RawContent> {
return new Promise(function(resolve, reject) {
resolve({
for (var i = 0; i != document.body.children.length; i++) {
let child = document.body.children[i];
if (child.tagName == "PRE") {
let content = "";
for (var j = 0; j != child.childNodes.length; j++) {
content += (child.childNodes[j] as any).wholeText;
}
return resolve({
contentType: page.contentType,
content: content
});
}
}
return resolve({
contentType: page.contentType,
content: document.body.innerText
content: document.body.innerHTML
});
});
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment