[Project_owners] Open webpage after install update

Ezequiel Calderara ezechico at gmail.com
Mon Feb 11 03:11:27 PST 2008


this is what showcase does:

showWelcomeScreenIfNeeded: function() {
        if (ShowcaseCache.prefs.getBoolPref("firstRunRedirection")) {
          var currentVersion = ShowcaseCache.prefs.getCharPref
("currentVersion");

          if (currentVersion != "0.9.4.6") {
            ShowcaseCache.prefs.setCharPref("currentVersion", "0.9.4.6");
            var targetURL;
            if (currentVersion == "none") {
              targetURL = "http://showcase.uworks.net/welcome.html";
            } else {
              targetURL = "http://showcase.uworks.net/updated.html";
            }
            var newTab = getBrowser().addTab(targetURL);
            getBrowser().selectedTab = newTab;
          }
        }
      },


On Feb 11, 2008 7:34 AM, xeen <aka.xeen at gmail.com> wrote:

> As far as I know, there aren't any. You can create a variable though,
> that contains the currently installed version. Upon initializing your
> extension, you can check if this number equals the currently installed
> version (hardcoded).
> If yes, continue with normal initializing.
> If no, update the pref to the newly installed version and open the
> webpage.
>
> You should use this sparingly though, because users don't want to have
> pages opened at seemingly random occasions – Firefox updates
> everything automatically, so opening this every update might not be
> that good idea.
> Adblock Plus does this once after the installation if you need to get
> ideas. If you need more help on the actual implementation I can dig up
> some snippets.
>
> Greetings
> xeen
>
> On Mon, Feb 11, 2008 at 11:15 AM, joe ertaba <belaviyo at gmail.com> wrote:
> > Hi,
> >
> > I want to open a web-page in new tab after user update extension and
> restart
> > Firefox?
> > is there any especial functions for it ?
> >
> > _______________________________________________
> >  Project_owners mailing list
> >  Project_owners at mozdev.org
> >  https://www.mozdev.org/mailman/listinfo/project_owners
> >
> >
> _______________________________________________
> Project_owners mailing list
> Project_owners at mozdev.org
> https://www.mozdev.org/mailman/listinfo/project_owners
>



-- 
______
Ezequiel.

Http://www.ironicnet.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.mozdev.org/pipermail/project_owners/attachments/20080211/5ff1f4c8/attachment.html 


More information about the Project_owners mailing list