2017-08-10 19:02:13 +02:00
|
|
|
import Raven from 'raven-js';
|
|
|
|
import { unsupported } from './metrics';
|
2017-08-03 23:07:22 +02:00
|
|
|
|
2017-08-02 23:13:53 +02:00
|
|
|
if (navigator.doNotTrack !== '1' && window.RAVEN_CONFIG) {
|
2017-08-03 23:07:22 +02:00
|
|
|
Raven.config(window.SENTRY_ID, window.RAVEN_CONFIG).install();
|
2017-08-02 23:13:53 +02:00
|
|
|
}
|
2017-07-20 01:16:46 +02:00
|
|
|
|
2017-07-31 17:32:55 +02:00
|
|
|
const ua = navigator.userAgent.toLowerCase();
|
|
|
|
if (
|
|
|
|
ua.indexOf('firefox') > -1 &&
|
|
|
|
parseInt(ua.match(/firefox\/*([^\n\r]*)\./)[1], 10) <= 49
|
|
|
|
) {
|
2017-08-05 21:23:58 +02:00
|
|
|
unsupported({
|
|
|
|
err: new Error('Firefox is outdated.')
|
2017-07-31 17:32:55 +02:00
|
|
|
}).then(() => {
|
|
|
|
location.replace('/unsupported/outdated');
|
|
|
|
});
|
|
|
|
}
|
2017-08-03 23:07:22 +02:00
|
|
|
|
2017-08-10 19:02:13 +02:00
|
|
|
export { Raven };
|