🧩 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

I want to fill in a form in page from a popup input & button

Can anyone help give me an outline of how to perform this action ?

help w/ mantine notifications

i've got mantine modals working in content.tsx but notifications don't seem to work, probably not mounting them correctly. can anyone provide some help (or code) on how to use mantine notifications in content.tsx [https://mantine.dev/others/notifications/] here's the modal: ``` import { useState } from 'react';...

Send message from popup to cs and back

I have something like: content.ts ```ts chrome.runtime.onMessage.addListener((_, __, sendResponse) => { sendResponse(...)...

React Components render twice?

So I'm trying to split my code into components, but this ends in the component rendering twice on my page. How can I prevent this behavior?
No description

Charging money with PayPal

Is there a best practice for charging money with PayPal in a Chrome extension? The main reason I didn't do this step is that I don't know how to do it right without leaking user data or compromising security, as I'm not a security expert nor know how to manage user data correctly P.S. Stripe isn't an option in my country...

Having to add import react from "react" for each file

i just made a new extension by git cloning my old one and just one small issue is that I have to add import react from "React" in each ,tsx file and in tsconfig, I have to add "jsx": "react", "compilerOptions": {...

Help with inline csui

I'm attempting to add a button above the highlighted section, but I don't really understand how the in-line mounting works. My button always seems to end up below the section. Could anyone clarify and possibly give me some pointers?

Production Source Map?

How would i get sourcemaps to build in production so i can upload them to something like sentry? i'm finding that they work in dev, but when i do build / package, they are no where to be found

How can I not use a Shadow DOM on content?

I need to make it so the content.tsx is fixed to the top of the page (kind of like position-fixed) and push the rest of the open page down, not be "above" it,

Error Monitoring and Metric Gathering

What do people use for error monitoring and metric gathering? I have experience using Sentry, but not sure if that's an "accepted standard" in chrome extensions and no idea how to integrate it (any examples)...

How can I import a font (Roboto) inside content.tsx and keep my style?

I have 2 files: base.css where it only imports the font (from Google API) and style.css where there's all the stylesheet....

window undefined on background script when trying to login via firebase

I'm using React + Firebase. I have a hook that handles user details and a background script that handles the auth via chrome.identity.getAuthToken after I approve the consent screen, the background script throws "window is not defined" any ideas? I followed this link - https://www.plasmo.com/blog/posts/firebase-chrome-extension...

No Response from sendToBackground()

Hi there, plasmo noob here. Trying to call a firebase function on the click of a button from a content-script. Read docs on using the messaging api with a background worker. Think I set it all up correctly but not getting any response at all from the sendToBackground() method. Here's some snippets. ``` // Adding the event listener to my new injected button to call generate newButton.addEventListener("click", async () => {...

Plasmo Equivalent to chrome.runtime.onMessage.addListener

Hi, I am a total newbie trying to figure out how to send triggers from my popup window to my content script. Online I have been seeing examples of adding eventListeners. Does this work in Plasmo or is there a 'Plasmo specific' way to do this. Thanks!...

How can I add Robot font to Plasmo?

Just adding as normal doesn't work.

Uncaught (in promise) TypeError: Cannot read properties of null

I am receiving this error when I try to get a certain element on a webpage with the line of code below. When the website loads, the element is not there yet because you have to click on a link before that element loads. Is there a way to make the call to that line of code retry or wait until you click on the link on the website? const note = document.querySelector(".btn btn-info btn-note-edit btn-note-save submit note-edit-panel-box")...

chrome.notification, iconUrl property

Currently in development im using
`"web_accessible_resources": [ { "resources": [ "assets/icon.png"...

captureVisibleTab()

when I use chrome.tabs.captureVisibleTab() I get this error Error: Either the '<all_urls>' or 'activeTab' permission is required. but I have both of those permissions in the manifest.json

What's a sandbox?

And how does manifest.content_security_policy.sandbox affect it?

How to send messages from content to background

I tried to do send a message to the background but it doesn't seem to be called and I don't have any error. Just nothing happen. Am I doing this right? ``` // in content.tsx const resp = await sendToBackground({...