filter senders for autofill
This commit is contained in:
parent
3d45cfc7b8
commit
9fe35a9aef
|
@ -128,7 +128,7 @@ var bg_isBackground = true,
|
|||
frameId: sender.frameId, tab: msg.tab, details: msg.details
|
||||
}], msg.sender === 'autofill_cmd');
|
||||
}
|
||||
else {
|
||||
else if (msg.sender === 'contextMenu') {
|
||||
clearTimeout(autofillTimeout);
|
||||
pageDetailsToAutoFill.push({ frameId: sender.frameId, tab: msg.tab, details: msg.details });
|
||||
autofillTimeout = setTimeout(autofillPage, 300);
|
||||
|
@ -569,7 +569,11 @@ var bg_isBackground = true,
|
|||
return;
|
||||
}
|
||||
|
||||
chrome.tabs.sendMessage(tab.id, { command: 'collectPageDetails', tab: tab, sender: sender }, function () {
|
||||
chrome.tabs.sendMessage(tab.id, {
|
||||
command: 'collectPageDetails',
|
||||
tab: tab,
|
||||
sender: sender
|
||||
}, function () {
|
||||
if (chrome.runtime.lastError) {
|
||||
return;
|
||||
}
|
||||
|
@ -732,7 +736,11 @@ var bg_isBackground = true,
|
|||
return;
|
||||
}
|
||||
|
||||
chrome.tabs.sendMessage(tab.id, { command: 'collectPageDetails', tab: tab, sender: 'contextMenu' }, function () {
|
||||
chrome.tabs.sendMessage(tab.id, {
|
||||
command: 'collectPageDetails',
|
||||
tab: tab,
|
||||
sender: 'contextMenu'
|
||||
}, function () {
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
|
@ -40,10 +40,13 @@ angular
|
|||
return;
|
||||
}
|
||||
|
||||
chrome.tabs.sendMessage(tabs[0].id,
|
||||
{ command: 'collectPageDetails', tab: tabs[0], sender: 'currentController' }, function () {
|
||||
canAutofill = true;
|
||||
});
|
||||
chrome.tabs.sendMessage(tabs[0].id, {
|
||||
command: 'collectPageDetails',
|
||||
tab: tabs[0],
|
||||
sender: 'currentController'
|
||||
}, function () {
|
||||
canAutofill = true;
|
||||
});
|
||||
|
||||
var otherTypes = [constantsService.cipherType.card, constantsService.cipherType.identity];
|
||||
cipherService.getAllDecryptedForDomain(domain, otherTypes).then(function (ciphers) {
|
||||
|
|
|
@ -78,7 +78,7 @@ angular
|
|||
$state.go('home');
|
||||
});
|
||||
}
|
||||
else if (msg.command === 'collectPageDetailsResponse') {
|
||||
else if (msg.command === 'collectPageDetailsResponse' && msg.sender === 'currentController') {
|
||||
$scope.$broadcast('collectPageDetailsResponse', {
|
||||
frameId: sender.frameId,
|
||||
tab: msg.tab,
|
||||
|
|
Loading…
Reference in New Issue