Skip to content

Commit

Permalink
post-hover.js: show a popup preview if a reply is only partially on s…
Browse files Browse the repository at this point in the history
…creen; fixes ctrlcctrlv#84
  • Loading branch information
czaks committed Sep 26, 2014
1 parent f71cdca commit ba515c5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/post-hover.js
Expand Up @@ -58,8 +58,8 @@ onready(function(){
// link links to itself or to op; ignore
}
else if($post.is(':visible') &&
$post.offset().top + $post.height() >= $(window).scrollTop() &&
$post.offset().top <= $(window).scrollTop() + $(window).height()) {
$post.offset().top >= $(window).scrollTop() &&
$post.offset().top + $post.height() <= $(window).scrollTop() + $(window).height()) {
// post is in view
$post.addClass('highlighted');
} else {
Expand Down

0 comments on commit ba515c5

Please sign in to comment.