Firefox: get the version number from the fragment

This commit is contained in:
Deathamns 2015-01-29 14:12:21 +01:00
parent e9b816f585
commit 21b42304fe
3 changed files with 21 additions and 11 deletions

View File

@ -60,7 +60,7 @@ function startup(data, reason) {
);
bgProcess.setAttribute(
'src',
'chrome://' + hostName + '/content/background.html'
'chrome://' + hostName + '/content/background.html#' + data.version
);
restartListener.messageManager.addMessageListener(
@ -104,13 +104,15 @@ function shutdown(data, reason) {
bgProcess.parentNode.removeChild(bgProcess);
// Remove the restartObserver only when the extension is being disabled
if ( data !== undefined ) {
restartListener.messageManager.removeMessageListener(
hostName + '-restart',
restartListener
);
if ( data === undefined ) {
return;
}
// Remove the restartObserver only when the extension is being disabled
restartListener.messageManager.removeMessageListener(
hostName + '-restart',
restartListener
);
}
/******************************************************************************/

View File

@ -19,7 +19,7 @@
<r:Description>
<id>{{ec8030f7-c20a-464f-9b0e-13a3a9e97384}}</id>
<minVersion>24.0</minVersion>
<maxVersion>38.0</maxVersion>
<maxVersion>39.0</maxVersion>
</r:Description>
</targetApplication>
@ -28,8 +28,17 @@
<r:Description>
<id>{{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}}</id>
<minVersion>2.21</minVersion>
<maxVersion>2.35</maxVersion>
<maxVersion>2.36</maxVersion>
</r:Description>
</targetApplication>
<!-- Thunderbird
<targetApplication>
<r:Description>
<id>{{3550f703-e582-4d05-9a08-453d09bdfdc6}}</id>
<minVersion>24.0</minVersion>
<maxVersion>39.0</maxVersion>
</r:Description>
</targetApplication> -->
</r:Description>
</r:RDF>

View File

@ -43,10 +43,9 @@ vAPI.firefox = true;
/******************************************************************************/
// TODO: read these data from somewhere...
vAPI.app = {
name: 'µBlock',
version: '0.8.6.0'
version: location.hash.slice(1)
};
/******************************************************************************/