🧩 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

Is there a way to create a project with multiple configurations

plasmo create --with-tailwindcss --with-nextjs --with-supabase only creates a project with tailwind...

How can i show an welcome page when users install my extension?

I attempted to implement the example found at PlasmoHQ's GitHub repository (https://github.com/PlasmoHQ/examples/tree/main/with-newtab) and followed the setup instructions detailed on the Plasmo framework documentation (https://docs.plasmo.com/framework/ext-pages). Although I can navigate to the page via chrome-extension://<extension-id>/tabs/test.html, the tab page does not automatically launch upon installation. Could you provide guidance on resolving this issue?

Messaging best practices

Do you recommend using Plasmo Messaging API instead of Chrome Messaging API ? Is a combination of both possible ? Thank you for your time!...

problem in staging and production modes

Hello everyone, I'm working on an extension and encountering an issue when building the extension in both staging and production modes. I get a "TypeError: Cannot read properties of undefined (reading 'transformOrigin')" error. I'm using Chakra UI, so maybe the problem lies there. Everything works fine in development mode. I would be very grateful for any help, thank you....

Framework-Understanding

Hi, I am building an chrome extension for recording sreen and webcam simultaneously using plasmo. I am a noob in the extension field but curious to explore. Facing difficulties in execution of my project. It would be great if I can get 15-20 mins. of plasmo dev time to clear all the issues. Thank u in advance 👍...

Help with showing script ui. (content.tsx) when clicking on chrome extension

Hi! I'm trying to show the script ui (modal content using a content script ui) when clicking on the chrome extension icon instead of showing a popup. I have this in content.tsx: ```typescript export const CustomModal = () => {...

How to send API requests with messaging?

Hey everyone, I can't seem to figure out on my own how to send API calls using Plasmo? I see a lot of 'earlier' posts saying to use the Messaging API, but how could I create a simple API call to e.g. my Supabase DB or anything else? I added a picture of what my "ideal" situation would be, if there is anyone with such experience needed I would love to know how you would tackle this....
Solution:
to use the messaging api you would need to use the sendToBackground function from @plasmo/messaging in the jsx/tsx/content script. you need to create a message handler in background/messages/<handler_name>. The handler is where you would perform the api fetch request. Given your provided case I don't think any use of the messaging api is needed since the popup should be able to use the credentials as is
No description

Dynamically change icon

How can I achieve this?

Plasmo Injected CSUI disappears on Click

I have a plasmo extension where i am injecting a component ui using conten script and i am making it conditionally rendered but here on the first go it is not working and when it works and click any component part which is injected, it disappears. Anyone has any idea about this?...

How to install a npm package?

I'm trying to build a chrome extension by using Plasmo, after initialize a project, and I installed other packages on npmjs. Such as npm i jwt-decode. But never works, I got the error like npm ERR! Cannot read properties of null (reading 'matches') or npm ERR! Cannot read properties of null (reading 'edgesOut'). Could anyone help? Thanks....

How to include JSON file referenced in manifest (Failed to resolve file.json)

I'm trying to setup "declarative_net_request" in the manifest. However whenever i include the resource "blocklist.json" I get the "failed to resolve" error. Here's my package.json: ```json { "name": "test", "displayName": "Test",...

Dynamic Configuration

Is there a way to dynamically generate the manifest. For example, if I'm doing a build, I'd want certain variables to be omitted, like the host, localhost, but for dev I'd want that to be in there. Is this possible?

Help needed In API call from extension

I am building and extension with plasmo I have one csui where I have all my code. I want to sent a request to my server, after finding it I found that messaging can be used for that my structure look like |---contents/ | |--App.tsx...

Is there any way I can open the react component in the new tab?

I have react based extension and I want to open a component in the new tab. Is that possible ?

How can I listen for messages from the extension popup in ALL (there could be many) active contents?

I have the following configuration for a UI content-script (although I don't actually need the UI -- the content script is only used to add listeners for UI interactions and instrument HTTP requests from the injected page automatically, it just seemed like the messaging hooks might be more ergonomic): ```ts export const config: PlasmoCSConfig = { matches: ["<all_urls>"], world: "MAIN",...

Can anyone code review my extension

https://github.com/Tricked-dev/betternexus i feel like im doing a bunch of things wrong that could be improved can anyone look at my extension and tell me what i can do to improve the codebase / make it more reobust?

Including remotely hosted code in a Manifest V3 item.

Hello @louis I've created a web extension using plasmo. And after successfully completing the extension I am uploading it on chrome web store over there I am getting the following rejection email. I've been banging my head around this issue a lot from past few weeks but I am unable to resolve it. And for some reason the storage permission is getting while generating build even though I am not adding in the manifest which is another reason for extension getting rejected from the web store. I am not sure if I am missed something. I am newbie to extensions I would really be greatful to your help. Can you please help me identify the issue? And please help me resolve it? Following is my manifest ``` { "icons": {...

Ant-design elements are affected by CSS on different websites, how do I fix this?

Hello everyone, I have implemented the drawer menu of ant-design on google.com and github.com. However, it seems like the css of github has affected the "Some contents..." <p> element inside the drawer menu on github. The problem is fixed when I delete the <head> on github.com. From this, I understand that the css of github is affecting my shadowdom. How can I solve this? Please check out the video attached. Code source:...

Whats the best way to communicate between Content Scripts?

I use Plasmo for injecting multiple CSUI scripts into a webpage. For example I use one CSUI to add a button to the toolbar and another one to display a sidebar on the page. Whats the best/easiest way to make the mounted React components from different CSUI scripts to interact with each other? For example, when the injected button is pressed the injected sidebar should be toggled. Thanks!...

_empty.%.js file generating under build/chrome-mv3-dev?

Not sure what I did to cause this file to generate, but it creates a Load Package Error in chrome and boots my extension entirely. I tried going back a few commits despite them all running successful and this didn’t fix the issue, so no packages/files I added caused this from what I understand. Any ideas yall?