From 4de8fa4ab40c3556c4b3327080d7a33efda5a481 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Wed, 14 Sep 2016 00:20:10 -0400 Subject: [PATCH] fillScript --- src/formDataContent.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/formDataContent.js b/src/formDataContent.js index 6673a9e7..289eb181 100644 --- a/src/formDataContent.js +++ b/src/formDataContent.js @@ -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; }