Code
function trackStream() {
$('.performView').on('click', function(e) {
e.preventDefault();
var $this = $(this),
url = $this.attr('href');
switch (e.which) {
case 2:
COH2ORG.Lib.request('/livestream/performView/chan_id/' + parseInt($(this).data('id'), 10));
window.open(url);
break;
default:
if ($this.attr('target') === '_blank') {
COH2ORG.Lib.request('/livestream/performView/chan_id/' + parseInt($(this).data('id'), 10));
window.open(url);
} else {
COH2ORG.Lib.request('/livestream/performView/chan_id/' + parseInt($(this).data('id'), 10), function() {
window.location.href = url;
}, function() {
window.location.href = url;
});
}
}
});
}
it's a normal <a tag so I don't see the need for all of this since it's not doing anything special