don't preventDefault on links
This commit is contained in:
parent
09cc047ade
commit
376e1efa4c
|
@ -14,23 +14,17 @@ $(document).ready(function() {
|
||||||
//link back to homepage
|
//link back to homepage
|
||||||
$('.send-new').attr('href', window.location.origin);
|
$('.send-new').attr('href', window.location.origin);
|
||||||
|
|
||||||
$('.send-new').click(function(target) {
|
$('.send-new').click(function() {
|
||||||
target.preventDefault();
|
|
||||||
sendEvent('recipient', 'restarted', {
|
sendEvent('recipient', 'restarted', {
|
||||||
cd2: 'completed'
|
cd2: 'completed'
|
||||||
}).then(() => {
|
|
||||||
location.href = target.currentTarget.href;
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.legal-links a, .social-links a, #dl-firefox').click(function(target) {
|
$('.legal-links a, .social-links a, #dl-firefox').click(function(target) {
|
||||||
target.preventDefault();
|
|
||||||
const metric = findMetric(target.currentTarget.href);
|
const metric = findMetric(target.currentTarget.href);
|
||||||
// record exited event by recipient
|
// record exited event by recipient
|
||||||
sendEvent('recipient', 'exited', {
|
sendEvent('recipient', 'exited', {
|
||||||
cd3: metric
|
cd3: metric
|
||||||
}).then(() => {
|
|
||||||
location.href = target.currentTarget.href;
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -23,35 +23,26 @@ $(document).ready(function() {
|
||||||
$('#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) {
|
||||||
target.preventDefault();
|
|
||||||
const metric = findMetric(target.currentTarget.href);
|
const metric = findMetric(target.currentTarget.href);
|
||||||
// record exited event by recipient
|
// record exited event by recipient
|
||||||
sendEvent('sender', 'exited', {
|
sendEvent('sender', 'exited', {
|
||||||
cd3: metric
|
cd3: metric
|
||||||
}).then(() => {
|
|
||||||
location.href = target.currentTarget.href;
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#send-new-completed').click(function(target) {
|
$('#send-new-completed').click(function() {
|
||||||
target.preventDefault();
|
|
||||||
// record restarted event
|
// record restarted event
|
||||||
|
storage.referrer = 'errored-upload';
|
||||||
sendEvent('sender', 'restarted', {
|
sendEvent('sender', 'restarted', {
|
||||||
cd2: 'completed'
|
cd2: 'completed'
|
||||||
}).then(() => {
|
|
||||||
storage.referrer = 'completed-upload';
|
|
||||||
location.href = target.currentTarget.href;
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#send-new-error').click(function(target) {
|
$('#send-new-error').click(function() {
|
||||||
target.preventDefault();
|
|
||||||
// record restarted event
|
// record restarted event
|
||||||
|
storage.referrer = 'errored-upload';
|
||||||
sendEvent('sender', 'restarted', {
|
sendEvent('sender', 'restarted', {
|
||||||
cd2: 'errored'
|
cd2: 'errored'
|
||||||
}).then(() => {
|
|
||||||
storage.referrer = 'errored-upload';
|
|
||||||
location.href = target.currentTarget.href;
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue