mirror of
https://github.com/bitwarden/clients.git
synced 2025-12-11 05:26:19 -06:00
20 lines
567 B
JavaScript
20 lines
567 B
JavaScript
document.addEventListener('DOMContentLoaded', (event) => {
|
|
let pageHref = null;
|
|
|
|
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;
|
|
chrome.runtime.sendMessage({
|
|
command: 'bgCollectPageDetails',
|
|
sender: 'autofiller'
|
|
});
|
|
}
|
|
}
|
|
});
|