doiyes / Firefox-Custom

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Forefox配置文件自用收集整理-doiyes.com

索引

下载安装

官网:https://www.mozilla.org/en-US/firefox/all/

官方FTP:http://archive.mozilla.org/pub/firefox/https://ftp.mozilla.org/pub/firefox/

版本选择:
Firefox Releases(正式版)
Firefox ESR (长期支持版,Extended Support Release)
Firefox Beta (测试版)
Firefox Nightly (每夜版)
Firefox Developer Edition (开发版)

发布日历:https://wiki.mozilla.org/Release_Management/Calendar

解压文件,复制core文件夹的内容到D:\Program File\Firefox\下即可。

安卓版:https://github.com/mozilla-mobile/fenix
推荐第三方iceraven:https://github.com/fork-maintainers/iceraven-browser/releases

配置文件参数

常用命令行参数(在 Firefox 快捷方式上右键点击属性中的,启动路径后面的参数。‘-p’前有空格):
-ProfileManager-P :打开内置的配置管理器界面。
-P "配置名":使用自定义名称的配置来启动 Firefox。如果这个配置名不存在,则打开配置管理器。如果有其他 Firefox 实例正在运行,则该参数无法生效。
-no-remote: 在 -P 后面添加这个参数,可以创建一个新的实例,实现同时使用多个Firefox 配置。如:
"D:\Program File\Firefox\firefox.exe" -p
"D:\Program File\Firefox\firefox.exe" --no-remote -profile "doiyes"
-no-remote -Profile "D:\Program Files\MyFirefox\Profiles"

-private -- 始终在隐私浏览模式启动 Firefox。
-safe-mode -- 安全模式启动 Firefox,或者按住 Shift 键打开 Firefox 也可以。
-url -- “地址” 指定火狐启动打开某一网页 -url可以省略.例如 "D:\Program File\Firefox\firefox.exe" www.doiyes.com

更多可见:https://www.firefox.net.cn/read.php?tid=54673
https://wiki.mozilla.org/Firefox/CommandLineOptions

安装新版本后,旧版本配置文件无法使用时:
使用 -allow-downgrade 参数启动,或者删除配置文件夹中的compatibility.ini文件。

常用设置

about:config个性化设置

地址栏输入about:config ,打开;搜索------

新标签页后台运行 browser.tabs.loadInBackground browser.tabs.loadDivertedInBackground browser.tabs.loadBookmarksInBackground 全部设为true

书签在新标签页中打开 browser.tabs.loadBookmarksInTabs,默认为 false,双击改为true 即可在新建标签页打开。

搜索栏搜索在新标签页打开 browser.search.openintab 双击改为true

在mozilla页面激活WebExtensions 方法:about:config--新建布尔参数:privacy.resistFingerprinting.block_mozAddonManager 设置为 true

security.dialog_enable_delay 将其值设置为0 扩展安装等待时间 (默认1000) dom.event.contextmenu.enabled 双击改为false 破解右键限制

关闭最后一个标签页后不关闭窗口 browser.tabs.closeWindowWithLastTab 双击改为true

双击左键关闭当前标签页(火狐61后)browser.tabs.closeTabByDblclick 双击改为true

查找自动高亮 findbar.modalHighlightfindbar.highlightAll 均双击改为true

自定义标签页宽度 browser.tabs.tabMinWidth 默认76

在mozilla页面激活WebExtensions,新建布尔参数:privacy.resistFingerprinting.block_mozAddonManager 设置为 true

破解右键限制 dom.event.contextmenu.enabled 双击改为false

默认不加载 userChrome.css 和 userContent.css 文件以提升启动速度 about:config 里面 toolkit.legacyUserProfileCustomizations.stylesheets 设置为 true 开启对这两个文件的加载。

更多可见:https://www.firefox.net.cn/read-60535

http://kb.mozillazine.org/About:config_Entries

user.js常用设置

user_pref("browser.urlbar.trimURLs", false);   //隐藏地址栏 http://前缀?NO

user_pref("browser.tabs.insertAfterCurrent", true);//紧邻当前标签页打开
user_pref("browser.link.open_newwindow.restriction", 0);//新标签页打开链接,而不是窗口
user_pref("browser.search.openintab", true);//搜索栏在新标签页打开
user_pref("browser.urlbar.openintab", true);//地址栏在新标签页打开
user_pref("browser.tabs.loadBookmarksInTabs", true);//书签栏在新标签页打开
user_pref("browser.tabs.closeTabByDblclick", true);//双击关闭标签

user_pref("browser.tabs.loadInBackground", true);//中键点击链接后台打开
//user_pref("browser.search.context.loadInBackground", true);//搜索栏在后台打开
//user_pref("browser.tabs.loadBookmarksInBackground", true);//书签在后台打开
//user_pref("browser.tabs.loadDivertedInBackground", true);//外部链接后台打开

user_pref("browser.cache.disk.parent_directory","C:\\TEMP");//缓存位置位于该处制定目录下的cache文件夹内
user_pref("browser.cache.offline.parent_directory","C:\\TEMP");//cache2文件

//密码
user_pref("signon.autofillForms", true);  //自动填写登录表单?
user_pref("signon.rememberSignons", true);  //记录网站登录密码

//可以解决某些网站密码不存不了的情况……
user_pref("signon.importedFromSqlite", true);
user_pref("signon.overrideAutocomplete", true);

//extensions
user_pref("security.dialog_enable_delay", 1000); //安装扩展延时
user_pref("extensions.getAddons.cache.enabled", false); //扩展页面不显示自动推荐内容

pref("browser.bookmarks.max_backups", 1);//书签备份

//禁止生成略缩图
user_pref("browser.pagethumbnails.capturing_disabled", true);
user_pref("browser.newtabpage.enabled", true);
user_pref("pageThumbs.enabled", false);

更多可见:

https://github.com/ghacksuserjs/ghacks-user.js/blob/master/user.js

https://github.com/pyllyukko/user.js/blob/master/user.js

扩展

备用:

用户脚本UserScript

UC脚本UserChromeJS

使用方法

xiaoxiaoflood方案: https://github.com/xiaoxiaoflood/firefox-scripts

fx-folder.zip解压后放在Firefox安装根目录下;utils.zip解压后放入 chrome 文件夹,UC脚本放入 chrome 文件夹。

userChrome.js 的更新:

https://github.com/xiaoxiaoflood/firefox-scripts/tree/master/chrome

https://github.com/benzBrake/FirefoxCustomize/tree/master/userChromeJS

其他方案:https://github.com/Endor8/userChrome.js/tree/master/userChrome

config.js和userChromeJS.js放在Firefox安装根目录下;config-prefs.js放在 Firefox 安装根目录\defaults\pref下;UserChrome.js 放在配置文件夹\chrome下,UC脚本放入 chrome 文件夹。

userChrome.js 的更新:https://github.com/alice0775/userChrome.js

自用UC脚本

https://github.com/doiyes/Firefox-Custom/tree/master/userChromeJS

CSS相关

https://github.com/doiyes/Firefox-Custom/tree/master/CSS

  • 书签栏自动隐藏

更多可见:

https://github.com/Timvde/UserChrome-Tweaks

https://github.com/Aris-t2/CustomCSSforFx/tree/master/classic

https://github.com/coekuss/quietfox

Firefox清理

cache2 ——缓存

jumpListCache ——任务栏跳转列表的缓存

safebrowsing ——Google安全浏览相关数据

startupCache ——启动缓存

thumbnails ——缩略图缓存

bookmarkbackups ——书签备份

crashes ——崩溃报告

datareporting ——诊断数据

minidumps ——崩溃记录

sessionstore-backups ——会话备份

其他

进入:about:config ,没有的首选项的新建,有的话更改值。 KEY 申请地址, https://tech.yandex.com/keys/get/?service=trnsl

browser.translation.engine  Yandex  
browser.translation.detectLanguage   true  
browser.translation.ui.show    true  
browser.translation.ui.welcomeMessageShown   true  
browser.translation.yandex.apiKeyOverride    自己申请 KEY

完成后,重启浏览器。

像是mail.163.com,输入完用户名、密码并提交表单后,firefox不会提示保存密码 将表单从ajax提交改为form提交即可,方法是:

1、鼠标移至登录按钮上,右键,“查看元素”,源代码是

<a href="javascript:void(0);" id="dologin" data-action="dologin" class="u-loginbtn btncolor tabfocus btndisabled" tabindex="8">登  录</a>

将标签从a改为input并添加type="submit"属性,即改为

<input href="javascript:void(0);" id="dologin" data-action="dologin" class="u-loginbtn btncolor tabfocus btndisabled" tabindex="8" type="submit">登  录</input>

2、现在可以正常输入用户名、密码,点击登录按钮后,firefox会提示保存用户名密码

如何开启内置翻译? 在 about:config 中 设置 browser.translation.detectLanguage 为 true, 设置 browser.translation.ui.show 为 true,

如果你有 Yandex 翻译的 apiKey 在 about:config 中新建字符串类型名称为 browser.translation.yandex.apiKeyOverride 的设置项,值为你申请得到的 Yandex 翻译的 apiKey 使用该翻译引擎时将 browser.translation.engine 的值改为 Yandex(首字母必须大写) 免费申请 Yandex 翻译 apiKey 的地址为 https://tech.yandex.com/keys/get/?service=trnsl

Google 翻译的新建字符串类型名称为 browser.translation.google.apiKey 的设置项,值为你申请得到的 Google 翻译的 apiKey 使用该翻译引擎时将 browser.translation.engine 的值改为 Google(首字母必须大写,此为默认值) 由于 Google 翻译 apiKey 为收费的,就不介绍如何申请了。 | 小声地提醒一下,Google 翻译的 apiKey 可以在 github 白嫖别人代码中泄漏的,为了防止被滥用关键字自己琢磨一下吧。

Bing 翻译的分别新建字符串类型名称为 browser.translation.bing.apiKeyOverride browser.translation.bing.clientIdOverride 的设置项,值为你申请得到的 Bing 翻译的 apiKey 和 clientId 使用该翻译引擎时将 browser.translation.engine 的值改为 Bing(首字母必须大写) 由于 Bing 提供的 API 好像挂了,同样不介绍如何申请。

像Chrome一样弹出Google翻译工具栏的扩展Google Translate This:https://github.com/andreicristianpetcu/google_translate_this

  • DNS-over-HTTPS(DoH)+ESNI 解决GitHub连接问题

  • 分享个人总结的hosts与自带防火墙列表

  • 修改更新通道,修改根部目录下update-settings.ini和defaults\pref\channel-prefs.js文件

  • 使用内建的策略(Policies)功能禁用版本更新检测:根目录下创建一个名叫distribution的子文件夹,其中新建文本文件policies.json,文档内容为:

{
  "policies": {
    "DisableAppUpdate": true
  }
}

强制雅黑:https://bbs.kafan.cn/forum.php?mod=redirect&goto=findpost&ptid=1664505&pid=30282384

字体替换一:https://bbs.kafan.cn/forum.php?mod=redirect&goto=findpost&ptid=1664505&pid=30315464

字体替换二:https://bbs.kafan.cn/forum.php?mod=redirect&goto=findpost&ptid=1647873&pid=29892002

全局雅黑最佳方案:https://bbs.kafan.cn/thread-1681393-1-1.html

About


Languages

Language:JavaScript 99.2%Language:CSS 0.8%