没有使用chrome.history.deleteRange完全删除历史记录 [英] History not fully deleted using chrome.history.deleteRange

查看:131
本文介绍了没有使用chrome.history.deleteRange完全删除历史记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我写了一个小扩展,它使用 chrome.history API中的 deleteRange 来删除部分浏览器开始和结束时间戳之间的历史记录。

I have written a small extension that uses deleteRange from chrome.history API in order to delete parts of the browser history between a start and an end time stamp.

chrome.history.deleteRange({
   startTime : startTime,
   endTime : endTime
}, function() {
   console.log("Recent history deleted successfully");
});

我得到 startTime endTime 使用(new Date())。getTime()

它有点作品。如果我在启用扩展程序后第一次在Chrome中打开页面,我将能够在多功能框中使用其网址,而无需完全键入它(Chrome浏览器通过其历史记录记住URL的标志)。在调用 deleteRange 之后,我不再能够这样做了。我还在控制台上看到文本最近的历史记录已成功删除。这对我来说是一个迹象,表明这个网页已经从历史中抹去了。

It "kind of works". If I open a page in Chrome for the very first time after starting the extension, I will be able to use its URL in the omnibox without fully typing it (a sign for me that Chrome remembers the URL through its history). After calling deleteRange, I am no longer able to do so. I also see the text Recent history deleted successfully on the console. This is a sign for me that the page has been wiped from history.

但它没有。如果我转到Chrome /设置/历史记录,我仍然可以看到我何时访问该页面。我预计这会被抹去......我怎样才能使用开始和结束时间戳从最近的历史记录中清除一个页面(以前从未打开过)?

But it hasn't. If I go to Chrome/Settings/History, I can still see when I accessed the page. I expected that this would have been wiped ... how can I wipe a page (that I never ever opened before) from the recent history using start and end time stamp?

编辑:我添加了行

console.log("Right before calling deleteRange. startTime=" + startTime + " / endTime=" + endTime);

给我的代码,导致

to my code which resulted in

Right before calling deleteRange. startTime=1416931451880 / endTime=1416931463988

编辑2:我打开 Chromium bug 。让我们看看我能从那里得到什么

I opened a Chromium bug. Let's see what I can get from there

推荐答案

Chromium开发者已经证实了这个错误。这取决于启用了历史记录同步。

Chromium developers have confirmed the bug. It depends on History Sync being enabled.

请参阅铬错误报告

这篇关于没有使用chrome.history.deleteRange完全删除历史记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆