TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Experience porting a Firefox add-on to a Chrome extension

37 点作者 sekizaru超过 15 年前

1 comment

extension超过 15 年前
The big big difference between the platforms is that extensions are sandboxed on Chrome. I'm convinced that this is the only way to go. Free-reign extensions inevitably lead to instability and support is a nightmare because you can never be certain of what is going on in your own app.<p>However, the sandboxing is severely limiting. Extensions get a separate JS environment for each tab and they can only communicate through async messaging. This makes global state, like user settings, a pain in the arse. I think they can do better than this while remaining secure.<p>And of course, you can only extend the browser using the specific hooks it provides, which currently doesn't include much in the way of user interface modification. I'm sure that more hooks will be provided in the future.<p>They did a great job of keeping it simple though. Nearly everything is done through standard JS/HTML/DOM. XPCOM will not be missed.<p>And now for the plug, though it might not work yet: <a href="https://chrome.google.com/extensions/detail/ljecomdaijmibecakcpjadigpfkollbh" rel="nofollow">https://chrome.google.com/extensions/detail/ljecomdaijmibeca...</a>