Brandon
Brandon
PD🧩 Plasmo Developers
Created by Brandon on 12/24/2023 in #🦉pallas
I had to create a new tab to get this to
@Adeel Ehsan Not sure if you figured it out, but I just ran into it again. I deleted the build folder and built it again. Then it worked. Something else to try
31 replies
PD🧩 Plasmo Developers
Created by Acetyld on 12/24/2023 in #🔰newbie
Where can i see the logs from my popup.vue or popup.tsx?
I'm not sure about vue, I'm using react, sorry @Acetyld
5 replies
PD🧩 Plasmo Developers
Created by Brandon on 12/24/2023 in #🦉pallas
I had to create a new tab to get this to
pnpm dev
31 replies
PD🧩 Plasmo Developers
Created by Brandon on 12/24/2023 in #🦉pallas
I had to create a new tab to get this to
I'm using pnpm
31 replies
PD🧩 Plasmo Developers
Created by Brandon on 12/24/2023 in #🦉pallas
I had to create a new tab to get this to
yeah I have a whole bunch of tabs open, but every time I reload the extension, I open a new tab
31 replies
PD🧩 Plasmo Developers
Created by Brandon on 12/24/2023 in #🦉pallas
I had to create a new tab to get this to
I didn't make any changes to my package.json
31 replies
PD🧩 Plasmo Developers
Created by Brandon on 12/24/2023 in #🦉pallas
I had to create a new tab to get this to
json {
"name": "Chrome Extension",
"displayName": "Web Chrome Extension",
"version": "0.0.1",
"description": "Here's the description of the app",
"author": "Me",
"scripts": {
"dev": "plasmo dev",
"build": "plasmo build",
"test": "plasmo test"
},
"dependencies": {
"@plasmohq/messaging": "^0.6.1",
"plasmo": "0.84.0",
"react": "18.2.0",
"react-dom": "18.2.0"
},
"devDependencies": {
"@ianvs/prettier-plugin-sort-imports": "4.1.1",
"@types/chrome": "0.0.251",
"@types/jquery": "^3.5.29",
"@types/node": "20.9.0",
"@types/react": "18.2.37",
"@types/react-dom": "18.2.15",
"prettier": "3.0.3",
"typescript": "5.2.2"
},
"manifest": {
"host_permissions": [
"https://*/*"
]
}
}
json {
"name": "Chrome Extension",
"displayName": "Web Chrome Extension",
"version": "0.0.1",
"description": "Here's the description of the app",
"author": "Me",
"scripts": {
"dev": "plasmo dev",
"build": "plasmo build",
"test": "plasmo test"
},
"dependencies": {
"@plasmohq/messaging": "^0.6.1",
"plasmo": "0.84.0",
"react": "18.2.0",
"react-dom": "18.2.0"
},
"devDependencies": {
"@ianvs/prettier-plugin-sort-imports": "4.1.1",
"@types/chrome": "0.0.251",
"@types/jquery": "^3.5.29",
"@types/node": "20.9.0",
"@types/react": "18.2.37",
"@types/react-dom": "18.2.15",
"prettier": "3.0.3",
"typescript": "5.2.2"
},
"manifest": {
"host_permissions": [
"https://*/*"
]
}
}
31 replies
PD🧩 Plasmo Developers
Created by Brandon on 12/24/2023 in #🦉pallas
I had to create a new tab to get this to
Someone suggested closing the browser and restarting it
31 replies
PD🧩 Plasmo Developers
Created by Brandon on 12/24/2023 in #🦉pallas
I had to create a new tab to get this to
I copied and pasted yours and it's working for me* with my suggested change
31 replies
PD🧩 Plasmo Developers
Created by Brandon on 12/24/2023 in #🦉pallas
I had to create a new tab to get this to
in popup.tsx
31 replies
PD🧩 Plasmo Developers
Created by Brandon on 12/24/2023 in #🦉pallas
I had to create a new tab to get this to
change const res = await sendToContentScript({ name: "getContent" }) to const res = await sendToContentScript({ name: "content" })
31 replies
PD🧩 Plasmo Developers
Created by Brandon on 12/24/2023 in #🦉pallas
I had to create a new tab to get this to
Can you share the files you have?
31 replies
PD🧩 Plasmo Developers
Created by Brandon on 12/24/2023 in #🦉pallas
I had to create a new tab to get this to
31 replies
PD🧩 Plasmo Developers
Created by Brandon on 12/24/2023 in #🦉pallas
I had to create a new tab to get this to
I have contents/content.tsx
31 replies
PD🧩 Plasmo Developers
Created by Brandon on 12/24/2023 in #🦉pallas
I had to create a new tab to get this to
I just mean after I reloaded the extension, I had to use a new tab. All existing tabs wouldn't work.
31 replies
PD🧩 Plasmo Developers
Created by Acetyld on 12/24/2023 in #🔰newbie
Where can i see the logs from my popup.vue or popup.tsx?
If you right click on the popup in your browser, you can click "inspect". This should open a new window where you can view the console logs.
5 replies
PD🧩 Plasmo Developers
Created by samson on 12/22/2023 in #🔰newbie
Receiving end does not exist.
I figured it out... Apparently you need new tabs, not just a refresh of old tabs.. OOF. Thanks for the code and suggestion of using .tsx @samson
18 replies
PD🧩 Plasmo Developers
Created by samson on 12/22/2023 in #🔰newbie
Receiving end does not exist.
popup.tsx
import { useState } from "react"
import { sendToContentScript } from "@plasmohq/messaging"

function IndexPopup() {
const [data, setData] = useState("")

const handleClick = async () => {
//call function inside content script
const res = await sendToContentScript({ name: "getContent" })
console.log("result is", res)
}

return (
<div>
<button onClick={handleClick}>Click again</button>
</div>
)
}

export default IndexPopup
import { useState } from "react"
import { sendToContentScript } from "@plasmohq/messaging"

function IndexPopup() {
const [data, setData] = useState("")

const handleClick = async () => {
//call function inside content script
const res = await sendToContentScript({ name: "getContent" })
console.log("result is", res)
}

return (
<div>
<button onClick={handleClick}>Click again</button>
</div>
)
}

export default IndexPopup
18 replies