MozillaZine

Add ability for new tabs to load a custom page on creation

Discussion of features in Seamonkey
therube

User avatar
 
Posts: 17799
Joined: March 10th, 2004, 9:59 pm
Location: Maryland USA

Post Posted May 27th, 2014, 4:23 pm

(since it was mentioned "in error" ;-) elsewhere, i'll just mention it here...)

Bug 200956 - Add ability for new tabs to load a custom page on creation. Implement "browser.newtab.url"

12:49 Ratty re Implement "browser.newtab.url"
12:49 Ratty patrick dempsey says [[It's pretty easy to implement and I'll gladly share my solution, although it would have to be modified to be ported back into SeaMonkey.]]

http://logs.glob.uno/?c=mozilla%23seamo ... 7+May+2014


tiles

You'd have to figure that any option there would default to what we've got now. Plus I don't think the idea is "tiles" per say.
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball CopyURL+ FetchTextURL FlashGot NoScript

patrickjdempsey

User avatar
 
Posts: 23734
Joined: October 23rd, 2008, 11:43 am
Location: Asheville NC

Post Posted May 27th, 2014, 5:52 pm

So the issue is that there are two very different features which are encompassed by one setting. The ability to customize newtab.url is a very different thing than creating an about:newtab page with tiles and changing that to the default newtab. I'm personally very much in favor of the former and very much against the latter. We will see where things end up in SeaMonkey but I can at least provide the details of the situation as it currently stands:

What SeaMonkey does now:

SeaMonkey has already had the ability to set the newtab page for quite some time. Currently this is controlled by the following preference: browser.tabs.loadOnNewTab:

-1 : Browser startup page -> startup.homepage_override_url (same as first install)
0 : Blank page -> about:blank
1 : Your homepage -> browser.startup.homepage (same as Home button)
2 : Last visited page

As you can see, SeaMonkey already has two customizable newtab settings, but these are redundant to existing buttons. It also has the rather novel: duplicate last visited page option. This is already well beyond what Firefox does.

What SeaFox (version 0.3) browser.newtab.url does:

Essentially all I've done with SeaFox is to add browser.newtab.url, and make it so that browser.tabs.loadOnNewTab:0 looks at browser.newtab.url, which defaults to about:blank:

-1 : Browser startup page -> startup.homepage_override_url(same as first install)
0 : Your new tab page -> browser.newtab.url (default = about:blank)
1 : Your homepage -> browser.startup.homepage (same as Home button)
2 : Last visited page

In my code I've also made a fail-safe so if browser.newtab.url doesn't exist it always defaults to about:blank. The nice thing about my implementation is that for most users, browser.newtab.url will be automatically supported without them changing any other settings. Whether or not this is the way it will appear in the final version is up to SeaMonkey folks, but I personally felt this was the best way to go.
Last edited by patrickjdempsey on May 28th, 2014, 12:21 am, edited 1 time in total.
Tip of the day: If it has "toolbar" in the name, it's crap.
What my avatar is about: https://addons.mozilla.org/en-US/seamonkey/addon/sea-fox/

patrickjdempsey

User avatar
 
Posts: 23734
Joined: October 23rd, 2008, 11:43 am
Location: Asheville NC

Post Posted May 27th, 2014, 10:15 pm

The method I've recommended in the bug is to expand the selection of settings under browser.tabs.loadOnNewTab. This makes it slightly more difficult to setup but a little more difficult for driveby search Hijackers.

-1 : Browser startup page -> startup.homepage_override_url (same as first install)
0 : Blank page -> about:blank
1 : Your homepage -> browser.startup.homepage (same as Home button)
2 : Last visited page
3 : Your new tab page -> browser.newtab.url (default = about:blank)

Incidentally, browser.tabs.loadOnNewTab:-1 is currently broken, so if any of your are testing these options it will resolve to about:blank.
Tip of the day: If it has "toolbar" in the name, it's crap.
What my avatar is about: https://addons.mozilla.org/en-US/seamonkey/addon/sea-fox/

Return to SeaMonkey Features


Who is online

Users browsing this forum: No registered users and 1 guest