mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 19:43:44 +08:00
FIX: skip click-tracking for mentions
This commit is contained in:
parent
876c4f20b3
commit
b75720d911
|
@ -6,15 +6,10 @@ import { selectedText } from "discourse/lib/utilities";
|
|||
export function isValidLink($link) {
|
||||
// Do not track:
|
||||
// - lightboxes
|
||||
// - group mentions
|
||||
// - links with disabled tracking
|
||||
// - category links
|
||||
// - quote back button
|
||||
if (
|
||||
$link.is(
|
||||
".lightbox, .mention, .mention-group, .no-track-link, .hashtag, .back"
|
||||
)
|
||||
) {
|
||||
if ($link.is(".lightbox, .no-track-link, .hashtag, .back")) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -52,6 +47,11 @@ export default {
|
|||
const $link = $(e.currentTarget);
|
||||
const tracking = isValidLink($link);
|
||||
|
||||
// Return early for mentions and group mentions
|
||||
if ($link.is(".mention, .mention-group")) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if ($link.hasClass("attachment")) {
|
||||
// Warn the user if they cannot download the file.
|
||||
if (
|
||||
|
|
Loading…
Reference in New Issue
Block a user