Chinaunix首页 | 论坛 | 博客
  • 博客访问: 50279
  • 博文数量: 10
  • 博客积分: 320
  • 博客等级: 一等列兵
  • 技术积分: 110
  • 用 户 组: 普通用户
  • 注册时间: 2006-04-05 22:57
文章分类
文章存档

2011年(1)

2008年(1)

2007年(2)

2006年(6)

我的朋友

分类: WINDOWS

2007-04-01 00:02:37

堕落中,捣鼓捣鼓firefox。

重新定义firefox配置文件的位置。
默认是在%APPDATA%(e.g: C:\Documents and Settings\Administrator\Application Data)下,很恶心.本着不在C:\下放任何的个人文件的原则,将默认位置更改到D:\Program Files\Mozilla Firefox\defaults下。
剪切C:\Documents and Settings\Administrator\Application Data\Mozilla\Firefox\Profiles到D:\Program Files\Mozilla Firefox\defaults下。
编辑和Profiles文件夹同级的profiles.ini配置文件:
[General]
StartWithLastProfile=1

[Profile0]
Name=default
IsRelative=1
Path=Profiles/72a2reoa.default
修改成
[General]
StartWithLastProfile=1

[Profile0]
Name=default
IsRelative=0
Path=D:\Program Files\Mozilla Firefox\defaults\Profiles\72a2reoa.default

直接定制firefox的菜单:
D:\Program Files\Mozilla Firefox\chrome\browser.jar\content\browser\browser.xul是firefox定义菜单的文件。browser.jar可以使用WinRAR打开。
如:隐藏File菜单下的Print Preview菜单项。将注释掉即可(行数620 firefox2.0.0.3)。

为firefox添加 重起 功能:
在D:\Program Files\Mozilla Firefox\chrome\browser.jar\content\browser\browser.xul文件的相关位置添加以下信息,extensions.js文件中包含restartapp()函数。


     
改成:

       
       
                      // See hack note in the tabbrowser-close-button binding
            if (!this._blockDblClick && aEvent.button == 0 ) {
                if (aEvent.originalTarget.localName == "box" ){
// 当双击标签栏(tabbar)空白处时,新建标签页。
// xxx this needs to check that we're in the empty area of the tabstrip
                    var e = document.createEvent("Events");
                    e.initEvent("NewTab", true, true);
                    this.dispatchEvent(e);
                    }
                else{
                    this.removeTab(aEvent.originalTarget);
                    aEevent.stopPropagation();
                    }
            }
          ]]>
       
     


阅读(1945) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~