Live data from Hacker News

A collaborative spreadsheet in less than 45 lines of JS, one library used

jsfiddle.net

41–50 of 69 posts

Re: A collaborative spreadsheet in less than 45 lines of JS, one library used

#42
post #21
post #10

I like the craziness that this devolved into. It's funny when a bunch of people are all editing like mad. I had the thought that it'd be fun to have a contest using jsfiddle to start from some point, like the excel (lite) clone in 30 lines, and add the best/coolest feature in some limit of lines. It's really wonderful how ingenuity stacks.

Such hax. I wonder if a collaborative drawing app could be made with this, using canvas.. I keep trying to figure out exactly how it works but then sparkleponies and alerts everywhere...

Not Firebase, but you might enjoy: https://hacks.mozilla.org/2013/10/introducing-togetherjs/

Re: A collaborative spreadsheet in less than 45 lines of JS, one library used

#43

WARNING: Could there be some kind of script attack ? My Safari browser freezes with 'foo' alert message from this site and it has placed itself as default website so whenever I reopen safari it freezes again. Let me know if you know how to fix this.

I guess you could start Safari while offline to prevent the page from loading and change back your default page to something sane?

Re: A collaborative spreadsheet in less than 45 lines of JS, one library used

#44

I am waiting for someone to reproduce healthcare.gov with 100 lines of code...

    Alabama
    

Please call 205-XXX-XXXX for more information.

Alaska

Please call 907-XXX-XXXX for more information.

Arizona

Please call 480-XXX-XXXX for more information.

Arkansas

Please call 479-XXX-XXXX for more information.

...
Who needs doctypes, titles, or bodies...

Re: A collaborative spreadsheet in less than 45 lines of JS, one library used

#45

I think I crashed it (ie: Chrome hard lockup on the tab) with this: =location.href='google.com'

That will just throw a frame error because of the X-Frame-Options header, which is caught quickly.

Browsers tend to have more problem with =while(1){}

Re: A collaborative spreadsheet in less than 45 lines of JS, one library used

#46
post #9

It would be nice if people could lay off the script injections. It's clearly insecure, but that's not really the point. It makes the experience worse for everyone if you alert(), etc.

> It's clearly insecure, but that's not really the point.

No, that is the point. I even pointed it out hours ago: https://news.ycombinator.com/item?id=6727448

The failure is the lesson. The previous version was a clever hack written by a clever person. This is ignorance, and the lesson is that allowing users to run arbitrary code on other user's computers is bad idea.

Re: A collaborative spreadsheet in less than 45 lines of JS, one library used

#48

I would love to read about who/how is blocking XSS and censoring!

Oh, that's me: http://jsfiddle.net/sy85U/31/ Just a very quick, crude little hack.

added an array for blocked words; http://jsfiddle.net/sy85U/47/
Post reply on HN