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