為了改善您的使用體驗,本網站正在進行維護,部分功能暫時無法使用。若本站的文件無法解決您的問題,想要向社群發問的話,請到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 發問,我們的社群成員將很快會回覆您的疑問。

搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

了解更多

How to delete the url of local startpage, how to make it as a new tab?

  • 1 回覆
  • 0 有這個問題
  • 1 次檢視
  • 最近回覆由 cor-el

more options

To make the local startpage as a new tab I tried autoconfig.js and autoconfig.cfg but I got a error message when I open the broswer and nothing change. To remove the url from the local startpage I browse the reddit but I couldn't find answer, I want that when I open the browser it show my custom and local startpage without the url appearing.

To make the local startpage as a new tab I tried autoconfig.js and autoconfig.cfg but I got a error message when I open the broswer and nothing change. To remove the url from the local startpage I browse the reddit but I couldn't find answer, I want that when I open the browser it show my custom and local startpage without the url appearing.

所有回覆 (1)

more options

If you get an error when you use autoconfig, then you can check the Browser Console for more detail.

What code are you using in autoconfig.cfg ?

Note that you need to set general.config.sandbox_enabled to false in autoconfig.js to be able you include JavaScript. You also can no longer import Services.jsm, but have to use a different way.

let Services = globalThis.Services || ChromeUtils.import("resource://gre/modules/Services.jsm").Services;

You can use the autoconfig.cfg file in the Firefox installation folder to initialize (set/lock) preferences and run privileged JavaScript code.

To use Autoconfig, place two files into the Firefox installation directory.

  • on Windows, they go into the same directory where Firefox is installed
  • on macOS, they go into the Contents/Resources directory of the Firefox.app

The autoconfig.js file that specifies to use autoconfig.cfg is placed into the "defaults\pref" directory where the channel-prefs.js file is located. The autoconfig.cfg file is placed at the top level of the Firefox directory.

  • autoconfig.cfg and autoconfig.js need to start with a comment line (//)
  • autoconfig.js needs to use Unix line endings (LF instead of CR/LF)

See also:


Content of autoconfig.js:

//start autoconfig.js with a comment line
pref("general.config.filename", "autoconfig.cfg");
pref("general.config.obscure_value", 0);
pref("general.config.sandbox_enabled", false);

Content of autoconfig.cfg: // start autoconfig.cfg with a comment line

由 cor-el 於 修改