1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-23 19:53:43 +00:00

Add eslint (#2405)

This commit is contained in:
Oscar Hinton
2022-02-24 18:14:04 +01:00
committed by GitHub
parent b0dbb6f2f9
commit c27f421d56
77 changed files with 2430 additions and 903 deletions

View File

@@ -18,13 +18,13 @@ document.addEventListener("DOMContentLoaded", (event) => {
setInterval(() => doFillIfNeeded(), 500);
}
});
chrome.runtime.onMessage.addListener((msg: any, sender: any, sendResponse: Function) => {
chrome.runtime.onMessage.addListener((msg, sender, sendResponse) => {
if (msg.command === "fillForm" && pageHref === msg.url) {
filledThisHref = true;
}
});
function doFillIfNeeded(force: boolean = false) {
function doFillIfNeeded(force = false) {
if (force || pageHref !== window.location.href) {
if (!force) {
// Some websites are slow and rendering all page content. Try to fill again later

View File

@@ -63,6 +63,7 @@ document.addEventListener("DOMContentLoaded", (event) => {
}
const domains = obj[activeUserId].settings.neverDomains;
// eslint-disable-next-line
if (domains != null && domains.hasOwnProperty(window.location.hostname)) {
return;
}
@@ -76,11 +77,11 @@ document.addEventListener("DOMContentLoaded", (event) => {
}
});
chrome.runtime.onMessage.addListener((msg: any, sender: any, sendResponse: Function) => {
chrome.runtime.onMessage.addListener((msg, sender, sendResponse) => {
processMessages(msg, sendResponse);
});
function processMessages(msg: any, sendResponse: Function) {
function processMessages(msg: any, sendResponse: (response?: any) => void) {
if (msg.command === "openNotificationBar") {
if (inIframe) {
return;