Skip to content
This repository has been archived by the owner on Dec 13, 2020. It is now read-only.

Fix errors on safari and opera #594 #617

Merged
merged 1 commit into from
Apr 7, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions src/containers/Login.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,18 @@ class Login extends Component {
}

userBrowser = () => {
let opr;
let safari;

const isChrome = !!window.chrome && !!window.chrome.webstore;

const isFirefox = typeof InstallTrigger !== 'undefined';

const isSafari = /constructor/i.test(window.HTMLElement) ||
(function (p) { return p.toString() ===
'[object SafariRemoteNotification]'; })(!window['safari'] ||
safari.pushNotification);
const isOpera = (!!window.opr && !!opr.addons) || !!window.opera ||
navigator.userAgent.indexOf(' OPR/') >= 0;
const isSafari = navigator.vendor &&
navigator.vendor.indexOf('Apple') > -1 &&
navigator.userAgent &&
!navigator.userAgent.match('CriOS');

const isOpera = (!!window.opr && !!window.opr.addons) ||
!!window.opera || navigator.userAgent.indexOf(' OPR/') >= 0;

const isIE = /*@cc_on!@*/false || !!document.documentMode; // IE 6-11

Expand Down