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