问HN:浏览器扩展与本地应用程序在结构化表单填写方面哪个更好?
我正在进行一个名为 Injectless 的项目——一个浏览器扩展,允许网站明确声明它们可以向外部网站注入哪些数据,完全由用户控制。
注意:这篇文章是通过人工智能翻译成英文的。我的母语是西班牙语。
问题:
SaaS 应用程序(如会计、项目管理等)的用户通常需要反复将数据复制到外部表单(如政府门户、客户系统等)。目前,这个过程繁琐且完全依赖手动操作。
我当前的解决方案:
一个浏览器扩展,其中:
- 网站公开一个 injectless.json,声明它们可以填写哪些字段以及在哪些域名上
- 用户明确安装集成(单击即可选择)
- 当访问允许的网站时,扩展会提供“粘贴”每个字段的选项
疑问:
一位朋友建议,与其做一个浏览器扩展,不如做一个原生应用(类似于 KeePassXC 或 Espanso),该应用:
- 可以在任何浏览器中工作,无需安装多个扩展
- 使用 TAB 粘贴字段序列(更简单,更通用)
- 甚至可以在浏览器外部工作
- 避免扩展权限、CSP 问题、Shadow DOM 等
我对原生应用的担忧:
- 移动端:浏览器扩展在移动设备上是可以使用的(如 iOS 的 Safari、Android 的 Firefox)。原生应用将面临严格的沙盒限制
- 用户体验:扩展弹出窗口可以准确显示当前页面可用的字段。原生应用则会显得更“盲目”
- 上下文:扩展知道你正在访问哪个页面,并可以自动验证允许的域名
问题:
哪种方式似乎更有价值/实用?
A) 浏览器扩展(当前方案)——更多上下文、移动支持、更清晰的用户体验
B) 类似于 Espanso/KeePassXC 的原生应用——更通用、单次安装、更简单
C) 两者结合——以原生应用为基础 + 可选扩展作为伴随以改善用户体验
有没有人做过类似的事情?
我可能错过了哪些权衡?
谢谢!
查看原文
I’m working on a project called Injectless — a browser extension that allows websites to explicitly declare which data they are allowed to inject into external sites, fully controlled by the user.<p>Note: This post was translated to English using AI. My native language is Spanish.<p>The Problem:
Users of SaaS apps (accounting, project management, etc.) often need to repeatedly copy data into external forms (government portals, client systems, etc.). Today this is a tedious, fully manual process.<p>My Current Solution
A browser extension where:
- Websites expose an injectless.json declaring which fields they can fill and on which domains
- The user explicitly installs the integration (one-click opt-in)
- When visiting an allowed site, the extension offers to “paste” each field<p>The Doubt
A friend suggested that instead of a browser extension, this should be a native app (similar to KeePassXC or Espanso) that:
- Works in any browser without installing multiple extensions
- Pastes sequences of fields using TAB (simpler, more universal)
- Works even outside the browser
- Avoids extension permissions, CSP issues, Shadow DOM, etc.<p>My Concerns About a Native App
- Mobile: Browser extensions do work on mobile (Safari iOS, Firefox Android). Native apps would face heavy sandboxing restrictions
- UX: The extension popup can show exactly which fields are available for the current page. A native app would be more “blind”
- Context: The extension knows which page you’re on and can automatically validate allowed domains<p>The Question
What seems more valuable / practical?
A) Browser extension (current approach) — more context, mobile support, clearer UX
B) Native app like Espanso/KeePassXC — more universal, single install, simpler
C) Both — native app as a base + optional extension as a companion for better UX<p>Has anyone worked on something similar?
What trade-offs might I be missing?<p>Thanks!