0

When I open a new tab in Firefox, I would like it to display a custom page instead of the Firefox default. It should then focus the page itself, not the address bar.

The browser.newtab.url preference is no longer an option, but there are several extensions that allow using a homepage or a custom URL in a new tab.

I've tried:

  • New Tab Override (browser.newtab.url replacement) 2.2
  • New Tab Homepage 0.5.0
  • Classic Theme Restorer 1.4.5

The problem with all of these is that when I open a new tab and the page loads, the focus moves to the address bar. I need to focus the page instead.

In the past I have solved this issue with a "hacked" version of New Tab Homepage from this thread on Mozilla support forum, but I can't do that anymore since all extensions are required to be verified by Mozilla now.

Is there a way to use a custom "new tab" page and have it focused when a new tab is opened in Firefox?

EDIT: Question is about Firefox 43.

  • 1
    It might be more complicated than what you're looking for but you could use Greasemonkey to make a script that runs javascript on your newtab page to set the focus on whatever element you want. – MC10 Dec 20 '15 at 9:22
  • @MC10 Thanks, I've done it with Greasemonkey with a simple window.focus();, which was sufficient for my purposes. – Cinnam Dec 20 '15 at 10:41
  • 1
    Sounds great! You could add that as an answer below with more details, in case anyone else wants to know as well. – MC10 Dec 20 '15 at 11:50
1

I've used Greasemonkey for this. After installing the extension I've created a new user script similar to this one:

// ==UserScript==
// @name        New tab focus
// @namespace   your_namespace
// @description Focuses a page in a new tab
// @include     *://yourhomepage.com
// @version     1
// @grant       none
// ==/UserScript==

window.focus();

Just replace your_namespace and *://yourhomepage.com with the values you need. For more information on the @include rules see e.g. GreaseSpot wiki.

For displaying the desired page in the new tab I'm using Classic Theme Restorer. If you don't need the other features it provides, you can use a simpler extension like New Tab Override or New Tab Homepage.

EDIT: This is for Firefox 43.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.