From 1ff134807acee313f11c56da13f4069da7658def Mon Sep 17 00:00:00 2001 From: Lachlan Kermode Date: Thu, 15 Aug 2019 17:58:14 +0100 Subject: [PATCH] fix lint --- src/index.jsx | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/index.jsx b/src/index.jsx index 35ed318..1cea1df 100644 --- a/src/index.jsx +++ b/src/index.jsx @@ -13,21 +13,23 @@ ReactDOM.render( // Expressions from https://exceptionshub.com/how-to-detect-safari-chrome-ie-firefox-and-opera-browser.html +/* eslint-disable */ // Opera 8.0+ -var isOpera = (!!window.opr && !!opr.addons) || !!window.opera || navigator.userAgent.indexOf(' OPR/') >= 0; +const isOpera = (!!window.opr && !!opr.addons) || !!window.opera || navigator.userAgent.indexOf(' OPR/') >= 0 // Firefox 1.0+ -var isFirefox = typeof InstallTrigger !== 'undefined'; +const isFirefox = typeof InstallTrigger !== 'undefined' // Safari 3.0+ "[object HTMLElementConstructor]" -var isSafari = /constructor/i.test(window.HTMLElement) || (function (p) { return p.toString() === "[object SafariRemoteNotification]"; })(!window['safari'] || (typeof safari !== 'undefined' && safari.pushNotification)); +const isSafari = /constructor/i.test(window.HTMLElement) || (function (p) { return p.toString() === '[object SafariRemoteNotification]' })(!window['safari'] || (typeof safari !== 'undefined' && safari.pushNotification)) // Internet Explorer 6-11 -var isIE = /*@cc_on!@*/false || !!document.documentMode; +const isIE = /* @cc_on!@ */false || !!document.documentMode // Edge 20+ -var isEdge = !isIE && !!window.StyleMedia; +const isEdge = !isIE && !!window.StyleMedia // Chrome 1+ -var isChrome = !!window.chrome && !!window.chrome.webstore; +const isChrome = !!window.chrome && !!window.chrome.webstore // Blink engine detection -var isBlink = (isChrome || isOpera) && !!window.CSS; +const isBlink = (isChrome || isOpera) && !!window.CSS if (isSafari || isEdge || isIE || isOpera) { alert('Please view this website in Firefox or Chrome for best viewing. It is untested in your browser.') } +/* eslint-enable */