From 1cab6af5263a943230c86962779913d53e2df0c9 Mon Sep 17 00:00:00 2001 From: Benjamin Southall Date: Wed, 14 Dec 2016 06:06:05 +0900 Subject: [PATCH] Remove linking to OP as part of post hover. --- js/post-hover.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/js/post-hover.js b/js/post-hover.js index e78b57e8..74864d9d 100644 --- a/js/post-hover.js +++ b/js/post-hover.js @@ -54,7 +54,10 @@ onready(function(){ hovered_at = {'x': e.pageX, 'y': e.pageY}; 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 + $post.height() <= $(window).scrollTop() + $(window).height()) { // post is in view