Skip to content
This repository has been archived by the owner on May 30, 2021. It is now read-only.

How to send a message to a user #21

Open
Yoda3D opened this issue Jan 18, 2015 · 9 comments
Open

How to send a message to a user #21

Yoda3D opened this issue Jan 18, 2015 · 9 comments

Comments

@Yoda3D
Copy link
Member

Yoda3D commented Jan 18, 2015

How do you make a userscript send a message to a certain user, or is it even possible?

@PullJosh
Copy link
Contributor

Hmm... We couldn't send actual messages, but if you wanted to send a message to the user who is currently using the script, it would be possible to store a cookie (that's an array), which could contain all the messages we want to send. Then the orange message counter (in the navbar) could be changed by the script to add on any messages we want to send, and then display those messages (from the cookie) once the user goes to their messages page. (Then clear the array of messages, because messages always disappear when the message page is viewed.)

It would be a pain the in butt to make and would only work for sending messages to the user who is using the script, but it would work...
Oh, and I think MSU uses localstorage, not cookies. But it's basically the same thing (only not at all).

@Yoda3D
Copy link
Member Author

Yoda3D commented Jan 21, 2015

Ok, I was hoping that there was some sort of ajax send request or something :P

@Yoda3D Yoda3D closed this as completed Jan 23, 2015
@PullJosh
Copy link
Contributor

Not that I'm aware of.

@Felizolinha
Copy link
Contributor

If you want to make something like a chat you may want to use SockJS.
An example of a script that uses it (we would obviously need our own server and we would also need to adapt it to Scratch):
https://fungustime.pw/tastyplug/tastyplug.js

@Felizolinha Felizolinha reopened this Jan 28, 2015
@Yoda3D
Copy link
Member Author

Yoda3D commented Jan 28, 2015

Wow, just the thought of having a built-in chat for scratch makes me think of how awesome this can get! Maybe it would even be possible to make rooms that you invite people to, like for a collab, or a chat with a friend. If we started working on this it would completely revolutionize scratch!

@Felizolinha
Copy link
Contributor

I've thought about making a chat for Scratch with this some time ago, but I don't know Node.js and can't find a good place to learn how to use it D: I hope you guys know how to use it :)

@bates64
Copy link
Contributor

bates64 commented Jan 29, 2015

Heh heh, I made a Node.js chatroom once- and it still works. Maybe we could use that (google hangouts style overlay?)

@Yoda3D
Copy link
Member Author

Yoda3D commented Jan 29, 2015

Could we see your script?

@PullJosh
Copy link
Contributor

Yes please! I've been trying to learn node myself...
(For a completely unrelated project.)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants