[英]How to write FireFox extension with Visual Studio using C# programming language?
I was wondering if it's possible to write Firefox extension using .Net Framework? 我想知道是否可以使用.Net Framework编写Firefox扩展? Had anybody such experience in writing Firefox extensions using C# programming language?
有没有人使用C#编程语言编写Firefox扩展的经验? Any good sites or guidelines would be very helpful.
任何好的网站或指南都会非常有用。
FFPlugin http://img81.imageshack.us/img81/3049/ffplugin.jpg FFPlugin http://img81.imageshack.us/img81/3049/ffplugin.jpg
Here is an example of what I need. 这是我需要的一个例子。 Extension to enter phone number and to send SMS Message.
分机输入电话号码和发送短信。 I draw it in Paint, so I'm sorry for having no artistic touch.
我在Paint画画,所以我很抱歉没有艺术感。
Assuming you're asking about writing an extension (and not a plugin), the best place to get started is with the info at the Mozilla Dev Center . 假设您要求编写扩展(而不是插件),最好的入门地点是Mozilla开发中心的信息 。
Konamiman is correct: extensions are mostly XUL (an XML grammar) and Javascript, packaged into a ZIP file with the extension .xpi
. Konamiman是正确的:扩展主要是XUL(XML语法)和Javascript,打包成扩展
.xpi
的ZIP文件。 The various links from the page I linked should answer basic questions, like the one you posted above: 我链接的页面中的各种链接应该回答基本问题,例如您在上面发布的问题:
https://developer.mozilla.org/en/Building_an_Extension https://developer.mozilla.org/en/Building_an_Extension
https://developer.mozilla.org/en/Extension_Frequently_Asked_Questions https://developer.mozilla.org/en/Extension_Frequently_Asked_Questions
Firefox extensions are written primarily in Javascript. Firefox扩展主要使用Javascript编写。 See here: http://www.rietta.com/firefox/Tutorial/backend.html .
见这里: http : //www.rietta.com/firefox/Tutorial/backend.html 。 So unless you can find a way to convert C# code/.NET Framework objects to Javascript, you are out of luck.
因此,除非您能找到将C#代码/ .NET Framework对象转换为Javascript的方法,否则您运气不佳。
I'm not sure how you'd do for C#, but you can use XPCOM to call native code libraries: that's how the Glasser extension, for instance, is able to use the Windows-specific Aero effects. 我不确定你是如何为C#做的,但是你可以使用XPCOM来调用本机代码库:例如,Glasser扩展就可以使用Windows特有的Aero效果了。
IBM hosts a very good XPCOM tutorial at DeveloperWorks . IBM在DeveloperWorks上主持了一个非常好的XPCOM教程。
正如其他受访者所观察到的,Firefox扩展主要是用Javascript编写的:但是你很幸运,因为Script#是一个免费工具,它使开发人员可以编写C#源代码并随后将其“编译”为Javascript。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.