Skip to content
This repository has been archived by the owner on Sep 9, 2022. It is now read-only.

Feature Request: allow uBlock to run on chrome:// urls #105

Closed
fysics opened this issue Jul 26, 2014 · 12 comments
Closed

Feature Request: allow uBlock to run on chrome:// urls #105

fysics opened this issue Jul 26, 2014 · 12 comments

Comments

@fysics
Copy link

fysics commented Jul 26, 2014

Updated issue title. Previous title was "uBlock no longer respects #extensions-on-chrome-urls flag"

A previous version worked on chrome urls with the appropriate flag set. uBlock no longer does this, as of appx a few weeks ago.

The extension provides value on chrome urls despite there being no ads and the potential security concerns of enabling the appropriate flag. I use it to hide recent sites on the new tab page with a simple cosmetic filter.

@gorhill
Copy link
Contributor

gorhill commented Jul 26, 2014

Ok, sorry, I have no idea what this is about. What is #extensions-on-chrome-urls? Ok, you mean pages with URLs like chrome://...?

@fysics
Copy link
Author

fysics commented Jul 26, 2014

It's a flag that can be passed to chrome.exe upon launching (or alternatively turned on using the chrome://flags page) that allows extensions to run on chrome:// urls (for example, the new tab page, the settings page, etc.)

It is normally disabled for security reasons.

@fysics fysics changed the title uBlock no longer respects #extensions-on-chrome-urls flag uBlock no longer respects --extensions-on-chrome-urls flag Jul 26, 2014
@fysics
Copy link
Author

fysics commented Jul 26, 2014

From the chrome://flags page: "Enables running extensions on chrome:// URLs, where extensions explicitly request this permission."

Here is a link (copy and paste it) that will take you directly to the flag if you are running chrome: chrome://flags/#extensions-on-chrome-urls

@gorhill
Copy link
Contributor

gorhill commented Jul 26, 2014

The extension has always constrained itself to work only on https?:// URLs since the beginning. It's enforced in the manifest file, the onBeforeRequest() handler, etc. You are saying it used to work on chrome:// pages?

@fysics
Copy link
Author

fysics commented Jul 26, 2014

I do remember it working, yes, as I created a rule to hide recent sites on the new tab page with a cosmetic filter. I've also been running various development or nightly builds of chrome(ium), so it's possible one of those builds was not respecting permission declarations (? proper word?) which caused it to allow your extension to run when it would not have normallybeen allowed to (because uBlock was not explicitly requesting permission to run on those urls).

Regardless, it was nifty while it lasted and I did not experience unexpected negative effects.

If your extension does request permission to run on chrome:// urls, it would only be respected if the user passes that flag to chrome, which subsequently causes a warning to be shown. The net effect for most users would be inconsequential.

@fysics fysics changed the title uBlock no longer respects --extensions-on-chrome-urls flag Feature Request: allow uBlock to run on chrome:// urls Jul 26, 2014
@ghost
Copy link

ghost commented Jul 26, 2014

uBlock working also on the chrome:// pages would be great, I would like to hide new tab page items with uBlock.

@gorhill
Copy link
Contributor

gorhill commented Jul 26, 2014

I would need to try that flag and see if the content scripts are injected - since this is these which handle cosmetic filtering, and you are telling me what worked were the cosmetic filters. That would be weird if that works because it's the declarations in the manifest which prevent these content scripts from being injected if not https, so it is really enforced by the browser, not the extension code.

My experience with allowing the extension on chrome:// page is that this can lead to many unwanted and difficult to diagnose side effects. I remember with HTTPSB the Hangout extension breaking because of this. Not sure I want to deal with that kind of issue at this point as I am trying to stabilize what is already there.

@ghost
Copy link

ghost commented Jul 26, 2014

Great, no need to focus on this issue in my case.

@fysics
Copy link
Author

fysics commented Jul 26, 2014

Agreed. Perhaps leave it open for some future time?

@gorhill
Copy link
Contributor

gorhill commented Jul 26, 2014

Sure.

@leaumar
Copy link

leaumar commented Jan 19, 2015

I assume this would also count for Firefox chrome:// pages? In my case, the problem is that netvideohunter (video sniffer/downloader) has ads in its management page that I'd like to get rid of, but ublock refuses to work on it. http://puu.sh/eKfSl/190b0a220d.png

@ghost
Copy link

ghost commented Jan 19, 2015

If I could do this, presumably I could block the Speed Dial 2 Pro Ad
when using that extension.

On 1/19/15, TheRealFaziri notifications@github.com wrote:

I assume this would also count for Firefox chrome:// pages? In my case, the
problem is that netvideohunter (video sniffer/downloader) has ads in its
management page that I'd like to get rid of, but ublock refuses to work on
it. http://puu.sh/eKf7f/1c592cdd85.png


Reply to this email directly or view it on GitHub:
gorhill/uBlock#105 (comment)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants