refactor: lint

This commit is contained in:
liyasthomas
2021-05-18 14:57:29 +05:30
parent 7f248da0b3
commit cc27c552af
84 changed files with 1444 additions and 973 deletions

View File

@@ -5,13 +5,18 @@ export const hasExtensionInstalled = () =>
typeof window.__POSTWOMAN_EXTENSION_HOOK__ !== "undefined"
export const hasChromeExtensionInstalled = () =>
hasExtensionInstalled() && /Chrome/i.test(navigator.userAgent) && /Google/i.test(navigator.vendor)
hasExtensionInstalled() &&
/Chrome/i.test(navigator.userAgent) &&
/Google/i.test(navigator.vendor)
export const hasFirefoxExtensionInstalled = () =>
hasExtensionInstalled() && /Firefox/i.test(navigator.userAgent)
export const cancelRunningExtensionRequest = () => {
if (hasExtensionInstalled() && window.__POSTWOMAN_EXTENSION_HOOK__.cancelRunningRequest) {
if (
hasExtensionInstalled() &&
window.__POSTWOMAN_EXTENSION_HOOK__.cancelRunningRequest
) {
window.__POSTWOMAN_EXTENSION_HOOK__.cancelRunningRequest()
}
}