🧩 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

getStyle API not firing?

I'm using the API in one of my content scripts: export const getStyle: PlasmoGetStyle = () => { console.log('RUNNING); const style = document.createElement("style")...

Using Plasmo in Nx Monorepo

Hi guys, I'm trying to integrate Plasmo into Nx Monorepo, want to know if anyone tried and got it working? It would be very grateful if there is a project.json configuration file to share

messaging between content scripts and tab pages

Hi I am struggling to get my head round how I would communicate between content scripts and tab pages. TlDR I want the ability to control multiple webpages in the background with a UI, is this the best way?...

Where can I see the key/value pairs saved by Plasmo's storage API in the dev tools?

I checked in the the "Application" tab, but there is nothing in storage there. Thank you!...

Why my extension doesn't update automatically sometimes?

Sometimes I'm writing code and saving it multiple times, then I save it a last time before testing, it says its re-packaged but it's actually behind, so I have to restart the dev server to see the changes.

Facing ERR_PNPM_WORKSPACE_PKG_NOT_FOUND Error while trying with-nextjs repo from examples

examples/with-nextjs on  main is :package: 0.0.1 via ⬢ v18.16.0
➜ pnpm i
 ERR_PNPM_WORKSPACE_PKG_NOT_FOUND  In : "@plasmohq/prettier-plugin-sort-imports@workspace:*" is in the dependencies but no package named "@plasmohq/prettier-plugin-sort-imports" is present in the workspace
examples/with-nextjs on  main is :package: 0.0.1 via ⬢ v18.16.0
➜ pnpm i
 ERR_PNPM_WORKSPACE_PKG_NOT_FOUND  In : "@plasmohq/prettier-plugin-sort-imports@workspace:*" is in the dependencies but no package named "@plasmohq/prettier-plugin-sort-imports" is present in the workspace
...
No description

Using environment variable for array

I'd like to do something like this in my .env file:
PLASMO_PUBLIC_DOMAINS=["http://foo.com/*", "http://bar.com/*"]
PLASMO_PUBLIC_DOMAINS=["http://foo.com/*", "http://bar.com/*"]
and then be able to reference it, e.g., in package.json:...

how can I send message to ext from a bookmarklet?

Relay maybe too heavy and I cannot figure out how to use relay in a bookmarklet. And if there is no such function, would you like to add this feature?

Is there a way to talk between content CUI scripts?

I have some buttons on the screen and I want to create a popup to show status is that possible when I click on the button popup gets open? (overlay) or is there something so I can open overlay within same component using absolute css position as right now using absolute it's just puts within the component....

When using getOverlayAnchorList. how to get the id of the parent element?

When using getOverlayAnchorList. how to get the index of element?

Multiple root containers question

I have a content script inserts a new root container in a website.: ``` export const getRootContainer = () => new Promise((resolve) => {...

What's the usage of `pages` folder in the `with-message example? And how can I test relay messaging?

I had tried the with-message example for server days but no good result on relay messaging. Found that there is Next.js and a special address localhost:1947, I guess it maybe a bad example? Maybe I misunderstand the meaning of this part of docs, Relay Flow,Website,CS/BGSW,Yes,No .

Google Analytics on Content Script

Hey all, in your docs you talk about how it's possble to use GA in your system, but the example only shows for popup, how about content scripts? are they supported?...

Using Google Analytics inside content script?

Hello everyone, Nice to be on this forum I'm trying to send Google Analytics events from a content file. First, I verified that the example with-google-analytics is working fine and GA is logging events successfully. Then I switched to the example with-content-scripts-ui, and basically just copied over the content of popup.tsx from the previous with-google-analytics example into the latter example project. ...

Style.css styles get overwritten in Context

Hi team plasmo, Am facing a problem with my css styling, Am using tailwindcss for my styling but I have some custom css in the style.css file but when I visit other websites those styles look weird because the current tab styles override what I set in the styles file. Even the fonts as well behave the same way which is been loaded from my local. I followed everything in the documentation for with-tailwindcss setup for the content.ts file. Not sure what to do from here and its a real block from pushing what I have built. Anyone help me out 🥲 Link to the project:...

[SOLVED] Unable to override manifest.json

I'm facing an issue with my extension where the content script is being executed on all pages of my browser instead of just the following site: https://app.hubspot.com/* I tried modifying the manifest in the package.json file, but I'm getting this error message: "At least one js or css file is required for 'content_scripts[2]'. Could not load manifest." I understand that I need to specify the path to my content script file, but how can I do that when its name is not the same in the build version ? This is my manifest from package.json file :...

Opening a Tab Page from a Content Script UI

Hi everyone, I'm working on a command palette. It should open a new tab for some actions from the palette. The problem is that chrome.tabs.create is undefined in content.tsx....

useStorage between two content script components in React

Hi! I’m trying to figure out how to use the useStorage hook. In one component, I do: ```tsx const SubtitlesContainer = () => { ...

How do I share state variables between two anchored React components?

I understand well how to inject independent React components as described here: https://docs.plasmo.com/framework/content-scripts-ui However, I don't understand how to share state variables between those two components. In a regular React application you'd typically "lift the state up", but here I don't understand how that would work. Do I have to create an ancestor component without an anchor that would wrap the two components?...

Pass data from Content Script to Popup

Hi all! First of all: many thanks for this awesome framework, it absolutely makes building an extension a breeze 💪 I am working on an extension with the following setup:...