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"...

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...
How to import Google Font?
@import url('https://fonts.googleapis.com/css2?family=Libre+Caslon+Text:ital,wght@0,400;0,700;1,400&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Libre+Caslon+Text:ital,wght@0,400;0,700;1,400&display=swap');
Remote code execution inside a content script
Hello, I've been banging my head on this one for a while.
I'm trying to implement FullStory support in a CSUI based extension, but the content policy for MV3 is giving me a lot of headaches.
Following the official documentation (https://help.fullstory.com/hc/en-us/articles/360020622854-Can-I-use-Content-Security-Policy-CSP-with-FullStory-) isn't working well because their configurations and CSP include unsafe rules under MV3, causing the extension to be unable to load in a browser (And well, obviously not adding the CSP rules just causes any usage of the script to fail as it can't get through CSP)...
🔴 ERROR | import() is not allowed in service workers.
I'm trying to import Supabase in a service worker to push save some images but I got this error in the console and I have no idea what I'm doing wrong. Any idea?
Here is my
background.tsx
code:
```jsx...AWS Amplify Auth in Extension
It's mostly understanding the authorization flow. I am trying to use a Google Social Auth flow to sign in my user but I'm not familiar with Auth sessions and tokens.
ref: https://discord.com/channels/946290204443025438/1070188420225323038/1070188993603444757...
Detect browser icon click in content.ts
Is this currently possible, or do I need to detect this in the background script and send a message to notify the content script?
How to use AudioContext
Hey hopefully this is the right place to add this. My Company is moving over our chrome extension, which was built with just raw javascript, to using Plasmo.
In our ext we are using the AudioContext from the WebAudio API. I was wondering how I can get access to this in the background.ts file? It keeps showing undefined not sure if I need to import something into the file? thanks
How I'm calling it:...