🧩 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

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

npm run dev gives: SyntaxError: missing ) after argument list

Here is my package.json ``` { "name": "meets-helper", "displayName": "Meets helper",...

want to avoid duplicate wasm files during the build process.

loading wasm in both the background and content script. When build in this state, the same wasm gets duplicated. How can we use the same wasm in both the background and content script without duplication? ``` rw-r--r-- 1 user staff 10655 5 18 23:55 icon128.plasmo.3c1ed2d2.png -rw-r--r-- 1 user staff 857 5 18 23:55 icon16.plasmo.6c567d50.png -rw-r--r-- 1 user staff 1960 5 18 23:55 icon32.plasmo.76b92899.png...

Altering an anchors markup/inline styles

Is there a way (maybe involving the main world?) to append some inline styles to a webpage to effect layout. If my selector for the content scripts anchor returns something like ```...

How to share service worker API response to many content scripts

I have several content scripts that require the response (HTML) that a service worker background script provides. Only one of these content scripts is able to scrape the URL that is required by this background scripts fetch that it makes (Passed via the sendToBackground body payload). I cant figure out how I can share this HTML string response from the background script to all the content scripts (like react context etc). For this to happen I can see that the Card.tsx (containing the sendToBackground call with the required URL to call in) would need to be the first CS to run and possibly store the response so that the other CS's could call a different message that retrieves the stored value via an identifier? Any help will be much appreciated....
No description

Re-rendering with a custom render function

I'm using a custom render and getRootContainer function in order to mount a custom element directly onto a specific pre-existing div without the use of shadow root (in order to adopt the existing page styles) and to avoid using any typical Plasmo parent elements. However, unlike the default exported component which automatically re-renders when the root is removed and added back in, this custom render does not adopt the functionality. When my custom root container that I've declared is removed from the page and added back in, my custom BetterInput component does not re-render. What is the best way to solve this problem? The following is my code: ```tsx export const getRootContainer = () => new Promise((resolve) => {...

Can not render react component inside Overlay

I am trying to render a component from deepchat.dev in the overlay to make a floating chat box, but it ends up showing no overlay at all. I tried to render the component alone, inside the span,... but it didn't work and inspecting shows no CSUI has been rendered. However, when I remove the <DeepChat> component, the span is rendered fine. The <DeepChat> component works perfectly fine in the pop-up, the bug happens only on CSUI Anyone encountered this before? ...

How do I call functions and get the return values from a popup?

I've been trying to put together a simple proof-of-concept for an idea I had to create an extension that could call some functions and get data from a content script running on a page. I can't seem to figure out how to get the communication between the popup and the content script. I keep coming across information that says to either use the underlying chrome.runtime in the content script or use plasmo's messaging, but whenever I try to do any kind of messaging in the content script, I get an error saying that chrome.runtime effectively doesn't exist (trying to access a property of a non-object)....

Can a Browser Extension look like Apple's Dynamic Island?

I've never built a browser extension, but I had an inkling of a UI idea to build something akin to https://emilkowal.ski/ui/dynamic-island that could show up in the user's top right corner and morph around. This is probably a stupid question, but in the spirit of the Post Guidelines of "Ask anything here, and we mean anything!", is this possible?...