Difference between revisions of "MediaWiki:Common.js"
From Mech
Jump to navigationJump to searchLeeRoberson (talk | contribs) |
LeeRoberson (talk | contribs) |
||
Line 2: | Line 2: | ||
$('a[href*=pdf]').click(function(e) { |
$('a[href*=pdf]').click(function(e) { |
||
setTimeout(function() { |
setTimeout(function() { |
||
location.href = |
location.href = e.target.href; |
||
}, 500); |
}, 500); |
||
ga('send', 'event', { |
ga('send', 'event', { |
Latest revision as of 11:34, 18 October 2016
/* Any JavaScript here will be loaded for all users on every page load. */ $('a[href*=pdf]').click(function(e) { setTimeout(function() { location.href = e.target.href; }, 500); ga('send', 'event', { eventCategory: 'PDF Download', eventAction: 'click', eventLabel: event.target.href }); event.preventDefault(); });