1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-12-29 17:38:04 +01:00

update autofiller to es6 syntax

This commit is contained in:
Kyle Spearrin 2017-11-10 23:52:29 -05:00
parent 12851a6e80
commit b13bb49164

View File

@ -1,7 +1,7 @@
document.addEventListener('DOMContentLoaded', function (event) {
var pageHref = null;
document.addEventListener('DOMContentLoaded', (event) => {
let pageHref = null;
chrome.storage.local.get('enableAutoFillOnPageLoad', function (obj) {
chrome.storage.local.get('enableAutoFillOnPageLoad', (obj) => {
if (obj && obj.enableAutoFillOnPageLoad === true) {
setInterval(doFillIfNeeded, 500);
}
@ -10,14 +10,10 @@
function doFillIfNeeded() {
if (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'
});
}
});