summaryrefslogtreecommitdiffstats
path: root/application/palemoon/base/content/sanitize.js
diff options
context:
space:
mode:
authorjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-04-24 15:36:35 +0200
committerjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-04-24 15:36:35 +0200
commit11063e9720f3c3cdabb4be6f6898b162d4f4ad48 (patch)
treef4cd9cbf9b924716b5766c854581fec632221eb4 /application/palemoon/base/content/sanitize.js
parentbccb9c1708f007ada1ea8c4879db88a587f0a450 (diff)
downloadUXP-11063e9720f3c3cdabb4be6f6898b162d4f4ad48.tar
UXP-11063e9720f3c3cdabb4be6f6898b162d4f4ad48.tar.gz
UXP-11063e9720f3c3cdabb4be6f6898b162d4f4ad48.tar.lz
UXP-11063e9720f3c3cdabb4be6f6898b162d4f4ad48.tar.xz
UXP-11063e9720f3c3cdabb4be6f6898b162d4f4ad48.zip
[PALEMOON] [frontend vs backend] Fix sanitize ("History" - "Clear Recent History..."):
Issue #121
Diffstat (limited to 'application/palemoon/base/content/sanitize.js')
-rw-r--r--application/palemoon/base/content/sanitize.js17
1 files changed, 12 insertions, 5 deletions
diff --git a/application/palemoon/base/content/sanitize.js b/application/palemoon/base/content/sanitize.js
index fccec6c98..f2eb24a55 100644
--- a/application/palemoon/base/content/sanitize.js
+++ b/application/palemoon/base/content/sanitize.js
@@ -148,7 +148,8 @@ Sanitizer.prototype = {
if (cookie.creationTime > this.range[0])
// This cookie was created after our cutoff, clear it
- cookieMgr.remove(cookie.host, cookie.name, cookie.path, false);
+ cookieMgr.remove(cookie.host, cookie.name, cookie.path,
+ false, cookie.originAttributes);
}
}
else {
@@ -213,10 +214,16 @@ Sanitizer.prototype = {
history: {
clear: function ()
{
- if (this.range)
- PlacesUtils.history.removeVisitsByTimeframe(this.range[0], this.range[1]);
- else
- PlacesUtils.history.removeAllPages();
+ if (this.range) {
+ PlacesUtils.history.removeVisitsByFilter({
+ beginDate: new Date(this.range[0] / 1000),
+ endDate: new Date(this.range[1] / 1000)
+ }).catch(Components.utils.reportError);;
+ } else {
+ // Remove everything.
+ PlacesUtils.history.clear()
+ .catch(Components.utils.reportError);
+ }
try {
var os = Components.classes["@mozilla.org/observer-service;1"]