5 ms·
I couldn't find a demo online and was too lazy to deal with Chrome Local Policy madness, so I temporarily put one up here: http://pumpkin.micheljansen.org/~dawu
by micheljansen 15y ago
I couldn't find a demo online and was too lazy to deal with Chrome Local Policy madness, so I temporarily put one up here:
http://pumpkin.micheljansen.org/~dawuss/pdf.js/test.html http://pumpkin.micheljansen.org/~dawuss/pdf.js/test.html
It has some obvious flaws, but it already works surprisingly well!
- karolist 15y agogit cloned test.html did not work with latest versions of Firefox, Chrome, Safari for me, yet yours does. I find it strange that there's some policy more restrictive on local content than on remote one, provided yours work perfectly.
- micheljansen 15y agoChrome does not allow scripts to access files on a local filesystem unless you specifically tell it to do so by starting it with --disable-web-security as an argument. See http://code.google.com/p/chromium/issues/detail?id=40787 http://code.google.com/p/chromium/issues/detail?id=40787 for a discussion (and a lot of frustrated people).
- lisperforlife 15y agoTo simply start an arbitrary HTTP server to serve up files in a directory I use python's SimpleHTTPServer. This works on most Linux and Mac boxes as they package python along with the distribution or the OS. python -m SimpleHTTPServer This serves the files off the current folder under port 8000.
- bergie 15y agoSomething similar for Node.js: https://github.com/balupton/simple-server https://github.com/balupton/simple-server
- knowtheory 15y agoChrist on a stick. I submitted this and an example 3 hrs ago. sigh. oh well. http://news.ycombinator.com/item?id=2657412 http://news.ycombinator.com/item?id=2657412
- deleted 15y ago[deleted]
- knowtheory 15y agoYeah, stuff falls off the top of "new" so easily too, since there's so much crap shoveled into it. Edit: not sure why parent was deleted, it said that timing matters (which it does).
- joshuacc 15y agoYou may wish to edit your comment to be less offensive to Christians and other religious readers. We may not be particularly vocal around here, but we do exist.
- knowtheory 15y agoNo, i don't think i'll edit it (nor do i wish to), but i will apologize for offense i have caused, as that was not my intent. Edit: I just want to be clear, you see things like "goddamnit" and other ppl using the words "christ" or "god" (in what others may see as taking them in vain) all over the place including on HN. I don't see what the big deal is there either. So really, i do mean it when i say i intended no offense.
- joshuacc 15y agoThank you for the apology. The distinction I would make between your comment and "goddamnit" is that while I don't particularly like either one, "goddamnit" doesn't actively mock God/people's religious beliefs about God. On the other hand "Christ on a stick" certainly seems like going out of one's way to mock the crucifixion/people with religious attachment to the crucifixion. Does that help explain where I'm coming from?
- stephth 15y agoDoesnt seem to work on MobileSafari. Using iOS 4.2.1.