Inject options UI in the browser

{
"manifest": {
"options_ui": {
"browser_style": true
}
}
}
{
"manifest": {
"options_ui": {
"browser_style": true
}
}
}
This is only relevant to Chrome/Edge extensions though, not to Firefox
30 Replies
lab
lab•2y ago
hmm, I think the current manifest schema doesn't allow this - we will need to add that Oh actually it's available I think you can just specify it like that and it should work ooh rip we are not merging them in at the precompiler layer Just pushed a fix to the lab release, the browser_style stuffs should get passed down now
Avi
AviOP•2y ago
Version 0.65.1-lab.3?
lab
lab•2y ago
yup
Avi
AviOP•2y ago
And I'm supposed to add this bit? If so, it doesn't work
lab
lab•2y ago
yeah in the package.json can you try debugging with your local build
Avi
AviOP•2y ago
I am Opening the options does not take me to chrome://... but rather opens it in a whole new tab
lab
lab•2y ago
is browser_style added into the resulting manifest?
Avi
AviOP•2y ago
{
"options_ui": {
"page": "options.html",
"open_in_tab": true,
"browser_style": true
}
}
{
"options_ui": {
"page": "options.html",
"open_in_tab": true,
"browser_style": true
}
}
Should I manually add "open_in_tab": false?
lab
lab•2y ago
yeah
Avi
AviOP•2y ago
Ok finally worked
lab
lab•2y ago
seems like broswer_style is not supported in most other browser?
Avi
AviOP•2y ago
IMO if Plasmo sees that I have "browser_style": true, it should automatically add "open_in_tab": false
lab
lab•2y ago
can you make the PR?
Avi
AviOP•2y ago
AFAIK it's only supported in Chrome and Edge
lab
lab•2y ago
Browser styles - Mozilla | MDN
Certain user interface components - browser and page action popups, sidebars, and options pages - are specified by your extension in essentially the same way:
lab
lab•2y ago
based on the table only FireFox supports it
Avi
AviOP•2y ago
Last time I tried to dive into the Plasmo cold base my head spinned lol And Chrome, and Edge
lab
lab•2y ago
oh nvm
Avi
AviOP•2y ago
Moreover, last time I tried it, Firefox did not support it
lab
lab•2y ago
lab
lab•2y ago
seems like everyone except Safari lol
Avi
AviOP•2y ago
I'm not aiming for Safari though; not only I need a macOS but I also need to pay Apple $100 a year, no thanks If I were to make tons of money from the extension, I could afford it
lab
lab•2y ago
yeah I'd recommend doing small PR to get a hang of it first I think you tried to do too large of a PR
Avi
AviOP•2y ago
I didn't try anything actually, I tried to merely understand the code base and find the piece that is linked to Svelte that I'm looking for, but I was heavily struggling
lab
lab•2y ago
yeah but the svelte compiler is burried under 4 layers of abstractions
Avi
AviOP•2y ago
So for the time being I ditched it and instead migrated my 100K extension to Plasmo, which has been successful so far
lab
lab•2y ago
so it basically requires an indepth understanding of the entire compiler
Avi
AviOP•2y ago
Yep
lab
lab•2y ago
I wouldn't take on that until you play around with the pre-compiler (cli/plasmo) i.e, the package command is a good warm up to play with pre-compiler it's the top-most cli cmd layer so you won't need to dive any deeper than cli, so if you want a gentle intro to plasmo framework codebase, def try implement that rename feature
Avi
AviOP•2y ago
Oki I'll try
Want results from more Discord servers?
Add your server