show error page on firefox v49 and below
This commit is contained in:
parent
303b34a70b
commit
6b291ae012
@ -3,8 +3,24 @@ window.Raven.config(window.dsn).install();
|
|||||||
window.dsn = undefined;
|
window.dsn = undefined;
|
||||||
|
|
||||||
const testPilotGA = require('testpilot-ga');
|
const testPilotGA = require('testpilot-ga');
|
||||||
|
const {gcmCompliant, sendEvent} = require('./utils');
|
||||||
window.analytics = new testPilotGA({
|
window.analytics = new testPilotGA({
|
||||||
an: 'Firefox Send',
|
an: 'Firefox Send',
|
||||||
ds: 'web',
|
ds: 'web',
|
||||||
tid: window.trackerId
|
tid: window.trackerId
|
||||||
});
|
});
|
||||||
|
|
||||||
|
gcmCompliant().catch(err => {
|
||||||
|
$('#page-one').attr('hidden', true);
|
||||||
|
$('#download').attr('hidden', true);
|
||||||
|
sendEvent('sender', 'unsupported', {
|
||||||
|
cd6: err
|
||||||
|
}).then(() => {
|
||||||
|
location.replace('/unsupported');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
if (navigator.userAgent.toLowerCase().indexOf('firefox') > -1 &&
|
||||||
|
parseInt(navigator.userAgent.toLowerCase().match(/firefox\/*([^\n\r]*)\./)[1]) <= 49) {
|
||||||
|
location.replace('/unsupported');
|
||||||
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
require('./common');
|
require('./common');
|
||||||
const FileReceiver = require('./fileReceiver');
|
const FileReceiver = require('./fileReceiver');
|
||||||
const { notify, findMetric, gcmCompliant, sendEvent } = require('./utils');
|
const { notify, findMetric, sendEvent } = require('./utils');
|
||||||
const bytes = require('bytes');
|
const bytes = require('bytes');
|
||||||
const Storage = require('./storage');
|
const Storage = require('./storage');
|
||||||
const storage = new Storage(localStorage);
|
const storage = new Storage(localStorage);
|
||||||
@ -11,14 +11,6 @@ require('jquery-circle-progress');
|
|||||||
const Raven = window.Raven;
|
const Raven = window.Raven;
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
gcmCompliant().catch(err => {
|
|
||||||
$('#download').attr('hidden', true);
|
|
||||||
sendEvent('recipient', 'unsupported', {
|
|
||||||
cd6: err
|
|
||||||
}).then(() => {
|
|
||||||
location.replace('/unsupported');
|
|
||||||
});
|
|
||||||
});
|
|
||||||
//link back to homepage
|
//link back to homepage
|
||||||
$('.send-new').attr('href', window.location.origin);
|
$('.send-new').attr('href', window.location.origin);
|
||||||
|
|
||||||
|
@ -3,7 +3,6 @@ require('./common');
|
|||||||
const FileSender = require('./fileSender');
|
const FileSender = require('./fileSender');
|
||||||
const {
|
const {
|
||||||
notify,
|
notify,
|
||||||
gcmCompliant,
|
|
||||||
findMetric,
|
findMetric,
|
||||||
sendEvent,
|
sendEvent,
|
||||||
ONE_DAY_IN_MS
|
ONE_DAY_IN_MS
|
||||||
@ -25,15 +24,6 @@ if (storage.has('referrer')) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
gcmCompliant().catch(err => {
|
|
||||||
$('#page-one').attr('hidden', true);
|
|
||||||
sendEvent('sender', 'unsupported', {
|
|
||||||
cd6: err
|
|
||||||
}).then(() => {
|
|
||||||
location.replace('/unsupported');
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#file-upload').change(onUpload);
|
$('#file-upload').change(onUpload);
|
||||||
|
|
||||||
$('.legal-links a, .social-links a, #dl-firefox').click(function(target) {
|
$('.legal-links a, .social-links a, #dl-firefox').click(function(target) {
|
||||||
|
Loading…
Reference in New Issue
Block a user