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:
15
src/content/autofiller.js
Normal file
15
src/content/autofiller.js
Normal 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'
|
||||
});
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user