bitwarden-estensione-browser/src/content/autofiller.js

20 lines
567 B
JavaScript
Raw Normal View History

2017-11-11 05:52:29 +01:00
document.addEventListener('DOMContentLoaded', (event) => {
let pageHref = null;
2017-11-11 05:52:29 +01:00
chrome.storage.local.get('enableAutoFillOnPageLoad', (obj) => {
if (obj && obj.enableAutoFillOnPageLoad === true) {
setInterval(doFillIfNeeded, 500);
}
});
function doFillIfNeeded() {
if (pageHref !== window.location.href) {
pageHref = window.location.href;
2017-11-11 05:52:29 +01:00
chrome.runtime.sendMessage({
command: 'bgCollectPageDetails',
sender: 'autofiller'
});
}
}
});