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".

Learn More

How to focus content instead of address bar when (custom) Home page is opened?

  • Không có trả lời
  • 0 gặp vấn đề này
  • 13 lượt xem
more options

Hi.

Similar to this question: https://support.mozilla.org/ln/questions/1291938

I would like to know how to customize "autoconfig.js" or "firefox.cfg" so that the home page is focused instead of the address bar when I open Firefox.

I the linked question, the following solutions works fine for focus content on New Tab:

    Services.obs.addObserver((event) => {
      window = BrowserWindowTracker.getTopWindow();
      window.gBrowser.selectedBrowser.focus();
    }, "browser-open-newtab-start");
  } catch(e) { Cu.reportError(e); }

It works fine, but I can't make it work for the Homage page when it's configured to open a local file.

I tried to bind the "window.gBrowser.selectedBrowser.focus();" action on the "browser-open-homepage-start" event but it has not effect.

Thanks.

Hi. Similar to this question: https://support.mozilla.org/ln/questions/1291938 I would like to know how to customize "autoconfig.js" or "firefox.cfg" so that the home page is focused instead of the address bar when I open Firefox. I the linked question, the following solutions works fine for focus content on New Tab: Services.obs.addObserver((event) => { window = BrowserWindowTracker.getTopWindow(); window.gBrowser.selectedBrowser.focus(); }, "browser-open-newtab-start"); } catch(e) { Cu.reportError(e); } It works fine, but I can't make it work for the Homage page when it's configured to open a local file. I tried to bind the "window.gBrowser.selectedBrowser.focus();" action on the "browser-open-homepage-start" event but it has not effect. Thanks.

Bạn phải đăng nhập vào tài khoản của bạn để trả lời bài viết. Vui lòng bắt đầu một câu hỏi mới, nếu bạn chưa có tài khoản.