linking to chrome://settings/

14,085 views
Skip to first unread message

Roy Kolak

unread,
Aug 19, 2011, 12:58:08 PM8/19/11
to Chromium-extensions
I'm trying to link to chrome://settings/clearBrowserData, but I'm
getting "Not allowed to load local resource: chrome://settings/clearBrowserData".
I added "chrome://settings" to permissions in my manifest. Am I
missing something?

Arne Roomann-Kurrik

unread,
Aug 19, 2011, 1:31:00 PM8/19/11
to Roy Kolak, Chromium-extensions
I'm pretty sure that non chrome:// URLs are prevented from opening or linking to chrome:// URLs.  A manifest permission won't override this.

~Arne



--
You received this message because you are subscribed to the Google Groups "Chromium-extensions" group.
To post to this group, send email to chromium-...@chromium.org.
To unsubscribe from this group, send email to chromium-extens...@chromium.org.
For more options, visit this group at http://groups.google.com/a/chromium.org/group/chromium-extensions/?hl=en.


Michael Gundlach

unread,
Aug 19, 2011, 5:02:49 PM8/19/11
to kur...@chromium.org, Roy Kolak, Chromium-extensions
On Fri, Aug 19, 2011 at 1:31 PM, Arne Roomann-Kurrik <kur...@chromium.org> wrote:
I'm pretty sure that non chrome:// URLs are prevented from opening or linking to chrome:// URLs.  A manifest permission won't override this.

Not quite: with 'tabs' permission,

<a href="#" onclick="chrome.tabs.create({url:'chrome://settings/clearBrowserData'});">click me</a>

should work.

If your code is in a content script, it won't have access to chrome.tabs, so it must sendRequest to the background page which can navigate the requesting tab or open a new tab.

Michael

Roy Kolak

unread,
Aug 20, 2011, 1:06:32 PM8/20/11
to Michael Gundlach, kur...@chromium.org, Chromium-extensions
worked like a charm, thanks

Ben

unread,
Aug 28, 2011, 11:59:28 PM8/28/11
to Michael Gundlach, kur...@chromium.org, Roy Kolak, Chromium-extensions
IIRC, you don't need the 'tabs' permission to use chrome.tabs.create,
but if you need to 'get', 'listen', etc., you will need it.

On Fri, 2011-08-19 at 17:02 -0400, Michael Gundlach wrote:
> On Fri, Aug 19, 2011 at 1:31 PM, Arne Roomann-Kurrik
> <kur...@chromium.org> wrote:
> I'm pretty sure that non chrome:// URLs are prevented from
> opening or linking to chrome:// URLs. A manifest permission
> won't override this.
>
>
> Not quite: with 'tabs' permission,
>
>
> <a href="#"
> onclick="chrome.tabs.create({url:'chrome://settings/clearBrowserData'});">click me</a>
>
>

> Michael
> --

Roy Kolak

unread,
Aug 29, 2011, 12:54:46 PM8/29/11
to Ben, Michael Gundlach, kur...@chromium.org, Chromium-extensions
Yeah, looks like you are right. From the api doc...
"The two methods that don't require the "tabs" permission are create and update."
Reply all
Reply to author
Forward
0 new messages