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

Bookmarklets not working after upgrading vimium to 2.0.1 from 1.67.7 #4329

Closed
evanhackett opened this issue Oct 10, 2023 · 2 comments
Closed

Comments

@evanhackett
Copy link

After upgrading the extension from 1.67.7 to 2.0.1, executing bookmarklets results in an error:

Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'self' 'wasm-unsafe-eval' 'inline-speculation-rules'". Either the 'unsafe-inline' keyword, a hash ('sha256-8A9dGbzGLmv6YVPmnRg+Gb9PD+2+28AjtFwl8TgxqDE='), or a nonce ('nonce-...') is required to enable inline execution.

injectUserScript @ dom_utils.js:654

To Reproduce

Simply execute any bookmarklet using the bookmark search feature.

Browser and Vimium version

For my Browser I am using Brave version 1.58.135. The issue is present on Vimium 2.0.1, but version 1.67.7 did not have this issue.

@philc
Copy link
Owner

philc commented Oct 11, 2023

Confirmed. This also reproduces on Chrome, but not Firefox. I'll work on a fix.

@philc philc changed the title Bookmarklets not working in Brave after upgrading vimium to 2.0.1 from 1.67.7 Bookmarklets not working after upgrading vimium to 2.0.1 from 1.67.7 Oct 11, 2023
@philc philc closed this as completed in 10524a0 Oct 11, 2023
@philc
Copy link
Owner

philc commented Oct 11, 2023

To clarify further, prior to 10524a0, no bookmarklets worked on Chrome in Vimium v2. Bookmarklets would work on Firefox if the site didn't have a restrictive CSP.

I've transitioned the bookmarklets feature to use the chrome.scripting.executeScript API, which brings Chrome to parity with Firefox.

However, opening bookmarklets is still pretty broken, because the feature only works on some sites.

Unfortunately, there's nothing further we can do about it. This is a known limitation of the manivest v3 API and it's being actively worked on by Google and others. That issue is tracked in #4331.

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

No branches or pull requests

2 participants