Remove linking to OP as part of post hover.

This commit is contained in:
Benjamin Southall 2016-12-14 06:06:05 +09:00
parent 49311e5e4a
commit 4503de147b

View File

@ -54,7 +54,10 @@ onready(function(){
hovered_at = {'x': e.pageX, 'y': e.pageY}; hovered_at = {'x': e.pageX, 'y': e.pageY};
var start_hover = function($link) { var start_hover = function($link) {
if ($post.is(':visible') && if($.contains($post[0], $link[0])) {
// link links to itself or to op; ignore
}
else if ($post.is(':visible') &&
$post.offset().top >= $(window).scrollTop() && $post.offset().top >= $(window).scrollTop() &&
$post.offset().top + $post.height() <= $(window).scrollTop() + $(window).height()) { $post.offset().top + $post.height() <= $(window).scrollTop() + $(window).height()) {
// post is in view // post is in view