🧩 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 does sendToContentScript from popup work?

I have 2 buttons on my popup, and when I click them, I want them to send a message to the respective contentscript via the sendToContentScript method, where I have a different function to handle each message. To do so, I have created different tsx files for each of the contentScripts. E.g. sendToContentScript({"name" : "generateFields"} is being listened at the generateFields.tsx file and generateFields() function. ...

Where can i see the logs from my popup.vue or popup.tsx?

Where can i see the logs from my popup.vue or popup.tsx?

Need help getting started?

I've got an idea to add hyperlinks on a catalog page, specific to my university. I'd take a specific html element (the professor names), and hyperlink them with a link to their page. I'd have a little script that grabs those names, runs them through a script that searches for them on another website (faculty directory), and returns the url when found. How do I get started?...

Receiving end does not exist.

Hey there, new Plasmo user here. I'm trying to pull some information from the DOM (of the currently active tab) and display it in my extension. Should be simple... I'm getting Error: Could not establish connection. Receiving end does not exist. when calling sendToContentScript. I couldn't find any documentation for this function, so hoping you can point me to the right direction. I refreshed all tabs/ reloaded the extension, so I think the error is due to me not understanding how messaging in Plasmo works.....

Confirmation email link for supabase template not working

I get the following when I click the link on the supabase confirmation email (see image). The confirmation email is for just signing up. I seems like it does confirm their login but it would be nice if there was visual feedback for the user. Does anyone know how to fix this or can point me to resources? Thanks!
No description

Getting data from the current tabs localStorage

Hello everyone. I did look at the previous messages but still not sure how this works. What i want to do is lets say i am on google.com and when i open the extension i want to be able to read from the google.com Local Storage that i have in the browser. I did give storage permission for the extension, and tried to use @plasmo/storage but wasnt successful. Can someone help me with this?

Cannot read properties of undefined

This is the base tutorial, plasmo dev fails with "Cannot Read properties of undefined (reading 'index of')

Communicate Between 2 Content Scripts

Hi, is it possible to communicate between 2 content scripts? I have been looking at the documentation, and there does not seem to be any examples of this design pattern. Thanks!

How do I retrieve data with Plasmo storage api

I have the following code in a JSX component ``` const [selectedDeck, setSelectedDeck] = useStorage("selectedDeck", null) ... setSelectedDeck(deck)...

Is there any method to specify when to run content scripts?

I have a content script widget with max z-index, but still it is not at the top all the time. For some websites, it gets covered by widgets present on that site, despite having z-index of 2147483647. I was hoping the way to fix it would be to specify run_at as document_end. That way it would be at the top of other widget icons. Is there any way to do this?

Getting issues with Content Security Policy

Hey, I am getting issues when trying to test the extension in device mode (iPhone) on Chrome. I am using Firebase in content script for the authentication. It is throwing the CSP error for google api js file. Can anyone help me fix this issue?...
No description

Autofill a Form using Plasmo

I am very new on building extension. I want to build an extension that auto fill a specific form when it is open and user select the item in extension pop-up. I'm facing problem on selecting form fields and injecting value into it. can some please help me to select element from current tab's form?...

Email Verification

Hello, We've recently starting building with Plasmo and have created an account via the web-app. The issue we are currently having is that the email verification is not being sent to our email so cannot proceed. I've tried multiple times to resend the email verification (through the interface) but have no success. ...

How to mount a component to an asynchronously loaded element?

HI, I'm new to front-end and I'm trying to use plasmo for plugin development. The problem I have when I want to add a CSUI is that the DOM node that needs to be mounted is loaded asynchronously, and I don't know how to capture this asynchronously loaded out DOM node using plasmo. I noticed that the official documentation says this: "Since the anchor-getter functions can be async, you also have the power to control when Plasmo mounts your component. For example, you can wait for a specific element to appear on the page before mounting your component." That's what I'm trying to accomplish. Can anyone provide me with some tips or code samples to guide me through this? Thank you very much!...

TailwindCSS in a CSUI makes everything VERY small.

Trying to implement TailwindCSS in a project and can do it fine, but when in the shadow root, it's extremely tiny. Is there an initial configuration that will set the base levels so that it doesn't appear really small?...

Plasmo is not working in Opera

my plasmo extension is working in chrome but not in the Opera One Browser

Docs example of sending a message from MAIN world CS to background throws an error.

When trying to send a message to background thread from MAIN world CS I get this error:
Error: Extension runtime is not available
Error: Extension runtime is not available
Specifically this example in docs: https://docs.plasmo.com/framework/messaging#:~:text=contents/componentInTheMainWorld.tsx...

Issues with using external module for style and components with content tsx

Hello! I am trying to design a content UI with the following package : https://www.docs.wixdesignsystem.com/?path=/story/getting-started--get-started-developing the package require two things: 1. to import a global css to the actual component ...

How to access user object?

In my IndexPopup there is this hook: const [user, setUser] = useStorage<User>({ key: "user", instance: new Storage({ area: "local"...

Parse and compile issue?

I am getting this error only when I run yarn dev:plasmo and its works fine and well with yarn dev:next any idea how to resolve this please? Am I missing something? Using plasmo with Turpo repo and next js...
No description