🧩 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

How to Observe and Render a list of root containers

I want to implement a Linkedin comment assistant. Each time user clicks Comment section, I want to add a RootContainer to (newly created DIV). There may be many DIVs, so render should continuously observe DOM changes and create new Container. I tried to implement getInlineAnchorList() and custom render, but its not working. any ideas/direction I need to go?...
No description

How do you programatically close the popup?

I'm trying to hide/close the popup once the user has finished interacting with it. Is there a programatic way to trigger closing it? Closest thing I've been able to find is this internal API, which doesn't seem accessible from within popup.tsx: https://github.com/yoloforks/plasmo/blob/main/cli/plasmo/src/features/manifest-factory/mv3.ts#L16...

Shortcut keys clash with TextArea when React component is mounted via InlineAnchor ShadowDOM

I have mounted a react component (NextPage) via InlineAnchor to ShadowDOM using custom DOM mounting. The react component has a textarea where the user needs to enter some text. However, some keys won't work as they are shortcuts of the website the extension is applied to. I tried manually mounting my component but it loses the Tailwind styling which I also saw later in another post https://discord.com/channels/946290204443025438/1072196997517414572/1072226317010997410 I also thought of using a...

Is there a way to use Tailwind on Content Script UI Overlays?

Docs don't mention it in the styling section and it doesn't seem to work for me

How to use `@plasmohq/messaging` to create two port between BGSW and Tabs Page?

I currently have a requirement to implement bidirectional communication between a Tabs Page and BGSW, which means creating two ports, one is the port from BGSW to Tabs Page, and the other is the port from Tabs Page to BGSW. Both sides can send requests, both sides can respond to requests, and they can also actively push. How to implement this?

Where's the standard output for background messaging workers?

If I console.log something from a PlasmoMessaging.MessageHandler, where does it go? I don't see anything in my local terminal, the web page console, or the index.js service worker console.

Docs for Message Flow results in typescript error

Hey folks, I'm following the docs for message flow here: https://docs.plasmo.com/framework/messaging#message-flow copying the code basically as-is gives me a typescript error on "name". I checked the repo of examples and name is a string there as well. Any ideas?...
No description

How does sidePanel works?

Hi, is there some information how sidePanel works? I know that there is an example but it works "magically". I am interested in sidepanel with Svelte and it would help if I would understand how it works.

Styling not applying on content.tsx with-styled-components example

I am trying to setup my plasmo project with styled-components and the styling seems to work on the popup.tsx but not on the content.tsx that I am trying to inject. Here is a screenshot, I used the example file with-styled-components and just changed some colors on the Link component and Container as you can see on the popup. Let me know if that is normal or a bug and if so if there is a workaround. Also weirdly the popup.tsx shows up shrinken but for my use case I am only using a content.tsx app...
No description

extension submission workflow failure

Hello , when i trigger a workflow on github to submit my extension to selected browsers, it fails and throws an error "Command 'package' not found", i tried to follow exactly what was on the documentation, i ran what was inside of .github/workflows and its content looks like this ` name: "Submit to Web Store" on: workflow_dispatch:...

Supabase host permissions

Hey all! I'm following the guide to add Supaabase to my extension: https://docs.plasmo.com/quickstarts/with-supabase The guide says to update manifest with the following snippet....

Is there an example on how to send a message from service worker when chrome.alarms event triggers

I have a service worker / background script that has the chrome.alarms.create() code followed by chrome.alarms.onAlarm event handler. Now, when the alarm triggers, I would like to notify my content script. I did see the ports API, but it seems like it first needs to get a message from the content script before it can send a message itself? Also, since I need to declare the event handler in the global scope and not within the ports api handler, how do I go about implementing this?

How to use plasmo with a side panel?

I was previously using the tabs folder workaround, but it seems that @lab has added proper support for a sidepanel.tsx file (awesome work Louis). I cannot for the life of me figure out how to get this to work even looking at the example. Is there something obvious I'm missing? https://github.com/PlasmoHQ/examples/tree/main/with-sidepanel...

Does Plasmo content ui support raw html without injecting react runtime?

Hi, I am creating an extension which has a lot of content user interface being injected in every page. Due to performance considerations I want to inject as few runtimes as possible....

Targeting Firefox MV2 instead of Chrome MV3 by default

Hey everyone, I was wondering how I could configure plasmo so it targets firefox manifest v2 instead of chrome?

Need help figuring out how to make a simple fetch request to an api

How do I use the messaging API to make a simple fetch request to an external API?

Extension runtime is not available

Hi when i try to send a message from a CSUI to a background throws an error "rror: Extension runtime is not available" How do I communicate from a csui with the rest of the application?...

How to use Fluent UI with Plasmo

I hope to use fluent UI componants in my extension? how to mount the styles from it?...

`plasmo dev` doesn't work in yarn pnp monorepo

I initialized a basic plasmo extension in the packages folder of our monorepo. we are using yarn plug'n'play so I tried running pnpify plasmo dev in the script. But I get this error ERROR | EROFS: read-only filesystem, open '/node_modules/@plasmohq/parcel-config/run.json' I tried running it with verbose and get this. ``` EROFS: read-only filesystem, open '/node_modules/@plasmohq/parcel-config/run.json'...