1
0
mirror of https://github.com/bitwarden/desktop.git synced 2024-07-21 14:46:41 +02:00

fillScript

This commit is contained in:
Kyle Spearrin 2016-09-14 00:20:10 -04:00
parent 74dff39427
commit 4de8fa4ab4

View File

@ -71,14 +71,18 @@ function fill(document, fillScript, undefined) {
return JSON.stringify({'success': true});
}
/*
End 1Password Extension
*/
chrome.runtime.onMessage.addListener(function (msg, sender, sendResponse) {
if (msg.text === 'collectFormData') {
var formData = collect(document);
sendResponse(JSON.parse(formData));
return true;
}
if (msg.text === 'fillForm') {
fill(document, null);
else if (msg.text === 'fillForm') {
fill(document, msg.fillScript);
sendResponse();
return true;
}