FIX: Respect "open external links in new window" in quotes and edit history
This commit is contained in:
parent
7a27c93c03
commit
ca9fd95a08
|
@ -4,13 +4,13 @@ export default Ember.Component.extend({
|
||||||
didInsertElement() {
|
didInsertElement() {
|
||||||
this._super(...arguments);
|
this._super(...arguments);
|
||||||
|
|
||||||
this.$().on("click.discourse-redirect", "#revisions a", function(e) {
|
$(this.element).on("click.discourse-redirect", "a", function(e) {
|
||||||
return ClickTrack.trackClick(e);
|
return ClickTrack.trackClick(e);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
willDestroyElement() {
|
willDestroyElement() {
|
||||||
this._super(...arguments);
|
this._super(...arguments);
|
||||||
this.$().off("click.discourse-redirect", "#revisions a");
|
$(this.element).off("click.discourse-redirect", "a");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -18,8 +18,8 @@ export function isValidLink($link) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do not track links in quotes or in elided part
|
// Do not track links in elided part
|
||||||
if ($link.parents("aside.quote, .elided").length !== 0) {
|
if ($link.parents(".elided").length !== 0) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue