| 网管联盟 | 网管论坛 | 网管u家 | 网管博客 | 网管软件 | 网管求职 | 小游戏 | 网管搜索 | 网管原创 | 网管聚合 | 网管读摘 | 网管焦点 | 世界素材 | 会员投稿 | 会员中心 |
![]() |
| Windows Linux Cisco 网络技术 数据库 黑客攻防 DotNet Java PHP 认证 新闻资讯 服务器 存储资讯 网络设备 网管学堂 技术专题 焦点 网吧频道 |
提示 & 技巧
以下包含的各种技巧,大部分要编辑配置文件,如果您不熟悉基本的文件,文件夹用法,建议您不要修改,这一页按技巧的重要性排列,分为4个部分
浏览器外观
用 W indows XP 菜单
如果您用的系统是 Windows XP 并且想用默认的菜单类型, 把下面的代码加到 userChrome.css 文件: 网管联盟bitsCN_com
/* Make menus XP style */
menupopup, popup {
border: 1px solid ThreeDShadow !important;
-moz-border-left-colors: ThreeDShadow !important;
-moz-border-top-colors: ThreeDShadow !important;
-moz-border-right-colors: ThreeDShadow !important;
-moz-border-bottom-colors: ThreeDShadow !important;
padding: 1px !important;
background-color: Menu !important;
}
menubar > menu {
border: 1px solid transparent !important;
padding: 2px 5px 2px 7px !important;
margin: 0 !important;
}
menubar > menu[_moz-menuactive="true"] {
background-color : Highlight !important;
color: HighlightText !important;
}
用经典的windows (9x/Me/2000) 菜单
不幸的是,目前默认的菜单类型是 Windows XP 和原先旧版本 Windows3D 外观的折衷,如果您想 要 Windows 经典的外观,把下面的代码加到 userChrome.css 文件:
/* Windows Classic (9x/Me/2000) style Menus */
menupopup, popup {
border: 2px solid !important;
-moz-border-top-colors: ThreeDLightShadow ThreeDHighlight;
用自己的图片做工具栏的背景
除了改变主题以外,您页可以用自己的图片做工具栏的背景。 把下面的代码加到 userChrome.css 文件:
/* Use a background imag e for the toolbars:
(Substitute your image file for background.gif) */
menubar, toolbox, toolbar, .tabbrowser-tabs {
background-image: url("background.gif") !important;
background-color: none !important;
}
可以把图片放在 userChrome.css 文件一样的目录下. 图片格式可以是Mozilla Firefox 支持的任意格式。
使动态的标签页更易区分
为了使动态的标签页和已经打开的标签页更易区分开(通过颜色)来把下面的代码加到, userChrome.css 文件:
/* Change color of active tab */
tab[selected="true"] {
background-color: rgb(222,218,210) !important;
color: black !important;
}
/* Change color of normal tabs */
tab {
background-color: rgb(200,196,188) !important;
color: gray !important;
}
不在动态标签也上使用粗体文本
如果您不想在动态标签页上使用粗体,加下面的代码到 userChrome.css 文件: 网管u家u.bitscn@com
/* Make the active tab easier to distinguish: */
tab[selected="true"] {
font-weight: normal !important;
}
从标签栏删除“关闭”按钮
您可以把“关闭”按钮从标签栏删除,把下面代码加到 userChrome.css :
/* Remove the close button on the tab bar */
.tabs-closebutton {
display: none !important;
}
仍然可以关闭标签页,右击标签页选择“关闭标签”或按 Ctrl+W
Remove items from the main menu
有些人为了节省水平空间喜欢把工具栏象菜单一样竖立的放置, 把下面代码加到r userChrome.css :
/* Remove the Go and Help menus */
menu[label="Go"],
menu[label="Help"] { display: none !important; }
网管bitscn_com
改变窗口图标
Mozilla Firefox 默认没有使用自己图标而是 Mozilla 图标,在一些系统里系统图标被使用,如果您想使用自己图标,遵循下面的方法
进入您安装 Mozilla F irefox的目录 (如 >C:\Program Files\Firefox\) 下的子目录 chrome.
建立子目录icons, 在它里面生成子目录 default.
完整的目录现在是 C:\Program Files\Firefox\chrome\icons\default\
选择您想使用的图标 (在 Windows 平台用 .ico 文件, 在Linux 平台xpm 文件) 放到这个目录重命名为r and main-window.[文件类型], e.g. main-window.ico 在 Windows and在linux main-window.xpm
In addition to the main window, you can also change the icon on the Bookmark Manager and JavaScript Console. The icon names are bookmark-window.[filetype] and jsconsoleWindow.[filetype], respectively.
在右边显示侧栏
为了在右边显示侧栏而不是在左边, 把下面代码加到 userChrome.css 文件:
/* Place the sidebar on the right edge of the window */
window > hbox {
direction:rtl;
}
window > hbox > * {
网管网www.bitscn.com
使标签栏一直显示
当只有一个标签页的时候标签栏就会隐藏. 为了使标签栏一直显示, 加下面的代码到r user.js 文件:
// Disable tab bar autohide feat ure:
user_pref("browser.tabs.autoHide", false);
注意当只有一个标签页时您仍然可以通过单击“关闭” X 隐藏标签栏
取消 target="_blank"
Mozilla Firefox 默认有一个内建的阻止弹出窗口的过滤器,但当用target="_blank"或无效的target="_new"打开新窗口时它停止网页,为了在同一窗口打开链接,加下面的代码到 f user.js 文件:
// disable target="_blank" (open in same window):
user_pref("browser.block.target_new_window", true);
关闭图像自动缩放功能
当这一特性打开时, 它会缩小图像以使比图像小的窗口可以容下图像. 为了关闭这以功能加下面的代码到 user.js 文件:
// Turn off Automatic Image Resizing:
user_pref("browser.enable_automatic_image_resizing", false);
用错误页而不是对话框显示
当联结失败时Mozilla Firefox 默认不是象IE一样显示错误页,而示显示恼人的错误信息,要显示错误页而不是错误信息,加下面的代码到 user.js 文件:
网管网www.bitscn.com
网管u家u.bitscn@com
网管u家u.bitscn@com
平滑滚动
Mozilla Firefox 0.6 默认有一个平滑滚动的功能,要打开或关闭这一特性,加下面的代码到 Scrollinguser.js 文件:
// Smooth Scroll ing (true = on, false = off):
user_pref("general.smoothScroll", true);
禁止其它 JavaScript 窗口特性
Mozilla Firefox 有一些选项来决定那些scripts可以在窗口使用,这些选项在“工具”》选项》网页特效》高级,这而的选项没有包含全部的特效,还有其它的一些特效可以使用:
// More DOM/JavaScript options
// Make sure all pop-up windows are resizable:
user_pref("dom.disable_window_open_feature.resizable", true);
// Make sure all pop-up windows are minimizable:
user_pref("dom.disable_window_open_feature.minimizable", true);
// Always display the menu in pop-up windows:
user_pref("dom.disable_window_open_feature.menubar", true);
// Always display the Navigation Toolbar in pop-up windows:
user_pref("dom.disable_window_open_feature.location", true);
使用Netscape 6/7 或 Mozilla 书签
改变 throbber URL
当您单击 throbber, 浏览器会联向 www.mozilla.org. 这以网址可以改变,加下面的代码到 user.js 文件:
// Click o n throbber to go to Mozilla Firefox Help:
user_pref("browser.throbber.url", "http://texturizer.net/firefox/");
不在地址栏保存 URLs
Mozilla Firefox 允许您输入的地址不出现在地址栏的下拉菜单里面,这可以保护您的隐私。
网页外观
禁止广告
网站上的广告是恼人的,下面的代码可以阻止大部分的广告,由于这代码较长放到其它页了看,separate page.
禁止闪烁元素
您也许不想看到上面闪烁的元素. 为了阻止它, 加下面的代码到 user.js 文件:
// Put an end to blinking text!
user_pref("browser.blink_allowed", false);
禁止 "marquee"标签
一些网站用卷动的标签 . 如果您觉的它没用的话加下面代码来禁止它,加到 userContent.css 文件:
/* Stop those <marquee> tags! */
marquee {
-moz-binding : none !important;
display : block;
height : auto !important;
}
If you added the code, this text should not scroll after restarting Mozilla Firefox.
使框架大小可变
许多网站用框架来显示目录,有时候这些框架太小了. 为了使这些框架大小可变, 加到 user.js 文件:
// Force frames to be resizable
user_pref("layout.frames.force_resizability", true);
注意有时候它会使您的页面变的比较滑稽:) 中国网管联盟bitsCN.com
修改打开新窗口链接的光标
在打开一个新窗口时,这个提示将改变鼠标当经过链接时,执行一个 JavaScript 命令. 加到
userContent.css 文件:/* Change cursor for links that open in new window */
:link[target="_blank"], :visited[target="_blank"], :link[target="_new"], :visited[target="_new"] {
cursor: crosshair;
}
修改 JavaScript 链接的光标
这个提示将改变鼠标当经过链接时,执行一个 JavaScript 命令. 加到 userContent.css 文件:
/* Change curso r for JavaScript links */
a[href^="javascript:"] {
cursor: move; 网管u家u.bitscn@com
其它提示
改变网页的语言
一些网站提供多国语言的版本,您可以按优先顺序选择语言,要改变优先顺序,您不得不知道各国语言的语言代码如瑞典语代码是sv,下面的例子是user.js里的一个。:
// Change language to Swedish (default is "en, en-us")
user_pref("intl.accept_languages", "sv, en, en-us");
注意: 选项窗口中有一个request 域用于存放此选项。
选择和复制独立的表格单元
当按下Ctrl 健, 您可以选择表格单元. J您页可以选择多个表格单元 一旦选好后您可以象文本一样复制和粘贴您选择的内容 。
加速网页显示
Mozilla Firefox 默认不显示页面在 250毫秒, 因为它在等待数据. 如果把下面的代码加到 user.js 文件, Mozilla Firefox 立即显示网页, 即使没有完成的数据 它的缺点是在一个慢的机器上由于“回流”使得整个页面的装载时间长了。
// This one makes a huge difference. Last value in milliseconds (default is 250)
user_pref("nglayout.initialpaint.delay", 0);
起用线性管道 Pipelining
Pipelining 是一个实验中的特性, 它设计来提高网页装载效率, 不幸的是不是所有的网站和代理都支持它, servers and想试用它的话加下面的代码到 user.js 文件: 网管u家u.bitsCN.com
// Enable pipelining:
user_pref("network.http.pipelining", true);
user_pref("network.http.proxy.pipelining", true);
user_pref("network.http.pipelining.maxrequests", 100);
指定保存缓存的位置
为了指定缓存保存在那一个目录, 加代码到 user.js 文件:
// Path to Cache folder:
user_pref("browser.cache.disk.parent_directory","C:\\Path To Cache");
记得用2个斜杠做路径的分割符, i如果您使用 Windows, e.g. C:\\Path To Cache 而不是 C:\Path\Path To Cache.
指定内存缓存的用处
一般地, Mozilla Firefox 根据有效内存的多少来判断缓存的用处,为了指定特定数量的内存缓存,加代码到 . user.js 文件:
// Specify the amount of memory cache:
// -1 = determine dynamically (default), 0 = none, n = memory capacity in kilobytes
user_pref("browser.cache.memory.capacity", 4096);
完全禁止内存缓存,用下面的代码,
// Disable memory cache:
user_pref("browser.cache.memory.enable", false);
访问更多的首选项
中国网管联盟bitsCN.com
许多首选项没有在选项窗口体现. 下面的链接显示了原始的首选项窗口, chrome://communicator/content/pref/pref.xul.
Note that many of the preferences in this window will have no effect in Mozilla Firefox, such as the Quick Launch option. Also, this window will most probably be removed completely in future versions of Mozilla Firefox.
网管下载dl.bitscn.com
|
0
|
评论加载中…