Live data from Hacker News

Show HN: I saw this mind-blowing experiment, so I made a simple version of it

github.com

81–90 of 140 posts

Re: Show HN: I saw this mind-blowing experiment, so I made a simple version of it

#81
post #79

Earlier quoted context omitted.

Probably because of websocket network lag and also, in my anecdotal experience, window position updates are sometimes strangely jittery

Why is it over a websocket? Can't it just share local data?

I might be wrong, but I think the point is to simulate a server-client architecture (to show that it works even for an actual web app).

Re: Show HN: I saw this mind-blowing experiment, so I made a simple version of it

#82

Could someone explain what this means ? ( I’m not even sure I understand the gif on the GitHub page ) I just see windows seemingly sharing data.

The core of the trick isn't the window-window communication as much as using browser APIs to expose the window coordinates.

Re: Show HN: I saw this mind-blowing experiment, so I made a simple version of it

#83
post #37

I'm wondering about practical application of this demo...

I have always been fascinated by those sci-fi movies in which a person would swipe up on their tablet, and the current window would fly to another monitor.

This maybe be something that can achieve that.

Re: Show HN: I saw this mind-blowing experiment, so I made a simple version of it

#85
post #78

That's a great demo! I'd be curious to see how this would work with multiple monitors. Also, thank you for voluntarily acknowledging that you were directly inspired by somebody else and giving them credit - the software industry could use more people like you.

What, thieves? Make your stuff from zero, like the rest of us!

Pretty sure this is tongue-in-cheek, given the commenter (pretty high profile dev who creates a lot of cool stuff and does not shy away from using other open source code!) :)

Re: Show HN: I saw this mind-blowing experiment, so I made a simple version of it

#86
post #53

Earlier quoted context omitted.

Using the demo in https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/... it seems Firefox pretends the window is always at (0,0). So that's nice.

You likely have `privacy.resistFingerprinting` set to true.

as everyone should!

people forget lesson from recent past. i don't know when google strong armed w3c to include this back... but we had this since ie4 days and then disabled everywhere since it was abused left and right for click jacking attacks.

Re: Show HN: I saw this mind-blowing experiment, so I made a simple version of it

#88

Am I the only one that's horrified that window.screenX and window.screenY exist? This is not information that I want to provide.

Sorry, i'm a little lost. I tried thinking about it, but I can't think of any nefarious attacks someone could do with screenX/Y. Why is that such a risk? What could they possibly learn from that other than screen size?

knowing where the window is, you can generate something the user will click on a known position and then at the right time you trigger something like an administrator escalation privilege confirmation dialog and the user clicks that instead.

click jacking is always fun.

Re: Show HN: I saw this mind-blowing experiment, so I made a simple version of it

#89
post #60

But… why does it lag? Shouldn’t this be trivial enough to be instant?

I wonder if it would be more instant if they used postMessage api instead of going over network.

Any local network usage should be nearly instantaneous.

My personal theory about the lag is that positioning the window is not synchronized to the JS thread, so the window moves before the JS thread is aware, which means you see the square move after the window has already moved.

Re: Show HN: I saw this mind-blowing experiment, so I made a simple version of it

#90
post #79

Earlier quoted context omitted.

Probably because of websocket network lag and also, in my anecdotal experience, window position updates are sometimes strangely jittery

Why is it over a websocket? Can't it just share local data?

It says so right in the OP

> The original work by Bjorn Staal used localStorage, but I found sockets more fun, because if tweaked a bit, this can be shared with friends.

Post reply on HN