🧩 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

Messaging-chrome.runtime.sendMessage() called from a webpage must specify an ExtensionID (string)

TypeError:error invocation of runtime.sendMessage(optional string extensionId, any message....): chrome.runtime.sendMessage() called from a webpage must specify an ExtensionID (string) for its first argument. I'm using sendToBackground from a function injected into the webpage from the content script through the 'MAIN' world. The website is also already is listed under "externally_connectable" and have an async API call set up in a file under background/messages. The code is like this:...

How to add additional icons into the extension build

Is there a way to include other icons in the build so that I can customise my extension icon depending on which url I'm on? In the icon page within the documentation, I can see there are options to include icons for specific builds, however I would like to ask if there is a way to include other icons for the same build? My psudo-code usecase:...

Can't import useChat from Vercel's AI SDK

Fails on a new project as well. ``` 🔴 ERROR | Failed to resolve 'ai/react' from './popup.tsx' 🔴 ERROR | Cannot load file './react' from module 'ai'...

github action permission denied

I'm doing this to an existing chrome extension. Am I not supposed to use github actions to an already existing extension? any ideas?...
No description

"Hot pushes" in Plasmo extension

I've built a Plasmo extension with multiple React components that I plan to share privately inside my company as a zip bundle. The challenge is that I don't want to redistribute the zip file every time there's a new version, and would like the zip file to only bootstrap the extension and for everything else to be loaded from a server. Is there a recipe for doing this in Plasmo? Alternatively I've noticed there's a "private" option for publishing in the Chrome Web Store and I'm wondering if that...

How to integrate lemonsqueezy into plasmo plugin?

lemonsqueezy and paddle are used a lot in the plugin, can you provide code examples or blog posts explaining how to integrate into plasmo? Please help me!

Supabase auth with OAuth, in Popup instead of Options page?

Is it possible to do supabase auth, with 3rd party oauth provider, in popup page instead of options page?

Injecting CSUI inside iframes?

My extension does not work on elements that are inside iframes. However, an extension built with plasmo called Jasper does work, and grammarly does work too. So I know this is feasible. How can I implement this? Can I use Plasmo's lifecycle or do I need to implement my own approach?...
No description

Document is not defined on chrome mv3 in a background.ts file

Hello, I have created a context menu that copies something to your clipboard. This is the function I'm using: ```ts function copyToClipboard(text: string) { const el = document.createElement("textarea")...

how to setup auto/force updates?

Guys I’ve made an extension but I see random update behaviour with respect to it, sometimes it auto updates but other times I have to uninstall and reinstall from chrome store, any way I can ensure to auto update it for all my users, when they open a new browser session?

Add item to context menu

Hey! Do we have a API or something to manage context menus? I want to add an item to when the user right clicks some text selection and I was wondering if Plasmo offers anything like that. Couldn't find anything on the docs....

Text insertion?

Hey everyone. My extension adds a little icon at the bottom of inputs or contenteditable divs (like many extensions do). When clicking that icon, a popover with a textarea appears and you can write on it. After clicking a little button next to the textarea, a API call is made and I want to set the result of that API call to the input (a.k.a. the anchor) in the position the caret was before the user opened the popover. Has anyone accomplished that already? What's the best way? I've implemented a solution but it's not really reliable. I'm happy to share my code....

How to get reference to overlay anchor

Hello! I want to position an icon on the bottom-right of every contexteditable=true or textarea element that is currently focused. To do that, I was thinking on getting the element via getOverlayAnchor with a querySelector. However, to accomplish it I need to get a reference to said element in order to get its bounding rect and calculate the position accordingly. ...

Best way to use `useStorage` with `SecureStorage`?

Looking at setting up useStorage hooks for SecureStorage items. Are there preferred ways of handling the password setting for the new SecureStorage? Any examples?

Seeing an error `The "path" argument must be of type string. Received an instance of Object`

Trying to run pnpm dev Full error response is: ``` 🔴 ERROR | Build failed. To debug, run plasmo dev --verbose....

Invalid value for 'content_scripts[0].matches[0]': Empty path. Could not load manifest. Please help!

I was in dev mode editing the contents/test_leetcode.tsx file import type { PlasmoContentScript } from "plasmo"...
No description

Can you send messages from content scripts in the main world?

I'm kinda lost between just having the following in the content script ```js const resp = sendToBackgroundViaRelay({ name: "editor" })...

What is "injecting code into the main world"?

Can someone explain the concept of "injecting code into the main world"? Does this just mean adding new objects to the global window scope? ref: https://discord.com/channels/946290204443025438/946290204904390690/1086103033919832064...