Tìm kiếm hỗ trợ

Tránh các lừa đảo về hỗ trợ. Chúng tôi sẽ không bao giờ yêu cầu bạn gọi hoặc nhắn tin đến số điện thoại hoặc chia sẻ thông tin cá nhân. Vui lòng báo cáo hoạt động đáng ngờ bằng cách sử dụng tùy chọn "Báo cáo lạm dụng".

Tìm hiểu thêm

Local file as new tab page

  • 3 trả lời
  • 0 gặp vấn đề này
  • 5 lượt xem
  • Trả lời mới nhất được viết bởi cor-el

more options

I have used a custom html file as my homepage for years and while I can get Firefox to accept it as my homepage, I can't for the life of me figure out how to make it so when I open a new tab it goes straight to said custom page. I've tried multiple different add-ons for Firefox and none have worked, and I've checked multiple different support questions here and am still unable to figure this out.

I have used a custom html file as my homepage for years and while I can get Firefox to accept it as my homepage, I can't for the life of me figure out how to make it so when I open a new tab it goes straight to said custom page. I've tried multiple different add-ons for Firefox and none have worked, and I've checked multiple different support questions here and am still unable to figure this out.

Tất cả các câu trả lời (3)

more options

Have you tried this one? I don't know whether it will do what you want.

https://addons.mozilla.org/firefox/addon/new-tab-override

more options

Terry said

Have you tried this one? I don't know whether it will do what you want. https://addons.mozilla.org/firefox/addon/new-tab-override

I have tried that one, but it doesn't work. Trying to link directly to the file gives this message "Due to Firefox restrictions, it is not possible for extensions to access local files." and if I just set it to my current homepage I get "Only home pages starting with http:// or https:// are supported." which doesn't work for me because my homepage is a local html file. If I do use the local file option, it partially loads, just without any of the CSS so I just get a white screen with a few hyperlinks.

more options

You can possibly do this directly via autoconfig.cfg and autoconfig.js.

This code still works for me.

  • /questions/1401382 Blank new tab when using file:/// for homepage with newtabhomepage addon

Firefox appears to 'esmify' automatically in case of known .jsm files that have been converted.


Content of autoconfig.cfg:

// autoconfig.cfg start with a comment line; autoconfig.js => pref("general.config.sandbox_enabled", false);
try {
  Components.utils.import("resource:///modules/AboutNewTab.jsm");
  AboutNewTab.newTabURL = "file:///xxx";
} catch(e){Components.utils.reportError(e);} // Browser Console

Content of autoconfig.js:

//
pref("general.config.filename", "autoconfig.cfg");
pref("general.config.obscure_value", 0);
pref("general.config.sandbox_enabled", false);

Được chỉnh sửa bởi cor-el vào