🧩 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 can load multiple JS in the content script file

I have file contents/after-load.ts which runs at document_end and I want to load a script chrome.runtime.getUrl("scripts/css-selector-get.js")

Plans to add @use as an import resolution?

I've imported a bunch of components into my project, but the sass files of the components use @use to get styles from other files. I found the Import Resolution documentation page and saw everything is imported with an 'import' statement. Since the use of @use is so imbedded in the components I have installed, I would just like to ask if there is a way to get the bundler to pick up on the other sass files that use @use?...

"No supported UI library found" for Svelte 3

It works for Svelte 4 but not Svelte 3 🤨 Plasmo version is 0.77.5...

getInlineAnchor loops infinitely in React application

Hello, I am trying to add a new button to Twitter using getInlineAnchor, but I get an infinite loop and my browser crashes. ```html <div role="navigation"> <div></div>...

CSUI not working on safari

Hi when I try to load content script I'm getting Error in safari console: Could not resolve bundle with id 8Ly6c
No description

How to make css module work in devtools panel page ?

Hi, I want to use @devtools-ds/object-inspector in devtools panel page, which uses css module, but the style of the third componet does not seem to work. I can see the build file of souce css file, but I cannot to figout out how to import it in the html tempalte. Anyone has some suggestions? Thanks.

How to take a value from chrome to react stata?

Hello, i need to take the src value of this image :
<img class="captcha__image" src="https://us1.bumble.com/hidden?euri=PDj28x4e81zgy8w9S7RqGnsT5vcvlLQpUE2pBJDsprYcgl74N2hkJ50zWbe6JZtSLkil3oUrla8JBWWF27Sos1R-9jzsJqQvj-elJlhCRqKAFKSd3jWW1IV0Syr2mFwqML.m1SkAxuMphDOg1xsSMAu60acHVaq6TrYQi9bgVxUr0-0NY1gjBpgBbKxcvWZNa6UbmfwcjkFw-cF0fEN30yxHw3fS2sW18shfaJpwDRyanNCUQVeexA" alt="">
<img class="captcha__image" src="https://us1.bumble.com/hidden?euri=PDj28x4e81zgy8w9S7RqGnsT5vcvlLQpUE2pBJDsprYcgl74N2hkJ50zWbe6JZtSLkil3oUrla8JBWWF27Sos1R-9jzsJqQvj-elJlhCRqKAFKSd3jWW1IV0Syr2mFwqML.m1SkAxuMphDOg1xsSMAu60acHVaq6TrYQi9bgVxUr0-0NY1gjBpgBbKxcvWZNa6UbmfwcjkFw-cF0fEN30yxHw3fS2sW18shfaJpwDRyanNCUQVeexA" alt="">
...

plasmo messaging API pub-sub

Hi how to use new pub-sub API? Any example codes?

How to keep the content.tsx open (or open again) when navigating to a new page?

I am trying to redirect the user from the content to a new page (for web scraping uses) and I need to open the extension again once the new page is opened.

Offscreen + Messaging API issue

Hello, I am trying to create an offscreen document for copying text to clipboard. I am trying to follow some of the examples I found in this issue: https://github.com/PlasmoHQ/plasmo/issues/527. In my background.ts file, I am trying to send a message to my offscreen.ts file like this: ```ts const resp = await sendToBackground({...

How to account for lazy loading lists?

Hi all, i'm making (my first) extension for DJ's called SoundCloud BPM. I already finished the backend, but I am stuck on the frontend. When making soundcloud playlists, I basically want to put every trackItem in a table, and make it possible to sort by bpm and key. The problem is that SC playlists are lazy loading. The way I do it now is: ...
No description

How to use firebase authentication inside content scripts?

Hi, have successfully setup firebase auth and it is working with popup.tsx. However, when I try to access the user details inside the content section - I am unable to get the user details. I am using import { useFirebase } from "~firebase/hook"; to get the user variable. It always returns the usre value as null...

Firebase authentication official blog is removed... why?

The blog for firebase authentication is removed from the plsmo blog? 😕 I have been trying to work with it, https://discord.com/channels/946290204443025438/1118727179845501001/1118727179845501001...

How to pass data in contents file?

Hi everyone, I just learned to use plasmo I read this section in the docs https://docs.plasmo.com/framework/content-scripts-ui, So I created a Content Scripts UI file called index.tsx....
No description

Content Security Policy violation when importing Google Analytics

I followed the docs on Google Analytics and took a look at with-google-analytics example. I'm getting the following error when running production build of my extension:
Refused to load the script 'chrome-extension://www.googletagmanager.com/gtag/js?id=XXXXXXX&l=dataLayer&cx=c' because it violates the following Content Security Policy directive: "script-src 'self'". Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback.
Refused to load the script 'chrome-extension://www.googletagmanager.com/gtag/js?id=XXXXXXX&l=dataLayer&cx=c' because it violates the following Content Security Policy directive: "script-src 'self'". Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback.
Reproduction:...

firebase auth in mv3 made my life a joke

hey fam, I hope @everyone is doing great. i'm stuck in a loop of trying for the past full week, i have questioned my life 🥹, I'm so frustrated at this point , it made me feel my life is a joke as a dev. 😭 I would really appreciate if someone can hop on a quick chat, i'll share the code. I have beaten my head so much, i can just pay for this. I tweeted the founder & he sent me here. Please help, thanks 🙂 ...

Overlay button positioning

I'm working on an extension that need to place a custom button on the right side of an input, like the lastpass extension does in the screenshot. I'm having trouble figuring out how to do it, essentially, I'd like to have the element lock icon button look like the button in the first screenshot, but i only have it on the left like in the second. I need to somehow responsively move it to the right side of the input, i thought about writing a custom mounting script, but is that a good way to do it? Below is the jist of my code so far....
No description

Compile inject.ts to build

I am working on an Extension that uses executeScript to execute a script file What I am trying to do is to have a file , ex : "inject.ts" That would be compiled to the build folder...

console.log drop on prod build

If Plasmo uses Parcel 2. Is it possible to drop console.log on prod build? https://github.com/parcel-bundler/parcel/issues/628 Seems that Parcel has this flag by default ...

Importing NPM Module JavaScript into web page issue

Hello everyone, I am working on an extension and have hit a road block. I am trying to import a JavaScript module from the npm package FusionCharts into a webpage. I am running into an issue where the script won't execute due to a MIME type being wrong. ...