import type { PlasmoCSConfig } from "plasmo"
import { sendToBackground } from "@plasmohq/messaging"
export const config: PlasmoCSConfig = {
matches: ["https://www.google.com/*"],
world: "MAIN",
run_at: "document_end"
}
async function ping() {
console.log("Component in real world")
const resp = await sendToBackground({
name: "ping",
body: {
id: 123
},
extensionId: "dbihgacbiojmefppibfimnmpabpifldj" // find this in chrome's extension manager
})
console.log(resp)
}
setInterval(ping, 1000)
import type { PlasmoCSConfig } from "plasmo"
import { sendToBackground } from "@plasmohq/messaging"
export const config: PlasmoCSConfig = {
matches: ["https://www.google.com/*"],
world: "MAIN",
run_at: "document_end"
}
async function ping() {
console.log("Component in real world")
const resp = await sendToBackground({
name: "ping",
body: {
id: 123
},
extensionId: "dbihgacbiojmefppibfimnmpabpifldj" // find this in chrome's extension manager
})
console.log(resp)
}
setInterval(ping, 1000)