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

Add option to enable Javascript URLs #3209

Closed
wants to merge 2 commits into from

Conversation

smblott-github
Copy link
Collaborator

This is an idea for resolving #3178 (and includes #3167).

  1. Wholly disabling Javascript would be unpopular.
  2. Apparently as of Chrome 71, chrome.tabs.update can no longer be used to open Javascript URLs (hence Javascript bookmarks not working anymore #3178).
  3. Use chrome.tabs.executeScript when encountering javascript bookmarks #3167 fixes this by using chrome.tabs.executeScript instead.
  4. Unfortunately, with Use chrome.tabs.executeScript when encountering javascript bookmarks #3167 the Javascript now executes in Vimium's context, hence with Vimium's elevated permissions. To enable Use chrome.tabs.executeScript when encountering javascript bookmarks #3167 behind users' backs would be irresponsible.

So this PR proposes:

The option looks like this:

image

The default (which everybody will inherit) is false.

Fixes #3178.
Fixes #3167.

@gdh1995
Copy link
Contributor

gdh1995 commented Dec 26, 2018

We may send the URL to content scripts and then vimium_frontend injects a <script> to run target code.
The injection is safe enough even on sandboxed pages, since Chrome 68 (actually, since chromium/chromium@5a5267a).

@smblott-github
Copy link
Collaborator Author

We may send the URL to content scripts and then vimium_frontend injects a

That sounds better.

smblott-github added a commit to smblott-github/vimium that referenced this pull request Dec 27, 2018
Since `chrome.tabs.update()` no longer supports `javascript:` URLs, here
we inject them into the page itself.

Replaces philc#3167.
Replaces philc#3209.
Fixes philc#3178.
@philc philc closed this in #3437 Dec 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Javascript bookmarks not working anymore
2 participants