如何使我的 Firefox 插件与未来版本兼容

发布于 2024-12-23 19:43:31 字数 660 浏览 2 评论 0原文

我的 Web 应用程序中有一项功能需要小型浏览器插件才能工作。 99% 的应用程序是 ASP.NET + javascript,我们没有编写浏览器插件的技能,也没有兴趣培训人员维护它,所以我使用自由职业者网站取得了巨大成功,获得了一个可以工作的 Firefox 插件/附加/扩展。

然而,新的 Firefox 快速发布时间表使整个计划陷入混乱,因为每个新版本的 Firefox 似乎都需要一个新的扩展。这不仅与 RDF 文件中的 em:maxVersion 版本有关;还与 RDF 文件中的 em:maxVersion 版本有关。该插件实际上拒绝加载,因此似乎每 6 周我就必须委托一名自由职业者为下一版本的 Firefox 更新该插件。根据我有限的理解,这是因为 gecko 的每个版本都与前一个版本不兼容。

我忍不住想我在这里错过了一些东西。例如,IE 插件是在 2005 年左右为 IE6 编写的,我们从来没有接触过它;它仍然适用于 IE9。难道真的是所有的 Firefox 插件必须每 6 周重写一次,还是我做错了什么?

该插件的基本功能是使用 Windows 计时器轮询共享内存,然后遍历 DOM 以查找具有特定 javascript 函数的页面,然后调用该函数。

所以我的问题是,有什么方法可以让我的 Firefox 插件具有更合理的使用寿命(即一年或更长),或者我是否每次有新版本的 Firefox 出现时都必须发布一个新插件?

There's one feature in my web application which requires a small browser plug-in to work. 99% of the application is ASP.NET + javascript and we have no skills in writing browser plug-ins or any interest in training someone to maintain it so I've used freelancer web sites with great success to get a working firefox plug-in/add-on/extension.

However, the new Firefox rapid release schedule is throwing this whole plan into disarray because every new version of firefox seems to need a new extension. This is not just to do with the em:maxVersion versions in the RDF file; the plugin actually refuses to load, so it seems that every 6 weeks I will have to commission a freelancer to update the plug-in for the next version of Firefox. From my limited understanding this is because each version of gecko is not compatible with the previous one.

I can't help but think I'm missing something here. For instance, the IE plugin was written in about 2005 for IE6 and we have never needed to touch it; it still works with IE9. Is it really the case that all firefox plug-ins have to be rewritten every 6 weeks, or am I doing something wrong?

The basic function of the plug-in is to use a windows timer to poll shared memory and then traverse the DOM to find a page with a specific javascript function which it then calls.

So my question is, is there any way that I can make a firefox plug-in with a more reasonable lifespan (i.e. year or more), or am I stuck with having to release a new one every time a new version of firefox comes out?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

罪#恶を代价 2024-12-30 19:43:31

使用二进制代码(c / c++)时避免 Firefox 插件兼容性问题的最佳方法是使用 JSCtypes。以下是其工作原理的最新概述:

http://blog.mozilla.com/dwitte/2010/03/12/extension-authors-browser-hackers-meet-js-ctypes/

这是 MDN 的入口点有关 JSCtypes 的文档:

https://developer.mozilla.org/en/js-ctypes

为了避免这个长期的兼容性问题,我会将你的 C++ 代码从 xpcom 移植到 jsctypes对与您合作的承包商的要求。

The best way to avoid compatibility issues with Firefox addons when using binary code ( c / c++ ) is to use JSCtypes. Here is a recent overview of how this works:

http://blog.mozilla.com/dwitte/2010/03/12/extension-authors-browser-hackers-meet-js-ctypes/

Here is an entry point to the MDN documentation on JSCtypes:

https://developer.mozilla.org/en/js-ctypes

To avoid this long-term problem with compatibility, I would make a port of your C++ code to jsctypes from xpcom a hard requirement for the contractors you are working with.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文