Javascript和书签 [英] Javascript and bookmarks

查看:96
本文介绍了Javascript和书签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

让我们说我在一个URL列表非常长的页面上,并且我想确保将所有URL都标记为书签.我知道我的书签列表中已经有很多这样的标签,并且希望尽可能避免重复.

Lets say that I am on a page that has a significantly long list of URLs and I want to make sure that I have all of them bookmarked. I know that I already have many of them in my bookmarks list and would like to avoid duplications as much as possible.

考虑到这一点,我希望能够抓住所有链接,然后在新选项卡中打开书签列表中当前未包含的那些链接.我可以获取链接并比较链接,我只是不知道如何通过javascript访问书签.

With that in mind, I would like to be able to grab all of the links and then open into new tabs those that are not currently contained in my bookmarks list. I can do all of the getting the links, and comparing the links, I just don't know how to access the bookmarks via javascript.

我可以在具有可行解决方案的任何PC/mac浏览器中执行此操作.有人有什么想法吗?

I can do this in whatever PC/mac browser that has a workable solution. Does anyone have any ideas?

推荐答案

您将永远无法通过JavaScript访问用户的书签.实际上,那将是一个严重的安全漏洞.

You will never be able to access the user's bookmarks via JavaScript. In fact, that would be a severe security hole.

JavaScript在所谓的沙箱中执行.这意味着,至少从理论上讲,JavaScript永远无法访问客户端计算机的资源(实际上,沙箱中的错误允许出现令人讨厌的东西,但这是另一回事了.)

JavaScript gets executed in a socalled sandbox. That means that, at least in theorey, a JavaScript never will have access to the resources of the client machine (in practice, the sandboxes have bugs that allow nasty things, but that is a different story).

这篇关于Javascript和书签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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