mirror of
https://github.com/osnr/TabFS.git
synced 2024-06-09 01:12:17 +02:00
text file works!
This commit is contained in:
parent
44d5a7ed3c
commit
eee57547ac
|
@ -118,11 +118,8 @@ const router = {
|
||||||
"text": {
|
"text": {
|
||||||
async read(path, fh, size, offset) {
|
async read(path, fh, size, offset) {
|
||||||
const tabId = parseInt(pathComponent(path, -2));
|
const tabId = parseInt(pathComponent(path, -2));
|
||||||
const {result} = await chrome.tabs.executeScript(tabId, {code: "console.log('hi'); document.body.innerText;"});
|
const [result] = await browser.tabs.executeScript(tabId, {code: "document.body.innerText"});
|
||||||
/* await debugTab(tabId);
|
return result.substr(offset, size)
|
||||||
* await sendDebuggerCommand(tabId, "Runtime.enable", {});
|
|
||||||
* const {result} = await sendDebuggerCommand(tabId, "Runtime.evaluate", {expression: "document.body.innerText", returnByValue: true});*/
|
|
||||||
return result.value.substr(offset, size)
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"snapshot.mhtml": {
|
"snapshot.mhtml": {
|
||||||
|
|
Loading…
Reference in a new issue