UPDATE
chrome://about/
has direct links to chrome://settings
and others, so it can be done.
How can I link/redirect to a chrome://
URL in a webpage? For example, chrome://settings
. When attempting to click a link to a chrome://
URL,
<a href="chrome://settings">link</a>
I get an error in the console:
Not allowed to load local resource: chrome://settings/
According to this answer, it is possible:
Link to chrome://chrome/extensions from extension options page
I've tried this script:
<a href="#" id="test">test</a>
<script>
document.addEventListener('DOMContentLoaded', function () {
document.getElementById('test').addEventListener('click', function () {
chrome.tabs.update({
url: 'chrome://chrome/extensions'
});
});
});
</script>
And also this one:
<a href="#" onclick="chrome.tabs.create({url:'chrome://settings/clearBrowserData'});">click me</a>
Neither works. In addition to those, I've tried:
- Linking to it using
<a href="chrome://newtab">
- Redirect the user using
window.location
.
However, I believe there may be a JavaScript workaround. When the user presses a link, is it possible to change the URL to chrome://settings
? The user would have to press Enter after, but this seems like the best I'd get.