Поиск в Поддержке

Избегайте мошенников, выдающих себя за службу поддержки. Мы никогда не попросим вас позвонить, отправить текстовое сообщение или поделиться личной информацией. Сообщайте о подозрительной активности, используя функцию «Пожаловаться».

Learn More

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

  • Нет ответов
  • 0 имеют эту проблему
  • 13 просмотров
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.

Для ответа на сообщения вы должны войти в свою учётную запись. Пожалуйста, задайте новый вопрос, если у вас ещё нет учётной записи.