🧩 Plasmo Developers

PD

🧩 Plasmo Developers

Join the community to ask questions about 🧩 Plasmo Developers and get answers from other members.

Join

👾extension

👟framework

🔰newbie

🦉pallas

Why does the emotion-tailwind-antd example use 2 content scripts

I was using looking at this example to better understand how the framework functioned and I found it weird why inject.tsx was even made. All that it does is check for a tag and then create a div to contain the other elements? Is it for performance? Is it cause the 2nd file has many imports? Then why do both trigger on the same URL? Wouldn't that end up loading both anyway?

I wanna make a button to change some on current page

this button is in popup, how should i handle this? should i send it to background then call content? or onmessage it in content dirtectly? or other message communiting ways?

How to do CSUI routing?

I'm trying to build a chrome extension with plasmo, I' using the cs ui for my extension, now my extension will have multiple pages like initially there will be welcome page then clicking on a button will lead to a diffrent page like that. but I don't know how to do this kind of routing efficiently in CSUI currently i'm using the below approch, which will get out of hand if I add more and more pages, and it is very dificult for complex routing as well. Can someone please help me with any suggesition or something? ``` const App=()=>{ const [page,setPage]=useState(1);...

supabase with turnstile captcha

how and where to add turnstile captcha in supabase plasmo extension? is .env file right place to place turnstile captcha secret?...

runtime.lastError

I am getting the following error: Unchecked runtime.lastError: The page keeping the extension port is moved into back/forward cache, so the message channel is closed. It happens when navigating away from certain webpages. The behavior seems extremely inconsistent and I am not sure where the error is originating from. I've commented out my content scripts with no luck so I do not think it is an issue with my content scripts. ...

run dev plasmo

Very new to plasmo and I am having trouble executing npm run dev for a plasmo project; not sure what I should be doing to resolve this
No description

files get overwritten when I restart the development server; build/chrome-mv3-dev

I want to edit popup.xxxxxx.js and manifest.json. There are two versions of these files that exists one of the versions is in build/chrome-mv3-dev and the other in .plasmo. I have been editing the ones in build/chrome-mv3-dev and when i save and the server reloads things work as i want them to. The problem is when i restart the dev server completely the changes I made to these files is overwritten. Not sure what I am supposed to be doing in order to make changes to these files.

How can i send message from Content Script to SidePanel?

I want to use Chrome MediaDevice API in Content Script UI, but i still need send meesage to my Side panel to make it better view. I don't know which should i use? btw, i dont know what is "BGSW" and what difference it with "CS"...
No description

using existing extension

Is there a way for me to easily integrate an existing chrome extension with manifest.json, background.js, pop.js and .html files to the plasma interface

Failed to resolved error for something which doesn't even exists...

I am using plasmo with nextjs & am using tailwindcss for styling. in my styles.css i used bg.jpg for my bg image but even after removing the code, even after deleting build folder & .plasmo folder, even after deleting the file & rewriting the styes, I am getting this error. I have attached the images for your ref & thank you for your help in advance.
No description

I have a problem with a production build, service worker is inactive

I have a problem with a production build, the service worker is down, in development it works without problems, there is no log in the service worker. In addition to the build, and uploading it without packaging, should I do any other changes to test the production build without uploading it to the chrome store?...
No description

Error policy in dev, but not in build

Hello, i have an error that i can't arrive to resolve. I wanted to create a content script ui for LinkedIn. But with the "pnpm dev" i have this error : ```Refused to create a TrustedTypePolicy named 'trusted-html-plasmo-loading' because it violates the following Content Security Policy directive: "trusted-types 'allow-duplicates' default jSecure highcharts dompurify".
Uncaught TypeError: Failed to execute 'createPolicy' on 'TrustedTypePolicyFactory': Policy "trusted-html-plasmo-loading" disallowed....

redirect between tabs page and content

Hey, i trying to create a extension that put a button in a github issue. In the simplest form all the button does is 2 api calls. But the additive is i want to add auth and found tab pages are the go to for this. The idea is when the button is clicked the user is redirected to tab page, where they log in, i then redirect them back to github issue. ~~I wasnt sure how i could redirect them to the tab page. tried: ``` chrome.tabs.create({...

content.tsx violates "Content Security Policy directive: "connect-src 'self" on some sites

Hi! I'm just starting out using Plasmo and a bit confused on how content.tsx works. I'm trying to create an image icon for an assistant chatbot that would display as an overlaid icon in the bottom-right hand corner of your browsing experience. I have my content.tsx working on some sites, but not others. It seems like the content security policy must be different on certain sites? I'd love some help on getting past this issue!...

Is it possible for the extension to have the same domain as the Webapp

Designer's daily extension has the same domain it seems as their webapp app as such it makes both of them share the same local storage which is something I would like for my extension and the webapp of it.

How to install a Plasmo-built extension into Firefox?

I've been following the "Getting Started" guide and was able to Load unpacked extension into my Chrome browser; but as I usually use Firefox, I wanted to check how that will work in that browser so what I did was
pnpm plasmo build --target=firefox/mv2...

Best way to send data between front end and extension ?

Hello everyone! I'm creating an extension that needs to talk to my front-end. What do you think is the best way to handle this? To explain how it works: 1 - The user enters data in my app (Next.JS)...

I want to modify the DOM, which api should i use ?

I basically want to take a name of a text and bold it. example original: <p>Hello World</p> modified:...

How to record the mic

How do you allow access to record from the microphone from the extention its self? do you require special permissions when i try to access using the web audio api i get a permission error ```bash...

Plasmo config

hey guys i was just wondering, does plasmo package your code for you similar to how webpack does it? im currently migrating to the plasmo framework right now and im trying to figure everything out. apparently you can make a file called plasmo.config.js to set it up simular to webpack but i dont know how true that is. thanks in advance for the help
Next