设为首页  
联系我们  
加入收藏  
网页制作 冲浪宝典 图形图像 操作系统 软件教学 编程开发 认证考试 安全技术 站长专区 文学驿站 娱乐天地 游戏天地 办公软件
文章搜索
您的位置: 首页 >> 文章首页 >> 软件教学 >> 网络软件 >> firefox扩展插件制作方法
精品推荐
网络软件点击TOP10
·傲游(Maxthon)设置中心用法大全
·图解RJ45水晶头网线的做法
·让火狐拥有三头六臂 Firefox扩展推荐
·使用GHSOT时PXE引导出现"LOAD ERROR NO DPMI MEMORY"错误的解决方法
·轻松解决Outlook Express三大常见问题
·IE无法打开 提示wininet.dll文件找不到的解决
·IE无法显示PNG图片故障解决
·messenger 8.5去广告+永久去共享文件夹方法
·BitSpirit(比特精灵)及其它BT客户端的所有常见问题
·内网用好UPNP 下载BT eMule大幅提速
软件教学点击TOP10
·万能GHOST系统制作教程
·应用软件注册码大全(最新整理) 1
·自己动手制作USB启动盘快速简单
·远程破解QQ密码
·傲游(Maxthon)设置中心用法大全
·图解RJ45水晶头网线的做法
·APE文件如何播放?如何把APE转制成其他格式?
·常用软件序列号
·万能Ghost镜像文件制作全过程
·让火狐拥有三头六臂 Firefox扩展推荐
精选专题

firefox扩展插件制作方法

作者: 来源:http://www.xgdown.com/ 时间:2007-10-13 11:31:11

firefox扩展插件制作方法(3)         <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
        <em:minVersion>1.5</em:minVersion>
        <em:maxVersion>2.0.0.*</em:maxVersion>
      </Description>

这个em:id是不能变的. 他指明了这个插件的使用对像为 firefox.

em:minVersion 为最低可以安装这个插件的版本 。maxVersion反之.

<em:name>blueidea search</em:name>
<em:description>blueidea </em:description>
<em:creator>yaba</em:creator>
<em:homepageURL>http://bbs.blueidea.com/</em:homepageURL>
<em:iconURL>chrome://blueideasearch/content/logo.gif</em:iconURL>
<em:updateURL>http://www.yoursblog.cn/bibar_update.rdf</em:updateURL>

em:name 是插件的名称。
em:description  描述
em:creator      作者
em:homepageURL  主页
em:iconURL     图标地址
em:updateURL       查找更新地址

了解了上边的内容,就可以进行插件的编写了.  firefox它本身是基于Mozilla 框架开发的。

大家可以在FF的地址栏输入以下地址 chrome://browser/content/browser.xul  来看一下 FF的本身自己的UI的描述

在这里推荐大家用fireBug 来查看.. 可以清楚看到浏览器的DOM结构. 我们以后的操作都要针对这个DOM结构.

大家看到我们说要对插件UI描述的文件扩展名为.xul  对这xul语言 大家可以参考http://www.xulplanet.com/  这个网站..它里有XUL详细介绍。把它理解成一种HTML就可以了. 他的语法标记十分简单易懂。

<toolbarbutton id="home-button" class="toolbarbutton-1 chromeclass-toolbar-additional" label="主页" ondragover="nsDragAndDrop.dragOver(event, homeButtonObserver);" ondragdrop="nsDragAndDrop.drop(event, homeButtonObserver);" ondragexit="nsDragAndDrop.dragExit(event, homeButtonObserver);" onclick="BrowserHomeClick(event);"/>

这对FF上  对 "主页" 这个按钮的描述。

<textbox sizetopopup="pref" id="urlbar" flex="1" chromedir="ltr" type="autocomplete" autocompletesearch="history" autocompletepopup="PopupAutoComplete" completeselectedindex="true" tabscrolling="true" showcommentcolumn="true" enablehistory="true" oninput="gBrowser.userTypedValue = this.value" ontextentered="return handleURLBarCommand(param);" ontextreverted="return handleURLBarRevert();"><deck id="page-proxy-deck" onclick="PageProxyClickHandler(event);"><image id="page-proxy-button" ondraggesture="PageProxyDragGesture(event);" tooltiptext="拖放此图标以创建到此页面的链接"/><image id="page-proxy-favicon" validate="never" ondraggesture="PageProxyDragGesture(event);" onload="this.parentNode.selectedIndex = 1;                                 event.stopPropagation();" onerror="gBrowser.addToMissedIconCache(this.src);                                  this.removeAttribute('src');                                  this.parentNode.selectedIndex = 0;" tooltiptext="拖放此图标以创建到此页面的链接"/></deck><hbox id="urlbar-icons"><button type="menu" style="-moz-user-focus: none;" class="plain" id="feed-button" chromedir="ltr" onclick="return FeedHandler.onFeedButtonClick(event);"><menupopup position="after_end" onpopupshowing="return FeedHandler.buildFeedList(this);" oncommand="return FeedHandler.subscribeToFeed(null, event);" onclick="checkForMiddleClick(this, event);"/></button><image tooltiptext="显示此窗口的安全性信息" id="lock-icon" onclick="if (event.button == 0) displaySecurityInfo(); event.stopPropagation();"/><image id="safebrowsing-urlbar-icon" tooltiptext="此页面可能具有危险性;点击查看详细信息。" level="safe" onclick="goDoCommand('safebrowsing-show-warning')"/></hbox></textbox>

这是对FF“地址栏”描述

大家看是不是特别像HTML.

我们开始写插件的UI吧 。。

打开\chrome\content\overlay.xul 文件.

<?xml version="1.0"?>

共4页 9 7 [1] [2] [3] [48 :>

firefox扩展插件制作方法 相关文章:
firefox扩展插件制作方法 相关软件:
特别声明:本站除部分特别声明禁止转载的专稿外的其他文章可以自由转载,但请务必注明出处和原始作者。文章版权归文章原始作者所有。对于被本站转载文章的个人和网站,我们表示深深的谢意。如果本站转载的文章有版权问题请联系编辑人员,我们尽快予以更正。
转载请注明来源:http://www.xgdown.com