1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-26 02:32:27 +01:00

Fix timespan based sanitation of history items.

Fixes issue 508.
This commit is contained in:
Doug Kearns
2011-04-09 12:58:26 +10:00
parent 8bc697a6e1
commit e11d10cfbb

View File

@@ -107,11 +107,13 @@ var Sanitizer = Module("sanitizer", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakRef
action: function (range, host) {
if (host)
services.history.removePagesFromHost(host, true);
else
services.history.removeVisitsByTimeframe(range.min, range.max);
if (!host)
else {
if (range.isEternity)
services.history.removeAllPages();
else
services.history.removeVisitsByTimeframe(range.native[0], Math.min(Date.now() * 1000, range.native[1])); // XXX
services.observer.notifyObservers(null, "browser:purge-session-history", "");
}
if (!host || util.isDomainURL(prefs.get("general.open_location.last_url"), host))
prefs.reset("general.open_location.last_url");