🧩 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 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:...

Uncaught Error: Extension context invalidated.

Hi, I'm getting the following error:
Uncaught Error: Extension context invalidated.
Uncaught Error: Extension context invalidated.
And I'm sending messages when an
iconEle
iconEle
is clicked from
content.ts
content.ts
to
background.ts
background.ts
like this:...

What exactly invalidates the context?

When testing my extension, I noticed that it was often showing me the "Context Invalidated, Press to Reload" tooltip in the bottom right of the screen. In the dev tools, I can see the "Script Runtime - reloading" message too. The problem is that this happens even when I don't update any file in my project. I don't see any update in my terminal neither. This is something new, so it must be something I've done, but I can't figure out why. Is there a way to tell more precisely what invalidated the context?...
No description

How Insert CSUI when Extension Action Icon is clicked

Hi, I am using React to write Plasmo. I just want to click the icon to inject CSUI when I want to use the extension. I don't want CSUI to inject automatically because I may not need to use it in most cases. Is there a good way to do this?

working with https in development?

Hey all, Been working with plasmo for all of 1 day, and like it so far. I am in test/dev mode right now, and want to work with a local https server. I found the following link on the React side to run npm with HTTPS=true, https://create-react-app.dev/docs/using-https-in-development/ ...

Am I using Port Messaging correctly?

I have the following: background/ports/alarms.ts ``` // don't need anything from here. The entire goal here is to have background -> foreground comms...

How to re-render content script on URL change (youtube)

I'm building a Plasmo extension for YouTube - youtube updates their pages dynamically, so the content script is not being re-run when page content is changed. So for example, I want to re-run a Plasmo CSUI each time the user goes to a different video. I imagine I'd have to detect change in the DOM tree somehow, and then trigger my content script to re-run. However, my question is, how would I go about triggering a content script to rerun in Plasmo?...

web accessible resources extension_ids: [] is an empty array in production but present in dev

web accessible resources extension_ids: [] is an empty array in production but present in dev $CRX_ID, how to fix?

Vue Components

I've broken my sidebar out into multiple components: a header, a body, a footer, and an opener. The opener is a tab that shows when the sidebar is closed and allows the user to open it back up. Everything displays properly, but I'm getting a set of errors in console for the sidebar components which I don't feel comfortable ignoring. An image of these errors is provided. These components are all imported into a Sidebar.vue file, which is then imported into a container that is used on whichever site that particular container supports. I'm willing to provide more context on this code if it would prove useful. Any help is appreciated. I would love to see and help Plasmo improve in its support of the Vue framework, both from a documentation and bug squashing standpoint....