Closed Bug 266801 Opened 20 years ago Closed 19 years ago

startup homepage override for fresh installed extensions

Categories

(Toolkit :: Add-ons Manager, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: nrlz, Assigned: bugs)

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20041001 Firefox/0.10.1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20041001 Firefox/0.10.1

It would be nice if new extensions could temporarily override the default
startup homepage of users. When Firefox starts up after an extension is
installed, a specific webpage could be launched that could provide an
introduction or configuration details for that specific extension. After that
initial launch, the user's old homepage would be restored.

It would be useful in my particular case because the extension I am writing is a
toolbar button and since Firefox does not permit adding toolbar buttons with
scripts, the user must do that manually. Therefore, it would be nice if I could
redirect the user to an instructions page with steps on how to do it when my
extension is first installed.

My current workaround is to check for the existence of a preferences key at
startup and if it does not exist, I load my website. But this workaround is poor
because it creates unneccessary pref keys in the preferences file which exist
forever and have no subsequent uses except to take up space. Imagine what would
happen if everyone did that:
user_pref("extensionA.first_load", false);
user_pref("extensionB.first_load", false);
user_pref("extensionC.first_load", false);
user_pref("extensionD.first_load", false);
..

I imagine this enhancement would be achieved by adding something to the
install.rdf file like:
<em:welcomeURL>http://www.yahoo.com/welcome_new_user.html</em:welcomeURL>
and loading that URL when the browser is restarted.

Reproducible: Always
Steps to Reproduce:
That or (imo better) launch given chrome xul on first start and/or set some flag
indicating that this is first start after the extension was installed.

Some extensions do need this, and HTML homepage may be not enough for some of them
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows XP → All
Hardware: PC → All
What happens if you install multiple extensions at once, all of which want to do
this?
(In reply to comment #2)
> What happens if you install multiple extensions at once, all of which want to do
> this?

Firefox could cheat and load them all, in tabs :-) Seriously, multiple extension
installs are really a problem here. However, you could argue that most of the
users who install several extensions at once are most likely advanced users who
do not need such a welcome page (as they already know the extensions). For
beginners, though, such a feature would be really nice.
(In reply to comment #1)
> That or (imo better) launch given chrome xul on first start and/or set some 
> flag indicating that this is first start after the extension was installed.

I also considered setting a flag but then I felt that, IMO, explicitly stating
the welcome page and having the extension manager handle it would be better.:

Firstly, the extension manager can consider how to handle multiple welcome
pages. It can have them all open in tabs, windows, none at all or prompt the
user first. If each extension handled it by itself, then they would all be
different with some websites opening in tabs and other in windows.

Secondly, having code in the extension to detect this flag on startup everytime
would create unnecessary code baggage. Some extensions are really small and
minimal and having them all hook into window.addEventListener("load", ...) would
create many event listeners. We can cut back on them and decrease startup time
with the install.rdf setting.

> Some extensions do need this, and HTML homepage may be not enough for some of 
> them

If some extensions need to do some critical or complex first-run code, then I
would argue that it is better to use the prefKeys and set something like:
user_pref("extensionA.first_run", false);
This is because prefKeys persist even after an extension is uninstalled. If the
extension is installed again, the old prefs will still be there and if the
complex first-run code is forced to repeat itself, then some old prefs would be
overwritten. An example is the migration code for users switching over from IE.
We only want the migration to happen once and not to overwrite any old bookmarks
nor to repeat any already migrated bookmarks that the user has.
WONTFIX. extension authors can do this manually with a commandlinehandler and a one-time pref, or even in a browser overlay.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → WONTFIX
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.