Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Link to chrome://chrome/extensions from extension options page

I'm using the chrome bootstrap styles (see http://roykolak.github.com/chrome-bootstrap/) to build my options page. Now I'd like to have a link back to chrome://chrome/extensions in the left-sidebar menu, but clicking on it returns an error in the console: Not allowed to load local resource: chrome://chrome/extensions

like image 218
Capi Etheriel Avatar asked Oct 29 '12 16:10

Capi Etheriel


1 Answers

You can open this with 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' });
    });
});
like image 83
dan-lee Avatar answered Oct 28 '22 17:10

dan-lee