Show HN: Bedframe – open-source Browser Extension Development framework
github.com
github.com
EDIT: It's also very unclear what state this project is in. The README has instructions for getting started with the CLI, but also says that I should sign up to join early access? Is this ready to use? What aspect of this project requires membership? Is there a hosted component or subscription model hidden in here?
Basically if you wanted to build browser extensions using modern stack, bedframe lets you do that. Specifically it uses Vite under the hood so you can write e.g. a chrome extension in e.g. React w/ TypeScript, Tailwind, and all that good stuff.
I think the CLI readme has a bit more useful info: https://github.com/nyaggah/bedframe/tree/main/packages/cli
The notable bit is the mvp.yml workflow you get in your project. It'll let you publish to chrome, firefox and edge automatically (ci/cd).
> It's also very unclear what state this project is in.
fair enough! Wanted to get something out there first; I'll get the docs out soon
Does the dev mode use HMR? Can the cli upload bundles extensions to respective browser's stores? Does it work with any web framework supported by vite? Does it work with all vite/roll-up plugins?
This project is very interesting to me because I currently have a published Firefox extension that uses Vite, NPM, and Solid.js.
> what its trying to solve:
I want a Next.js + Vercel dev experience but for building browser extensions: push to main > run a workflow > determine if it should publish > publish (to all my chosen web stores)
I want an actual dev workflow (like I'm used to in regular web/app development in 2023) but again, tailored for browser extensions.
Basically I wanted something that doesn't abstract the usual Vite setup. Just give me the usual niceties of working with client-side react w/ Vite. So yes, you get the vite/rollup plugins as usual.
* Attaching to page DOM with custom HTML/CSS/JavaScript
* Shadow DOM
* Iframe
Shadow DOMs seem like a good hybrid between iframes and attaching to the page DOM.
Idea is, depending on what kind of extension you're building you can use content scripts to render you extension in shadow dom or iframe. Bedframe lets you do this.
The CLI is a project generator for: - popup (default kind of extension) - side panel (relatively new in Chrome / https://developer.chrome.com/docs/extensions/reference/sideP...) - overlay (what you describe above) - devtools extensions (https://developer.chrome.com/docs/extensions/mv3/devtools/#d...).
Bedframe goes further and lets you add a mvp.yml workflow to your (Github) repo and have any versioned changes landing in 'main' branch get published to firefox, edge, chrome web stores
Basically productionizes the extension dev process.
I’ve been happy with it, especially the testing / beta deployment and messaging libraries.
That said, I find user scripts superior for most tasks, despite some lacking UI niceties. They are easier to share, use, and crucially, audit—be it in terms of scope, permissions, or code updates. Plus if Manifest V3 is any indicator, the future for browser extensions looks bleak. While I don't agree with this direction, it's probably for the best for the majority of users, like my mom.
Your effort is commendable; however, should you find yourself looking for a viable pivot in the future, I believe the user script space is primed for innovation and could offer a good alternative.
[1] https://github.com/gorhill/uBlock [2] https://github.com/gdh1995/vimium-c [3] https://addons.mozilla.org/en-US/firefox/addon/bitwarden-pas...
This is a bookmarklet to edit any text on a web page
javascript: (function() { document.body.contentEditable = true; document.body.spellcheck = false; })();
Very useful when I want to grab a screenshot and I want to REDACT personal information javascript:(function() { const baseUrl = "https://translate.google.com/?op=translate&sl=auto&tl=de&text="; const textRaw = window.getSelection(); const text = encodeURIComponent(textRaw); console.log("selected text: ", text, textRaw); window.open(baseUrl + text) })();
(maybe adjust the target language in the url)I feel like there should be something like a bookmarklet store, similar to the extensions, or userscripts, right?
If you find one, please let me know