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

Unified clipboard extension #667

Merged
merged 11 commits into from
Jul 9, 2023
Merged

Unified clipboard extension #667

merged 11 commits into from
Jul 9, 2023

Conversation

NexusKitten
Copy link
Contributor

Two people made a clipboard extension, both with blocks the other didn't have, and so I decided it would be best just to merge the two and let the creators split the credit.

If any of the original creators have issues with this, please leave a comment on this PR and we can try to work something out.\

Clipboard
image

@ghost
Copy link

ghost commented Jul 1, 2023

Nice extension! But the clipboard reporter isn't working, sadly....

@LilyMakesThings
Copy link
Contributor

Nice extension! But the clipboard reporter isn't working, sadly....

they forgot to ask for permission to use the clipboard as well :/

@NexusKitten

This comment was marked as spam.

@NexusKitten

This comment was marked as spam.

@ghost
Copy link

ghost commented Jul 1, 2023

Nice extension! But the clipboard reporter isn't working, sadly....

Weird, it works fine for me, did you enable clipboard on the website?

Every other block works OK for me, except for the clipboard reporter.
I use Firefox, and I don't know if this is a common issue.

@NexusKitten

This comment was marked as spam.

@LilyMakesThings
Copy link
Contributor

Nice extension! But the clipboard reporter isn't working, sadly....

Weird, it works fine for me, did you enable clipboard on the website?

Every other block works OK for me, except for the clipboard reporter. I use Firefox, and I don't know if this is a common issue.

The clipboard reporter is the only one that requires enabling permissions, IDK how to do it on firefox but there should be a way to give the website permission for clipboard.

It's your responsibility to ask for the clipboard. Look at my recent ExtraUtilities pull to figure out how to do that.

@NexusKitten

This comment was marked as spam.

@AdamMady
Copy link

AdamMady commented Jul 2, 2023

I don't mind the merge

@nico-tome
Copy link

Nice extension! But the clipboard reporter isn't working, sadly....

they forgot to ask for permission to use the clipboard as well :/

The extension requires permission to view the clipboard, however the original extensions didn't ask for permission for clipboard and I don't know how to do that

Do you talk about my extension? If yes i don't need to ask permission because in my code there is no permission check

@LilyMakesThings
Copy link
Contributor

Nice extension! But the clipboard reporter isn't working, sadly....

they forgot to ask for permission to use the clipboard as well :/

The extension requires permission to view the clipboard, however the original extensions didn't ask for permission for clipboard and I don't know how to do that

Do you talk about my extension? If yes i don't need to ask permission because in my code there is no permission check

To comply with the other Clipboard blocks in the 3 existing extensions that support them, you need to ask for permission

@nico-tome
Copy link

Nice extension! But the clipboard reporter isn't working, sadly....

they forgot to ask for permission to use the clipboard as well :/

The extension requires permission to view the clipboard, however the original extensions didn't ask for permission for clipboard and I don't know how to do that

Do you talk about my extension? If yes i don't need to ask permission because in my code there is no permission check

To comply with the other Clipboard blocks in the 3 existing extensions that support them, you need to ask for permission

I don't really understand why, for me you just need to delet the line where you check the permissions... but you have more experience than me, i trust you

@AdamMady
Copy link

AdamMady commented Jul 8, 2023

I don't really understand why, for me you just need to delet the line where you check the permissions... but you have more experience than me, i trust you

Really glad both of our work didn't go to waste

This was referenced Jul 8, 2023
@GarboMuffin GarboMuffin changed the title Merge #665 and #632 into one extension Unified clipboard extension Jul 9, 2023
@GarboMuffin GarboMuffin merged commit 13e9166 into TurboWarp:master Jul 9, 2023
1 check passed
@ghost
Copy link

ghost commented Jul 26, 2023

Update: I set dom.events.asyncClipboard.readText to true on Firefox and now the clipboard block finally works.

@GarboMuffin
Copy link
Member

GarboMuffin commented Jul 26, 2023

The current "read clipboard" block was not very thought out. Browsers typically ignore it if you aren't in eg. a click event handler, but Scratch blocks don't run in click events. Usually it ends up working the first time (because you click on the permission button), but future attempts silently break. We will probably have to make that prompt appear each time to make the block somewhat workable.

Would encourage using "when something is pasted" and "last pasted text" instead if possible as those will never require permission requests

@NexusKitten NexusKitten deleted the clipboard branch August 24, 2023 07:27
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.

5 participants