🧩 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

Struggling with Plasmo Messaging API: Sending Message from CSUI to BGSW Issue

Hey guys, I've tried so far to understand how Plasmo Messaging API works (from CSUI to BGSW) and although I read through the whole Doc again and again I still miss some key understanding. Long story short, I try to send to the background a message 'clipboards' via a
useEffect
useEffect
from
content.tsx
content.tsx
: ```useEffect(() => { //extensionId is defined as the CSUI injected in the main world...

Style / Font consistency between content scripts

Hey! I'm wondering if anyone else has ran into issues with content script's styling and fonts being applied differently accross web pages? It's kinda jarring when I'm trying to create a persistant look between pages.

Building a standalone Embed

Hey everyone! I have an extension I've been building with Plasmo for work and we were asked to also bundle it as an embeddable widget for sites to include on their page without needing the chrome extension installed. I was wondering if anyone here had any tips on how to go about doing this. Obviously there are a lot of extension-specific APIs that can't be re-used, but we'd like to re-use as much as the UI as possible and bundle it in a similar way. We've tried using the parcel bundler like parcel build ./src/widget/index.tsx --target widget with the target specified in the package.json, but we're running into a lot of dependency resolution issues, specifically with the ~/* configured to be ./src/*, and pnpm workspace modules....

CSUI Best practices question

Can I get some advice on what is the best way for me to append a new button shown in the screenshots? The inspected the element and it doesn't seem to have a unique id i can target in the content script. My first hunch is to use querySelector but I think this is a very brittle method....
No description

Trigger content scripts from background.ts?

Hello everyone, I have some content scripts like that. I want to trigger on of them to re-run from background.ts like that. But it seem does not work. Please help me. Thanks!...
No description

Performance implications of multiple content script and one redux store

Hey, I'm wondering if someone has tested if the shared Redux store across multiple content scripts will damage performance when it's across let's say 20+ tabs.

Cross browser extension

I have build the extension using the plasmo and its working on the chrome. I have generated the build for firefox and its not working. is't plasmo supposed to support both chrome and firefox ?

Opening Modal in the Center of the screen when clicked a button inside pop-up of plasmo framework

i have created a chrome extension using plasmo framework and i have a button onClick of which i want to show a modal component in the middle of the screen of the chrome tab. please write me clear instructions on how to do it

Content script not executing

Hello everyone, I was going though the docs and the getting started section. I'm trying to load a content-script as on this page https://docs.plasmo.com/framework/content-scripts and https://github.com/PlasmoHQ/examples/blob/main/with-content-script/content.ts However, when I visit https://www.plasmo.com the script does appear to load/execute for some reason. I'm on firefox, and I've attached my folder structure, the content script and the console from dev tools. ```js import type { PlasmoCSConfig } from "plasmo"...
No description

⚡ Using Plasmo with Auth0, React a backend and content scripts

Hey everyone! I'm currently trying to build a Chrome Extension using Plasmo, Auth0, React, a dedicated backend, and content scripts. I'm really not sure what would be the best architecture here....

How to listen to port with React

I want listening to a port in sidepanel I have check in my background file port and the sender and port handler are correctly configured, the problem is in the receiver I try this ```tsx export default SidePanel() { const port = usePort("node")...

Trigger CSUI conditionally

Hi There, I am trying to highlight some text on a web page & show a card when hover on the text.. Was thinking of using CS to highlight the text & CSUI for the card... but I am struggling with the best approach to communicate btw my CS & CSUI.. I can add an event listener to track hover & send msg to CSUI so it will show.. but I wonder what's the preferred way to do this with plasmo...

how to use mozilla/readability?

i want to use reaability in my project but it seem that cannot pack correctly ``` import { Readability } from "@mozilla/readability" console.log("background script loaded")...
No description

Trouble setting up

I've never used this framework before and I've tried npm create plasmo --with-src. This appeared to create a new project but without the src folder. I decided to delete the project and try again, this time with the --with-tailwind option. What resulted was even stranger. This opened a new cmd window, completed the install, but I'm unable to find where the project is. It's not in the cwd of the first shell. Are these options only supported with pnpm? And anybody have any idea where the project was created if at all? (Found it in the root of my second drive)...

importing large css file from node_modules is getting truncated (data-text)

I'm importing mantine core styles using import mantineCssText from "data-text:@mantine/core/styles.css" this is how I inject to csui styles to shadow root ```export const getStyle: PlasmoGetStyle = () => {...
No description

New browser extension

Hi i am newbie in plasmo... if I understand correctly, the extension is a classic react application, so I use react-dom for routing, while the nextjs plugin is not to create the extension with Next, but is just to have an environment with a Nextjs application and the relative extension. It's correct?

My extension bugged out severely

Hi, so I noticed my extension got bugged out alot out of nowhere, I believe it's because of an update as I haven't updated it in a long time. Anyone have any suggestions? Or how I can update plasmo chrome extension?
No description

I am unable to open popup.

I've added src/popup/index.tsx It's linked inside .plasmo dev build as well. But when I clikc on the extension icon, it doesn't open. I restarted server several times, unloaded and loaded the extention many times, refreshed the browser tab etc, but it doesn't show up. But content script is working perfectly fine. When I change content script, the page reloads but when I change popup file, no reload. ...

I cannot get content script to work

I add a content script to the firebase auth example and I spent 5 hours just trying to get plasmo to build it but it never recognized the script. I straightup copied the script from the official content-script-example but it never worked, someone help me with this please. When I check the build folder its just default files, my plasmo refuses to build any of my files...