diff options
author | New Tobin Paradigm <email@mattatobin.com> | 2018-04-24 11:00:56 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-24 11:00:56 -0400 |
commit | bb87aeab9a404af4313eb7a707d8911eb418b8b0 (patch) | |
tree | d37e896912ae07c4e09c1f11779e21f320b537df /application/palemoon/base/content/sanitize.js | |
parent | ce197c4e52aeb88befb331348a41502a7e7250d9 (diff) | |
parent | 11063e9720f3c3cdabb4be6f6898b162d4f4ad48 (diff) | |
download | UXP-bb87aeab9a404af4313eb7a707d8911eb418b8b0.tar UXP-bb87aeab9a404af4313eb7a707d8911eb418b8b0.tar.gz UXP-bb87aeab9a404af4313eb7a707d8911eb418b8b0.tar.lz UXP-bb87aeab9a404af4313eb7a707d8911eb418b8b0.tar.xz UXP-bb87aeab9a404af4313eb7a707d8911eb418b8b0.zip |
Merge pull request #254 from janekptacijarabaci/pm_sanitize_1
[PALEMOON] [frontend vs backend] Fix sanitize ("History" - "Clear Recent History...")
Diffstat (limited to 'application/palemoon/base/content/sanitize.js')
-rw-r--r-- | application/palemoon/base/content/sanitize.js | 17 |
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"] |