News for hackers. Stuff that matters.
Re:Tiny PWAs and why I keep building them by myfonj on Sunday February 03, 2019 @11:17AM (#19070399)
Upload? Come on, just load it as dataURI, bookmark it and you have offline "application" at your disposal. And as a bonus, here, have this "distributed app store" you can even print on paper [1].

[1] http://zxing.org/w/chart?cht=qr&chs=350x350&chld=L&choe=UTF-...

i.e. QR-coded dataURI document

    data:text/html;charset=utf-8,<!DOCTYPE html><title>Screen light</title><html onclick=on=!on;this.style.background=on%3F'white':'black'><body onload=on=true>
Re:Tiny PWAs and why I keep building them by t0astbread on Sunday February 03, 2019 @06:47PM (#19072965)
This is great! I added some text to it to make it more "user friendly" and compressed it a bit so that it fits inside a tweet: https://mobile.twitter.com/T0astBread/status/109220433722755...

  data:text/html,<title>Screen Light</title><html onclick=o=!o;style.background=o%3F0:'black';style.color=o%3F0:'white'><body onload=o=1><h1>Screen Light</h1><p>Turn your screen into a light source<br>Tap to toggle<p><a href=https:/news.ycombinator.com/item?id=19069487>Source
Re:Tiny PWAs and why I keep building them by myfonj on Tuesday February 05, 2019 @01:21PM (#19088044)
Yes, such "offline bookmarked dataURI applications" are great, underappreciated and ancient things. Sadly, current trend in modern browsers is to suppress them in sake of security, because in the past some crooks misused them them. Currently you cannot even link to them like you could in the past; anything other than direct navigation from bookmark or URLbar results in better case in blank screen, in worse is silently blocked. For example in the past you could redirect to them, or make datauri editor that encoded itself into another datauri, or both [1], but now you can not [2].

[0] Check out for example this HTML / SVG sketchbook: https://gist.github.com/myfonj/c8ce74bf549e19600026ce9022388... [1] http://tinyurl.com/selcoditor (see network log) [2] https://blog.mozilla.org/security/2017/11/27/blocking-top-le...

Re:Tiny PWAs and why I keep building them by jahewson on Sunday February 03, 2019 @01:21PM (#19071230)
My iPhone 6s doesn’t like this QR code, it just says “No usable data found”.
Re:Tiny PWAs and why I keep building them by masklinn on Sunday February 03, 2019 @02:23PM (#19071581)
The built-in QR detector is very finnicky/odd, apparently it just assumes every payload is an HTTP URL, nothing else works even remotely.

Other applications work much better for that, though they may or may not recognise non-http URIs e.g. here scanbot just displays the textual content and you're on the hook for copy/pasting it wherever you need.

Re:Tiny PWAs and why I keep building them by myfonj on Tuesday February 05, 2019 @01:30PM (#19088171)
Yes, I had no luck even with QR reader integrated in Nightly Android [0].

Sadly, copypasting resulting URI as plaintext is most probably the only option for modern browsers, because any other way of top level frame navigation to dataURI document is blocked. (Besides existing bookmark, that is.) I keep forgetting this, sorry for hurried "in theory it must work great" shout out.

[0] https://support.mozilla.org/en-US/kb/scan-qr-codes-firefox-a...

Re:Tiny PWAs and why I keep building them by rhizome on Sunday February 03, 2019 @02:21PM (#19071572)
is there a "don't try to use the data" setting, so it'll just present the plain text?
Re:Tiny PWAs and why I keep building them by masklinn on Sunday February 03, 2019 @02:25PM (#19071600)
Nope. Only setting is to not scan for qrcodes at all.