简体   繁体   English

chrome扩展程序中的href到chrome:// url的工作方式

[英]a href to chrome:// url in a chrome extension how to make it work

I've written a Chrome extension to use as an iframe in my own locally stored home page. 我已经编写了一个Chrome扩展程序,可以在自己本地存储的首页中用作iframe。 I just want a way to access the basic settings, extensions, bookmarks, and so forth. 我只想要一种访问基本设置,扩展名,书签等的方法。 I know this is denied in a standard html. 我知道这在标准html中被拒绝。 I thought an api should do the trick: 我认为api应该可以解决问题:

onclick="chrome.tabs.create({url:'chrome://settings'});" 

but to no avail. 但无济于事。 How can I access these settings? 如何访问这些设置?

You cannot access chrome pages from an extension. 您无法通过扩展程序访问Chrome页面。 However you could get some settings with Chrome APIs 但是,您可以使用Chrome API进行一些设置

Specifically Bookmarks API , Installed extensions API 特别是书签API已安装的扩展API

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM