From c397fffc94f563f1475f37c90eefa154ac78a6e0 Mon Sep 17 00:00:00 2001 From: Niklas Baumstark Date: Wed, 25 Jan 2012 00:47:39 +0100 Subject: prevent duplicate history items --- background_page.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'background_page.html') diff --git a/background_page.html b/background_page.html index f220d76c..e248043c 100644 --- a/background_page.html +++ b/background_page.html @@ -332,7 +332,9 @@ chrome.history.onVisited.addListener(function(item) { if (cachedHistory === null) return; - cachedHistory.push(item); + // only cache newly visited sites + if (item.visitCount === 1) + cachedHistory.push(item); }); function getHistory(args, port) { -- cgit v1.2.3