mirror of
https://github.com/discourse/discourse.git
synced 2024-11-30 10:15:13 +08:00
FIX: Do not track user mentions.
This commit is contained in:
parent
fca3f53e9c
commit
b81d169e2a
|
@ -84,14 +84,6 @@ export default Ember.Component.extend(
|
||||||
"click.discourse-redirect",
|
"click.discourse-redirect",
|
||||||
".cooked a, a.track-link",
|
".cooked a, a.track-link",
|
||||||
function(e) {
|
function(e) {
|
||||||
const $target = $(e.target);
|
|
||||||
if (
|
|
||||||
$target.hasClass("mention") ||
|
|
||||||
$target.parents(".expanded-embed").length
|
|
||||||
) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ClickTrack.trackClick(e);
|
return ClickTrack.trackClick(e);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
|
@ -5,14 +5,6 @@ export default Ember.Component.extend({
|
||||||
this._super(...arguments);
|
this._super(...arguments);
|
||||||
|
|
||||||
this.$().on("click.discourse-redirect", "#revisions a", function(e) {
|
this.$().on("click.discourse-redirect", "#revisions a", function(e) {
|
||||||
const $target = $(e.target);
|
|
||||||
if (
|
|
||||||
$target.hasClass("mention") ||
|
|
||||||
$target.parents(".expanded-embed").length
|
|
||||||
) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ClickTrack.trackClick(e);
|
return ClickTrack.trackClick(e);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
@ -32,14 +32,6 @@ export default Ember.Component.extend(LoadMore, {
|
||||||
|
|
||||||
this.$().on("click.details-disabled", "details.disabled", () => false);
|
this.$().on("click.details-disabled", "details.disabled", () => false);
|
||||||
this.$().on("click.discourse-redirect", ".excerpt a", function(e) {
|
this.$().on("click.discourse-redirect", ".excerpt a", function(e) {
|
||||||
const $target = $(e.target);
|
|
||||||
if (
|
|
||||||
$target.hasClass("mention") ||
|
|
||||||
$target.parents(".expanded-embed").length
|
|
||||||
) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ClickTrack.trackClick(e);
|
return ClickTrack.trackClick(e);
|
||||||
});
|
});
|
||||||
}.on("didInsertElement"),
|
}.on("didInsertElement"),
|
||||||
|
|
|
@ -10,7 +10,7 @@ export function isValidLink($link) {
|
||||||
// - links with disabled tracking
|
// - links with disabled tracking
|
||||||
// - category links
|
// - category links
|
||||||
// - quote back button
|
// - quote back button
|
||||||
if ($link.is(".lightbox, .mention-group, .no-track-link, .hashtag, .back")) {
|
if ($link.is(".lightbox, .mention, .mention-group, .no-track-link, .hashtag, .back")) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,6 +19,10 @@ export function isValidLink($link) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($link.parents(".expanded-embed").length !== 0) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
$link.hasClass("track-link") ||
|
$link.hasClass("track-link") ||
|
||||||
$link.closest(".hashtag, .badge-category, .onebox-result, .onebox-body")
|
$link.closest(".hashtag, .badge-category, .onebox-result, .onebox-body")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user