See also: http://developer.mozilla.org/en/docs/Code_snippets:Miscellaneous#Retrieving_the_version_of_an_extension_as_specified_in_the_extension.27s_install.rdf
--- Malte Kraus <[EMAIL PROTECTED]> wrote: > in toolkit apps you can do this: > > // GUID is the <em:id> in install.rdf > var extMan = Cc["@mozilla.org/extensions/manager;1"] > .getService(Ci.nsIExtensionManager); > var version = extMan.getItemForID(GUID).version; > > joe ertaba schrieb: > > is there any function available to find out extension version > > (extension version in install.rdf file) to use it in other places? > > > > On Feb 11, 2008 7:53 PM, Eric H. Jung <[EMAIL PROTECTED] > > <mailto:[EMAIL PROTECTED]>> wrote: > > > > > > > > --- Ezequiel Calderara <[EMAIL PROTECTED] > > <mailto:[EMAIL PROTECTED]>> wrote: > > > > > this is what showcase does: > > > > > > showWelcomeScreenIfNeeded: function() { > > > if (ShowcaseCache.prefs.getBoolPref("firstRunRedirection")) { > > > var currentVersion = ShowcaseCache.prefs.getCharPref > > > ("currentVersion"); > > > > > > if (currentVersion != "0.9.4.6 <http://0.9.4.6>") { > > > ShowcaseCache.prefs.setCharPref("currentVersion", > > "0.9.4.6 <http://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; > > > } > > > } > > > }, > > > > > > A nice enhancement to the below code would be to change > > http://showcase.uworks.net/updated.html to > > instead point to the newly-installed version. Example: > > http://showcase.uworks.net/updated.html#0.9.4.6 > > or > > http://showcase.uworks.net/updates/0.9.4.6.html > > This way the user can easily read release notes specifically for his > > update. > > > > > > > > > > > > ____________________________________________________________________________________ > > Be a better friend, newshound, and > > know-it-all with Yahoo! Mobile. Try it now. > > http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ > > > > _______________________________________________ > > Project_owners mailing list > > [email protected] <mailto:[email protected]> > > https://www.mozdev.org/mailman/listinfo/project_owners > > > > > > > > ------------------------------------------------------------------------ > > > > _______________________________________________ > > Project_owners mailing list > > [email protected] > > https://www.mozdev.org/mailman/listinfo/project_owners > _______________________________________________ > Project_owners mailing list > [email protected] > https://www.mozdev.org/mailman/listinfo/project_owners > ____________________________________________________________________________________ Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping _______________________________________________ Project_owners mailing list [email protected] https://www.mozdev.org/mailman/listinfo/project_owners
