mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-22 11:45:59 +01:00
fillScript
This commit is contained in:
parent
74dff39427
commit
4de8fa4ab4
@ -71,14 +71,18 @@ function fill(document, fillScript, undefined) {
|
|||||||
return JSON.stringify({'success': true});
|
return JSON.stringify({'success': true});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
End 1Password Extension
|
||||||
|
*/
|
||||||
|
|
||||||
chrome.runtime.onMessage.addListener(function (msg, sender, sendResponse) {
|
chrome.runtime.onMessage.addListener(function (msg, sender, sendResponse) {
|
||||||
if (msg.text === 'collectFormData') {
|
if (msg.text === 'collectFormData') {
|
||||||
var formData = collect(document);
|
var formData = collect(document);
|
||||||
sendResponse(JSON.parse(formData));
|
sendResponse(JSON.parse(formData));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (msg.text === 'fillForm') {
|
else if (msg.text === 'fillForm') {
|
||||||
fill(document, null);
|
fill(document, msg.fillScript);
|
||||||
sendResponse();
|
sendResponse();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user