diff options
Diffstat (limited to 'extension/background.js')
-rw-r--r-- | extension/background.js | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/extension/background.js b/extension/background.js index 3888429..1e47b98 100644 --- a/extension/background.js +++ b/extension/background.js @@ -118,11 +118,8 @@ const router = { "text": { async read(path, fh, size, offset) { const tabId = parseInt(pathComponent(path, -2)); - const {result} = await chrome.tabs.executeScript(tabId, {code: "console.log('hi'); document.body.innerText;"}); - /* await debugTab(tabId); - * await sendDebuggerCommand(tabId, "Runtime.enable", {}); - * const {result} = await sendDebuggerCommand(tabId, "Runtime.evaluate", {expression: "document.body.innerText", returnByValue: true});*/ - return result.value.substr(offset, size) + const [result] = await browser.tabs.executeScript(tabId, {code: "document.body.innerText"}); + return result.substr(offset, size) } }, "snapshot.mhtml": { |