Skip to content

Commit

Permalink
feat: use content script without ui
Browse files Browse the repository at this point in the history
  • Loading branch information
DIYgod committed Dec 18, 2023
1 parent 926e5fd commit 5fda535
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 27 deletions.
14 changes: 0 additions & 14 deletions src/contents/contentReady.tsx

This file was deleted.

13 changes: 13 additions & 0 deletions src/contents/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { sendToBackground } from "@plasmohq/messaging"

sendToBackground({
name: "contentReady",
})

chrome.runtime.onMessage.addListener(async (msg, sender, sendResponse) => {
if (msg.name === "requestHTML") {
sendResponse(document.documentElement.outerHTML)
}
})

export { }
13 changes: 0 additions & 13 deletions src/contents/requestHTML.tsx

This file was deleted.

0 comments on commit 5fda535

Please sign in to comment.