Merge branch 'master' of github.com:gorhill/uBlock

This commit is contained in:
gorhill 2015-03-11 19:55:36 -04:00
commit ade97fdaea
3 changed files with 13 additions and 5 deletions

View File

@ -71,7 +71,7 @@ vAPI.download = function(details) {
};
if ( vAPI.isMainProcess ) {
vAPI.tabs.open(request);
vAPI.tabs.open(request.details);
return;
}

View File

@ -32,6 +32,7 @@
var vAPI = self.vAPI = self.vAPI || {};
vAPI.isMainProcess = true;
vAPI.safari = true;
/******************************************************************************/

View File

@ -55,14 +55,21 @@ vAPI.download = function(details) {
a.dispatchEvent(new MouseEvent('click'));
return;
}
var messager = vAPI.messaging.channel('_download');
messager.send({
var request = {
what: 'gotoURL',
details: {
url: details.url,
index: -1
}
});
};
if ( vAPI.isMainProcess ) {
vAPI.tabs.open(request);
return;
}
var messager = vAPI.messaging.channel('_download');
messager.send(request);
messager.close();
};