Persist config with some key in sync, and some keys in local
I would like to only persist in chrome sync some keys, and leave other persisted in local.
How can I do this ?...
Segfault error when building
Hey @lab, I've had this error for the past 2 days.
```🔵 INFO | Loaded environment variables from: []
🟡 0 | @plasmohq/parcel-transformer-manifest
🟡 1 | Adding icons...
use with-vue template with element-plus as ui, package too big
Dear all, I create ext use the with-vue template and use element-plus as ui component,but when I call build,all the component from element-plus are build into the js file, it's so big, event if I just use
el-button
Is there a way just package the components i used? thanks....process.env is empty
I am using env vars
I created
//.env.development
PLASMO_PUBLIC_WEB_SITE_URL=VALUE
I can use this value in package.json but can't load anything in code. It's empty...
Can't connect to content script on first load of extension.
Hey guys when I first open my extension, I get the following error in chrome:
"Uncaught (in promise) Error: Could not establish connection. Receiving end does not exist."
If i reopen the same window or open a new window, I don't get this error.
Any help would be appreciated. Thanks...
Adding array of values in env
My extension will run on several sites e.g. amazon, ebay, alibaba. Each site has some specific configurations like the website domain and the specific div classes that I use to locate products on the site. Currently I have these configurations in their own .env.amazon, .env.ebay, .env.alibaba and create a build for each ...
```
// AMAZON
PLASMO_PUBLIC_SHOPADVISOR_CUSTOMER_PRODUCT_PAGE="amazon.co//dp/"...
Inline vs Overlay vs Custom Root Container
I'm trying to put a border on specific divs around images on Amazon. They should only appear on hover (therefore I probably need to set pesuo-classes on that div). And I want to have a label ShopAdvisor with a + button next to it (therefore I think I need to add new divs regardless of if I decorate the existing HTML). The ShopAdvisor/+ div should be right-justified, which seems unimportant but it does mean the div needs context of its containing ancestor, right now it's only on the top left bc it's anchored.
I know I have access to the anchor and can do all that like so
``` anchor.element.setAttribute(...
Cannot setup Storybook with import scheme base64, raw, etc
Hello, storybook do not resolve the imports with schemes etc, is there a way to import a configuration into the storybook webpack ?
content.tsx only consistently works if refresh page
I am trying to create a browser extension for GitHub. For now, I just want to add a button on a page using a content.tsx. It works, but I often find it necessary to refresh the page for the button to appear. Trying to figure out if I am doing something wrong or if the code needs to get more complicated and add a custom MutationObserver or something like this.
I have several customizations like this example. Some of them seem to work more consistently than others, which always require Refresh. I am thinking it maybe has to do with the specifics of the page and how much it has been converted to React by GitHub.
Here is example:...
Messaging From Ext-Pages to CS
Hello guys, I am facing a hard time figuring how to send messages from popup to content script, I did it from before without using any framework but I want to try it with this framework, docs are not mentioning this.
do I need to send a message from Ext-Page to BGSW then from BGSW to CS? or is there another way?...
Call Storage API with callback?
Chrome has an option to provide a callback when using .set(), wondering if the same is possible with Plasmo's Storage API?
chrome.storage.sync.set({ products: aoProduct }, function () { console.log( "Added product ",...
chrome.storage.sync.set({ products: aoProduct }, function () { console.log( "Added product ",...
declarativeNetRequest
I want to use the declarativeNetRequest API, and I have it working for chrome, but when I test it on firefox, its not working:
```javascript
async function setRedirectRule(newRedirectUrl: string) {
let newRedirectRule = {
id: RULE_ID,...
MUI with content-script-ui
HTML is rendered to the extension, but I have no styles from MUI, How to fix that? I think that is why my extension is isolated from css, but I don't understand how I can add styles from MUI to the content-script
import { Autocomplete, Button, TextField } from "@mui/material"
import iconBase64 from "data-base64:~assets/icon.png"
import cssText from "data-text:~/contents/google-sidebar.css"...
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....
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...