1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 08:13:42 +00:00

refactor autofill. add auto-fill on page load

This commit is contained in:
Kyle Spearrin
2017-08-28 13:00:46 -04:00
parent c40465f292
commit ad544e5240
12 changed files with 225 additions and 111 deletions

15
src/content/autofiller.js Normal file
View File

@@ -0,0 +1,15 @@
document.addEventListener('DOMContentLoaded', function (event) {
chrome.storage.local.get('enableAutoFillOnPageLoad', function (obj) {
if (obj && obj.enableAutoFillOnPageLoad === true) {
setTimeout(fill, 500);
window.addEventListener('popstate', fill);
}
});
function fill() {
chrome.runtime.sendMessage({
command: 'bgCollectPageDetails',
sender: 'autofiller'
});
}
});