如何让 Firefox 在浏览器重新启动时记住框架中访问的 URL?

发布于 2024-08-17 23:00:02 字数 410 浏览 5 评论 0原文

我编写了一个greasemonkey脚本,它修改craigslist搜索结果以显示在两个框架中,左侧的框架列出了结果,右侧的框架在从左侧框架单击时显示每个帖子(我修改了每个结果都说 target="rightframe")。

我遇到的问题是,当我重新启动浏览器时,结果框架上 URL 的“已访问”状态似乎丢失了。也就是说,当我单击左侧框架中的链接时,该链接会以“已访问”样式显示,并且当我重新加载页面时这种情况仍然存在。但是,如果我重新启动浏览器并再次访问该页面,则该链接将不再以“已访问”样式显示。这使得跟踪我已经看过的帖子变得很困难:(。

我认为框架导致问题的原因是,如果我在没有 Greasemonkey 脚本的情况下单击 craigslist 上的搜索结果链接,那么“访问过”浏览器重新启动后状态仍然存在,

的任何建议!

非常感谢乔希

I've written a greasemonkey script that modifies craigslist search results to appear in two frames, a frame on the left with the results listed and a frame on the right to display each posting if clicked on from the left frame (I modify the URL of each result to say target="rightframe").

The problem I have is that the 'visited' status of URLs on the result frame seems to be lost when I restart the browser. That is, when I click on a link in the left frame, the link appears in the 'visited' style, and this persists when I reload the page. However, if I restart the browser and visit the page again, then that link no longer appears in the 'visited' style. This makes it hard to keep track of which postings I've already seen :(.

The reason I believe the frames are causing the problem is that if I click on a search result link on craigslist without the greasemonkey script, then the 'visited' status persists across browser restarts.

Many thanks for any suggestions!

Josh

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

忆梦 2024-08-24 23:00:02

这是不可能的。有一个错误跟踪此问题。如果您不在 Greasemonkey 中并且是实际的附加组件,则可以调用适当的历史记录 API 并根据需要手动添加它。

It is not possible. There is a bug tracking this issue. If you were not in Greasemonkey and were an actual add-on, you could call the proper history API and add it manually if you wanted.

我不是你的备胎 2024-08-24 23:00:02

我知道这并不能直接解决您的问题,但既然您说链接访问状态在未添加到框架时会被记住,您是否尝试过使用

来操作页面他们的 overflow 属性设置为“scroll”?

这将确保链接不必更改其上下文,这可能会解决您的问题。

I know this doesn't address your question directly, but since you said the link visited status is remembered when not added to frames, have you tried just manipulating the page using <div />s with their overflow property set to "scroll"?

This would ensure that the links don't have to change their context which may fix your problem.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文