9
我使用chrome引导样式(请参阅http://roykolak.github.com/chrome-bootstrap/)构建我的选项页面。现在,我想有一个链接回铬:在左侧边栏菜单//铬/扩展,但点击它在控制台中返回一个错误:Not allowed to load local resource: chrome://chrome/extensions
链接到chrome:// chrome /扩展选项页面
我使用chrome引导样式(请参阅http://roykolak.github.com/chrome-bootstrap/)构建我的选项页面。现在,我想有一个链接回铬:在左侧边栏菜单//铬/扩展,但点击它在控制台中返回一个错误:Not allowed to load local resource: chrome://chrome/extensions
链接到chrome:// chrome /扩展选项页面
你可以chrome.tabs.update
打开此,you don't need the tabs permission for this。
options.html
<script src="options.js"></script>
<a href="#" id="test">test</a>
options.js
document.addEventListener('DOMContentLoaded', function() {
document.getElementById('test').addEventListener('click', function() {
chrome.tabs.update({ url: 'chrome://chrome/extensions' });
});
});