mirror of
https://github.com/bitwarden/browser.git
synced 2025-01-03 18:28:13 +01:00
update autofiller to es6 syntax
This commit is contained in:
parent
12851a6e80
commit
b13bb49164
@ -1,7 +1,7 @@
|
|||||||
document.addEventListener('DOMContentLoaded', function (event) {
|
document.addEventListener('DOMContentLoaded', (event) => {
|
||||||
var pageHref = null;
|
let pageHref = null;
|
||||||
|
|
||||||
chrome.storage.local.get('enableAutoFillOnPageLoad', function (obj) {
|
chrome.storage.local.get('enableAutoFillOnPageLoad', (obj) => {
|
||||||
if (obj && obj.enableAutoFillOnPageLoad === true) {
|
if (obj && obj.enableAutoFillOnPageLoad === true) {
|
||||||
setInterval(doFillIfNeeded, 500);
|
setInterval(doFillIfNeeded, 500);
|
||||||
}
|
}
|
||||||
@ -10,14 +10,10 @@
|
|||||||
function doFillIfNeeded() {
|
function doFillIfNeeded() {
|
||||||
if (pageHref !== window.location.href) {
|
if (pageHref !== window.location.href) {
|
||||||
pageHref = window.location.href;
|
pageHref = window.location.href;
|
||||||
fill();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function fill() {
|
|
||||||
chrome.runtime.sendMessage({
|
chrome.runtime.sendMessage({
|
||||||
command: 'bgCollectPageDetails',
|
command: 'bgCollectPageDetails',
|
||||||
sender: 'autofiller'
|
sender: 'autofiller'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user