don't track via AJAX when clicking on local attachments

This commit is contained in:
Régis Hanol 2013-07-10 22:56:11 +02:00
parent da614597fe
commit ffb9a1250a
1 changed files with 1 additions and 3 deletions

View File

@ -85,7 +85,7 @@ Discourse.ClickTrack = {
} }
// If we're on the same site, use the router and track via AJAX // If we're on the same site, use the router and track via AJAX
if ((href.indexOf(Discourse.URL.origin()) === 0) && (!href.match(/\.(png|gif|jpg|jpeg)$/i))) { if ((href.indexOf(Discourse.URL.origin()) === 0) && !href.match(/\/uploads\//i)) {
Discourse.ajax("/clicks/track", { Discourse.ajax("/clicks/track", {
data: { data: {
url: href, url: href,
@ -109,5 +109,3 @@ Discourse.ClickTrack = {
return false; return false;
} }
}; };