From 68e873315a0104968a722b7814ad1ce1c62243dd Mon Sep 17 00:00:00 2001 From: Michael Save Date: Sat, 17 Mar 2012 07:45:38 +1100 Subject: [PATCH] Ensure no double-fetching of posts. --- js/post-hover.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/js/post-hover.js b/js/post-hover.js index 0d0f3bb1..39c4aca6 100644 --- a/js/post-hover.js +++ b/js/post-hover.js @@ -12,6 +12,7 @@ */ $(document).ready(function(){ + var dont_fetch_again = []; $('p.body a:not([rel="nofollow"])').each(function() { var id; @@ -43,6 +44,12 @@ $(document).ready(function(){ start_hover(this); } else { var link = this; + + if($.inArray($(this).attr('href'), dont_fetch_again) != -1) { + return; + } + + dont_fetch_again.push($(this).attr('href')); $.ajax({ url: $(this).attr('href'), context: document.body,