firefox使用的一些小技巧汇总

关于add-on的签名

官方文档: https://extensionworkshop.com/documentation/publish/signing-and-distribution-overview/

firefox的add-on是不允许安装未签名的add-on的(即直接安装压缩包),

Unsigned extensions can be installed in the Developer Edition, Nightly, and ESR versions of Firefox, after toggling the xpinstall.signatures.required preference in about:config. To use this feature your extension must have an add-on ID.

如果想要安装未签名的add-on,需要:

  1. 使用Developer Edition, Nightly, or ESR versions of Firefox; 或者其他第三方编译(比如waterfox)

  2. about:config中将xpinstall.signatures.required设置为false

  3. 添加自定义的add-on ID :

    在manifest.json中添加:

    1
    2
    3
    4
    5
    6
    7
    {
    ,"applications": {
    "gecko": {
    "id": "your_addon_id@your_domain.com"
    }
    }
    }
  4. 或者在about:debugging中选择This Firefox,然后点击Load Temporary Add-on,选择你的压缩包。(这种方式每次重启浏览器都会失效)

对addon签名: 上传到 https://addons.mozilla.org/zh-CN/developers/addons

关闭" always open in container" shortcut

https://github.com/mozilla/multi-account-containers/issues/2207#issuecomment-1223683298

摘抄如下:

  1. Enable userChrome.css support in Fx v69+(set toolkit.legacyUserProfileCustomizations.stylesheets to true in about:config)

  2. Open about:support

  3. Click on “Profile Folder” -> “Open Folder”

  4. Create a sub-folder named “chrome”

  5. Change into the new folder

  6. Create a file named “userChrome.css”

  7. Write userChrome.css as below:

    1
    #pageAction-urlbar-_testpilot-containers { display: none; }
  8. Restart Firefox

    image

https://support.mozilla.org/en-US/questions/881261

  1. In a new tab, type or paste about:config in the address bar and press Enter. Click the button promising to be careful.

  2. In the filter box, type or paste urlbar and pause while the list is filtered

  3. Double-click browser.urlbar.trimURLs to toggle it from true to false (it should turn bold).

You’re done, you can close that tab.

低版本firefox使用高版本profile

1
firefox --allow-downgrade -p

默认新标签页

about:newtab

shift+右键

shift+右键可以强制调出浏览器右键菜单, 实现比如cnki文章的复制

允许addon 工作在support.mozilla.org等网站上

https://www.reddit.com/r/FirefoxAddons/comments/xd416g/how_do_i_enable_addons_on_mozillaorg_aboutpages/

Via the URL bar, go to about:config and search for extensions.webextensions.restrictedDomains

Remove one, some or all of the domains listed under Value to remove the restriction.

(未尝试) While in about:config, search for privacy.resistFingerprinting.block_mozAddonManager and change it to true.

禁止Firefox Developer Edition自动更新

https://github.com/mozilla/policy-templates#manualappupdateonly

在firefox安装目录新建文件夹distribution,然后在distribution目录下新建文件policies.json, 比如位置为:

C:/Program Files/Firefox Developer Edition/distribution/policies.json

文件内容如下:

1
2
3
4
5
{
"policies": {
"ManualAppUpdateOnly" : true
}
}

之后在 about:policies#active 可以看到manualAppUpdateOnly的值为true

关闭Firefox 109引入的new extensions button

about:config

extensions.unifiedExtensions.enabled --> false

就会恢复到之前版本一样的UI了

src

Android

安装其他firefox addon

我的收藏集: https://addons.mozilla.org/zh-CN/firefox/collections/16660461/TM/

  1. 需要Nightly版本的firefox(或者其他第三方编译的firefox, 比如

    name apk download
    firefox nightly Mozilla ci
    Fennec F-Droid F-Droid
    iceraven github release

    一个Android上的各个版本的Firefox更新器: FFUpdater

  2. 使用方法----多次点击版本信息, 手动输入收藏id和名称

一个搜索框的bug (和微软桌面一起使用时出现)

https://github.com/mozilla-mobile/fenix/issues/23009#

控制台在更新界面时保存记录

image

ubuntu 22.04 使用apt安装firefox和geckodriver

https://www.omgubuntu.co.uk/2022/04/how-to-install-firefox-deb-apt-ubuntu-22-04

1
2
3
4
5
6
7
8
9
10
11
12
13
sudo snap remove firefox

sudo add-apt-repository ppa:mozillateam/ppa

echo '
Package: *
Pin: release o=LP-PPA-mozillateam
Pin-Priority: 1001
' | sudo tee /etc/apt/preferences.d/mozilla-firefox

sudo apt install firefox

sudo apt install firefox-geckodriver
-------------end-------------