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

Execute "javascript:" URLs by injecting them into the page itself. #3211

Closed

Conversation

smblott-github
Copy link
Collaborator

OK, @gdh1995... like this?

Since chrome.tabs.update() no longer supports javascript: URLs, here we inject them into the page itself.

Replaces #3167.
Replaces #3209.
Fixes #3178.

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.
@patkujawa-wf
Copy link

I also really miss being able to run bookmarklets from the vomnibar. Any chance this PR can get reviewed @gdh1995 @smblott-github ?

@gdh1995 gdh1995 mentioned this pull request Nov 11, 2019
injectUserScript: (text) ->
text = text[11..] if text[...11] == "javascript:"
script = document.createElement "script"
script.textContent = text
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

um, 'try/catch decodeURIComponment(url)' is needed.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added #3437 to add such a try decodeURI.

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
3 participants