1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-22 11:45:59 +01: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;
}