mirror of https://github.com/zulip/zulip.git
analytics: Remove unused click handler in populate messages by client.
Removes a click handler in `populate_messages_sent_by_client` for anchor links that start with a hash. I think this goes back to when there was a sidebar navigation on the stats page, which no longer exists. The only anchor link in the current html is to the help center documentation and not part of the Plotly charts.
This commit is contained in:
parent
b267b17677
commit
aeb01cfeb3
|
@ -561,21 +561,6 @@ function populate_messages_sent_by_client(data) {
|
||||||
}
|
}
|
||||||
draw_plot();
|
draw_plot();
|
||||||
});
|
});
|
||||||
|
|
||||||
// handle links with @href started with '#' only
|
|
||||||
$(document).on("click", 'a[href^="#"]', function (e) {
|
|
||||||
// target element id
|
|
||||||
const id = $(this).attr("href");
|
|
||||||
// target element
|
|
||||||
const $id = $(id);
|
|
||||||
if ($id.length === 0) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// prevent standard hash navigation (avoid blinking in IE)
|
|
||||||
e.preventDefault();
|
|
||||||
const pos = $id.offset().top + $(".page-content")[0].scrollTop - 50;
|
|
||||||
$(".page-content").animate({scrollTop: pos + "px"}, 500);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function populate_messages_sent_by_message_type(data) {
|
function populate_messages_sent_by_message_type(data) {
|
||||||
|
|
Loading…
Reference in New Issue