Cap*_*iel 10 google-chrome-extension
我正在使用chrome bootstrap样式(请参阅http://roykolak.github.com/chrome-bootstrap/)来构建我的选项页面.现在,我想在左侧边栏菜单中找到返回chrome:// chrome/extensions的链接,但点击它会在控制台中返回错误:Not allowed to load local resource: chrome://chrome/extensions
Dan*_*Lee 13
你可以打开它chrome.tabs.update
,你不需要使用tabs权限.
options.html
<script src="options.js"></script>
<a href="#" id="test">test</a>
Run Code Online (Sandbox Code Playgroud)
options.js
document.addEventListener('DOMContentLoaded', function() {
document.getElementById('test').addEventListener('click', function() {
chrome.tabs.update({ url: 'chrome://chrome/extensions' });
});
});
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
4763 次 |
最近记录: |