mirror of
https://github.com/bitwarden/browser
synced 2025-12-12 06:13:38 +00:00
update autofiller to es6 syntax
This commit is contained in:
@@ -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();
|
chrome.runtime.sendMessage({
|
||||||
|
command: 'bgCollectPageDetails',
|
||||||
|
sender: 'autofiller'
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function fill() {
|
|
||||||
chrome.runtime.sendMessage({
|
|
||||||
command: 'bgCollectPageDetails',
|
|
||||||
sender: 'autofiller'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user