From 7c2755bcd67968f9646ac3b79432bf45da349246 Mon Sep 17 00:00:00 2001 From: Niklas Baumstark Date: Wed, 25 Jan 2012 17:58:06 +0100 Subject: sort history by last visit time and raise number of history items to be searched --- background_page.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'background_page.html') diff --git a/background_page.html b/background_page.html index e248043c..b6b72406 100644 --- a/background_page.html +++ b/background_page.html @@ -322,8 +322,7 @@ }, function(history) { // sorting in ascending order, so we can push new items to the end later history.sort(function(a, b) { - // visitCount may be undefined - return (a.visitCount || 0) - (b.visitCount || 0); + return (a.lastVisitTime|| 0) - (b.lastVisitTime || 0); }); cachedHistory = history; callback(cachedHistory); -- cgit v1.2.3