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

Bookmarklet fails on Twitter links #76

Closed
helmut72 opened this issue Jan 15, 2023 · 1 comment
Closed

Bookmarklet fails on Twitter links #76

helmut72 opened this issue Jan 15, 2023 · 1 comment

Comments

@helmut72
Copy link

Example: https://twitter.com/Mpravardhan12/status/1614592712099123205

Pasting the link to the textbar of youtube-dl-server works. But when using the bookmarklet it fails.

I'm using the bookmarklet link provided from webinterface:

javascript:fetch("https://FQDN.OF.MY.SERVER/api/downloads",{body:new%20URLSearchParams({url:window.location.href}),method:"POST"});

Many other sites (eg. Youtube) works. I'm using Safari, but doesn't matter. It's the same behavior with Firefox.

@helmut72
Copy link
Author

Looks like a problem with CSP. To avoid this, I've created a shortcut for Safari and do the same like your curl example:

curl -X POST --data-urlencode "url={{url}}" http://{{host}}:8080/api/downloads

This is my shortcut, works in iOS, iPadOS and macOS:

Bildschirm­foto 2023-01-15 um 14 48 47

nbr23 pushed a commit that referenced this issue Oct 21, 2023
Co-authored-by: Renovate Bot <renovate@23.tf>
Co-committed-by: Renovate Bot <renovate@23.tf>
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

1 participant