Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please don't throw an Error when vAPI is not available #2565

Closed
herrernst opened this issue Apr 27, 2017 · 6 comments
Closed

Please don't throw an Error when vAPI is not available #2565

herrernst opened this issue Apr 27, 2017 · 6 comments

Comments

@herrernst
Copy link

Describe the issue

I use Chrome for developing and debugging websites and thus always have developer tools open and breakpoint on exceptions enabled. If I am debugging websites with SVGs embedded as <object> I always get an exception at

throw new Error('uBlock Origin: aborting content scripts for ' + window.location);
which is very annoying and forces me to disable uBlock origin.
Please could you just log with console.error() instead or something like that? Thank you.

One or more specific URLs where the issue occurs

https://rawgit.com/herrernst/cbe60ad2a20e539e266a05d9b64b26f1/raw/7fb184d1bcaf5fea8d39c49f5fe8605d8a28087b/svg-object.html

Screenshot in which the issue can be seen

screen shot 2017-04-27 at 09 10 46

Steps for anyone to reproduce the issue

  1. Open webpage with svg embedded as <object> with debugger enabled

Your settings

  • OS/version: macOS 10.12
  • Browser/version: Chrome 58
  • uBlock Origin version: 1.12.1
Your filter lists

default/unchanged

Your custom filters (if any)

none

@gorhill
Copy link
Owner

gorhill commented Apr 27, 2017

Duplicate of #2029.

@gorhill gorhill closed this as completed Apr 27, 2017
@herrernst
Copy link
Author

Would it at least be possible to not throw the error when uBlock Origin is disabled for a site? Thanks

@gorhill
Copy link
Owner

gorhill commented Apr 27, 2017

Content scripts are declared in the manifest and injected unconditionally by the browser. What would be nice is the chrome API allowing to declare document type filter options in the manifest.

@herrernst
Copy link
Author

OK, thanks nonetheless.

@gorhill
Copy link
Owner

gorhill commented Apr 27, 2017

I do plan to do something about this, it's just a question of free time and I do not consider this an issue which is at the top of the list.

@herrernst
Copy link
Author

I found an obvious solution to not cause the debugger halt on this error: simply blackbox the content script!

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

No branches or pull requests

2 participants