I came up with a workaround for this, until it's properly implemented.
It's simple enough to read the version number from the extension's own
manifest.json:
chrome.extension.getVersion = function() {
if (!chrome.extension.version_) {
var xhr = new XMLHttpRequest();
xhr.open("GET", chrome.extension.getURL('manifest.json'), false);
xhr.onreadystatechange = function() {
if (this.readyState == 4) {
var manifest = JSON.parse(this.responseText);
chrome.extension.version_ = manifest.version;
}
};
xhr.send();
}
return chrome.extension.version_;
};
I haven't tested it thoroughly but it seems to work for me, when
placed in the background page JS.
-matias
On Jun 24, 5:04 pm, Aaron Boodman <[email protected]> wrote:
> Well, I'm sold. Created
> bug:http://code.google.com/p/chromium/issues/detail?id=15242
>
> - a
>
>
>
> On Wed, Jun 24, 2009 at 12:45 PM, Daniele S.<[email protected]> wrote:
> >Versiondiscover is usefull if your extensions want to tell theirversion
> > to, let's say, a webservice.
> > Or to print that on an About Page for the user to know.
>
> > Daniele S.
>
> > On Wed, Jun 24, 2009 at 8:30 AM, Patrick Stenzel
> > <[email protected]> wrote:
>
> >> On 24 Jun., 06:19, PhistucK <[email protected]> wrote:
> >> > There will be an auto update feature soon, it is part of the extensions
> >> > infrastructure.
>
> >> If it`s urgent you could place an XML-file withversioninformation in
> >> your project, read it via XHR and compare it with a similarversion
> >> file in your download-location, but i`d rather wait for the auto
> >> update as well.
>
> >> Patrick
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Chromium-extensions" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/chromium-extensions?hl=en
-~----------~----~----~----~------~----~------~--~---