🧩 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

Is it possible to add timer in badge on the icon for MV3?

I wanted to try plasmo but not sure if the MV3 which supported by plasmo can have this kind of feature. When user click on a button on the Content script, it will add a badge showing the timer until the timer runs out. I’m aware that we can persist the timer by saving the endTime for the timer. But not sure about having a timer running on the service worker....
No description

How do I get firebase auth in a content script?

I have authentication working in popup.tsx. But I need the user details in content.ts so I can scrape the current email and make POST requests to my server. Any help would be greatly appreciated.

Dynamic Roots and all queries

hi, im developing this extension that adds an emoji to the textbox in youtube textboxes, the problem is all textboxes are hidden, there is a reply button on every comment and when you press it the textbox shows up now here i want to show the emoji icon from my extension, the problem is this works only once and when i close the reply or open another one its not there export const config: PlasmoCSConfig = { matches: ['https://studio.youtube.com/*'] }; ...

Trigger command after dev rebuild

Is there any way to hook into the Extension re-packaged event? I'm porting an extension to Safari and would like to trigger xcodebuild automatically when the extension has finished rebuilding.

XMLHttpRequests

hello, I need to use a library to interact with the google sheet api, and it uses axios that uses XMLHttpRequests, how would I make it work inside the messages in background >messages ?!

Api requests not sending in Firefox

i've built this extension, there are a lot of api requests, these are working in chrome smoothly, when i build my extension with --target of firefox all works great but non of my requests even fire...

Parcel-bundler issues

https://github.com/parcel-bundler/parcel/issues/5557 I'm pretty sure I'm running into some error like this github issue, my console from a cs webpage says "Uncaught TypeError: (0 , $parcel$interopDefault(...)) is not a function" when I try and use a hash function from 'imurmurhash' and it's been a pain to debug as my dev build runs fine, it's only the output dist (even with the --no-minify flag) that has errors! Parcel-bundler (v1) is depreciated in favour of the other parcel package (v2) https://www.npmjs.com/package/parcel-bundler ...

[EXP] How to display a component below or above a text selection

reposting a question from issues on GH because because seen few people need examples on how this could be properly implemented Showing a component above/below a selection is a behavior that many extensions use, for example google translator, dictionary, grammarly, etc. I would like to see an example of how this behavior should be implemented....
No description

How do I use `tslog` (esm)

I honestly don't understand es modules that well. I know how it's intded to work but never really understood the interop modes with typescript and other bundlers. I'm trying to use tslog which is exported as an es moudle but when I do a standard import and try to use it, I get logger.ts:6 Uncaught TypeError: _tslog.Logger is not a constructor. Any ideas on what I should be doing?

Watch STORAGE from CSUI or Send message from backgrounds to CSUI

Hello, I have a CSUI with these settings: `{ matches: ["https://web.whatsapp.com/"], all_frames: true,...

Can I use a plasmo project in monorepo with turborepo?

I want to share a lot of packages of my web and backend with the plasmo project using a monorepo like turborepo.

Web Bluetooth API?

Hi! I'm currently experimenting with rebuilding an existing extension using Plasmo, the extension uses the Web Bluetooth API and I was wondering if it is possible to use in Plasmo, if so are there any special things I should / need to do to set it up?

How to mount component when clicking on a element with certain class?

What I'm doing is I'm marking some certain HTML tags and giving them a class, I want to mount a component not when the page loads, but when user clicks on specific element https://www.plasmo.com/blog/posts/content-scripts-ui - I pretty match want this example with Toucan. I've searched the docs, but didn't really find what I need....

Extension runtime is not available

Hi when i try to send a message from a CSUI to a background throws an error "rror: Extension runtime is not available" How do I communicate from a csui with the rest of the application?...

can i send a message from a CSUI directly to popup.ts and vice versa?

Hello, can I send messages directly from CSUI to popup.ts? or do I really need to create the message inside the background folder and then send it to where I want it?!

How to use a component library on Contents?

Hello, I would like to use a component package (https://primevue.org/) inside the content folder files. To add to popup/options/newtab etc we have a defineOptions method: ```JS defineOptions({...

Getting Tailwind to work in content scripts

I'm following the instructions from https://docs.plasmo.com/quickstarts/with-tailwindcss, with the exception that I did not pnpm create plasmo --with-tailwindcss because my project was already started. However I did all the other stuff. I think I must be doing the getStyle export wrong? The style is not being injected. any idea what may be going wrong? This is my content script: contents/my-content-script.tsx...

Parcel throwing an error in production

As described here: https://github.com/PlasmoHQ/plasmo/issues/661, the following error is thrown:
Could not resolve bundle with id
Could not resolve bundle with id
...

How to use Plasmo's globalProvider?

For tanstack query, I need to have a global provider for all of the getInlineAnchorList(). I saw that this should be possible through this github pull but I haven't been able to get it to work. Does anyone have a working example? https://github.com/PlasmoHQ/plasmo/pull/557...