MozillaZine


How to set about:blank as new tab page?

Discussion about official Mozilla Firefox builds
Caspid

User avatar
 
Posts: 582
Joined: December 18th, 2005, 4:01 pm

Post Posted June 29th, 2015, 11:41 pm

The latest update implements a new New Tab page, with an option to show a blank page; however, this blank page is not about:blank. How do I get about:blank as the new tab page again?
"Know what I pray for? The strength to change what I can, the inability to accept what I can't, and the incapacity to tell the difference." -Calvin

Virtual_ManPL

User avatar
 
Posts: 2058
Joined: July 24th, 2008, 5:52 am

Post Posted June 30th, 2015, 2:41 am

Virtualfox persona
Tired of constant Firefox UI changes? XUL extensions are not working anymore? Try SeaMonkey, Waterfox Classic, Pale Moon.

Caspid

User avatar
 
Posts: 582
Joined: December 18th, 2005, 4:01 pm

Post Posted June 30th, 2015, 8:06 am

Thanks, but is there a way to do it without an extension?
"Know what I pray for? The strength to change what I can, the inability to accept what I can't, and the incapacity to tell the difference." -Calvin

JayhawksRock

User avatar
 
Posts: 10433
Joined: October 24th, 2010, 8:51 am

Post Posted June 30th, 2015, 2:07 pm

Caspid wrote:Thanks, but is there a way to do it without an extension?

The preference browser.newtab.url still works (for now) so add it to about:config as a string and and about:blank as the value
"The trouble with quotes on the internet is you never know if they are genuine" ...Abraham Lincoln

WaltS48

User avatar
 
Posts: 4994
Joined: May 7th, 2010, 9:38 am
Location: Pennsylvania, USA

Post Posted June 30th, 2015, 5:07 pm

Linux Desktop - AMD Athlon(tm) II X3 455 3.3GHz | 8.0GB RAM | GeForce GT 630
Windows Notebook - AMD A8 7410 2.2GHz | 6.0GB RAM | AMD Radeon R5

Caspid

User avatar
 
Posts: 582
Joined: December 18th, 2005, 4:01 pm

Post Posted June 30th, 2015, 5:11 pm

Yeah, no dice. I already had the browser.newtab.url preference set.
"Know what I pray for? The strength to change what I can, the inability to accept what I can't, and the incapacity to tell the difference." -Calvin

JayhawksRock

User avatar
 
Posts: 10433
Joined: October 24th, 2010, 8:51 am

Post Posted June 30th, 2015, 5:55 pm

This is a list of ALL Modified (bold) newtab related prefs and their values. The result gives me a blank tab (labled New Tab) when about:newtab is entered in the address bar or I double click on the tab bar or click the new tab button. Maybe yours are different than mine on my WinXP

browser.newtab.url;about:blank
browser.newtabpage.directory.ping (no value used)
browser.newtabpage.enabled;false
browser.newtabpage.enhanced;false
browser.newtabpage.introShown;true
browser.newtabpage.storageVersion;1
browser.newtabpage.updateIntroShown;true

All others show default and there are 11 total prefs
"The trouble with quotes on the internet is you never know if they are genuine" ...Abraham Lincoln

dickvl

User avatar
 
Posts: 53551
Joined: July 18th, 2005, 3:25 am

Post Posted June 30th, 2015, 6:12 pm

I've added this code to my mozilla.cfg file to set the new tab page to about:blank and save the value to browser.newtab.url
Code: Select all
var newTabURL = "about:blank";
try {
Components.utils.import("resource:///modules/NewTabURL.jsm");
NewTabURL.override(newTabURL);
pref("browser.newtab.url",NewTabURL.get());
}
catch(e) {
pref("browser.newtab.url",newTabURL);
}


Shorter code:
Code: Select all
var newTabURL = "about:blank";
Components.utils.import("resource:///modules/NewTabURL.jsm");
NewTabURL.override(newTabURL);

// you can use this to save a copy to browser.newtab.url
pref("browser.newtab.url",NewTabURL.get());
Last edited by dickvl on October 3rd, 2015, 1:46 pm, edited 1 time in total.

JayhawksRock

User avatar
 
Posts: 10433
Joined: October 24th, 2010, 8:51 am

Post Posted June 30th, 2015, 7:14 pm

@dickvl
thanks much..
"The trouble with quotes on the internet is you never know if they are genuine" ...Abraham Lincoln

dickvl

User avatar
 
Posts: 53551
Joined: July 18th, 2005, 3:25 am

Post Posted June 30th, 2015, 9:27 pm

Note that if necessary that you can use these calls in the Browser Console (Firefox/Tools > Web Developer):
Code: Select all
NewTabURL.get();
NewTabURL.override("about:blank");


http://mxr.mozilla.org/mozilla-central/ ... TabURL.jsm
resource:///modules/NewTabURL.jsm

Virtual_ManPL

User avatar
 
Posts: 2058
Joined: July 24th, 2008, 5:52 am

Post Posted July 1st, 2015, 1:48 am

@ JayhawksRock - browser.newtab.url preference in about:config doesn't work anymore for about 2 Nightly releases per Bug 1118285 - The browser.newtab.url preference is abused and should be removed
Virtualfox persona
Tired of constant Firefox UI changes? XUL extensions are not working anymore? Try SeaMonkey, Waterfox Classic, Pale Moon.

jscher2000

User avatar
 
Posts: 11467
Joined: December 19th, 2004, 12:26 am
Location: Silicon Valley, CA USA

Post Posted October 18th, 2015, 3:01 pm

dickvl wrote:I've added this code to my mozilla.cfg file to set the new tab page to about:blank and save the value to browser.newtab.url

I suspected that would work but hadn't gotten around to testing it.

Unfortunately, this means it's still possible for malware to hijack the new tab page, and it's even more obscure than about:config. Sigh.

dickvl

User avatar
 
Posts: 53551
Joined: July 18th, 2005, 3:25 am

Post Posted October 19th, 2015, 10:31 am

You can override the mozilla.cfg file in this case via an extension that set the new tab page because it is not a pref that can be locked.
At least this still works with current versions of CTR installed and with this feature not enabled in CTR.

You would need far more complex code and add an event listener to monitor for changes to the new tab page.
You can set the mozilla.cfg file to read-only to make it more difficult to modify this file.

Peja Stija

User avatar
 
Posts: 649
Joined: June 4th, 2008, 8:46 am
Location: Belgium (proud producer of waffles)

Post Posted October 19th, 2015, 10:55 am

In a few months, we'll need an add-on to detect that we clicked our mousebutton.

Return to Firefox Builds


Who is online

Users browsing this forum: No registered users and 0 guests