Haha, I’m glad to see people enjoy this (author here)! If you like this sort of thing, some other terrible proof-of-concepts I’ve done:<p>A ruby dsl that’s indistinguishable from JavaScript. <a href="http://kevinkuchta.com/_site/2017/07/disguising-ruby-as-javascript/" rel="nofollow">http://kevinkuchta.com/_site/2017/07/disguising-ruby-as-java...</a><p>^ and in talk form: <a href="http://confreaks.tv/videos/rubyconf2018-ruby-is-the-best-javascript" rel="nofollow">http://confreaks.tv/videos/rubyconf2018-ruby-is-the-best-jav...</a><p>A url-shortener using AWS lambda - JUST lambda. No data store. <a href="http://kevinkuchta.com/_site/2018/03/lambda-only-url-shortener/" rel="nofollow">http://kevinkuchta.com/_site/2018/03/lambda-only-url-shorten...</a>
The most interesting part of this at least for me is what inspired it: A way to track cursor location without using javascript, that even works in Tor Browser: <a href="https://twitter.com/davywtf/status/1124130932573839360" rel="nofollow">https://twitter.com/davywtf/status/1124130932573839360</a><p>tl;dr css hover selectors that change the background image don't actually cause the browser to GET the specified background image until you hover over it, thus creating a way to send data from a web page with no javascript.
It seems all those css tracking tricks (a:visted, [value=...], now :hover) depend on external resouces (background-images) being loaded lazily only once the selector is matched.
Wouldn't a easy solution be for browsers to always download all url('...') references found the the stylesheets even if the selector is never matched?
Seems like a compelling argument for not lazily loading urls referenced in CSS rules. If the browser progressively loaded everything in the stylesheet without user interaction it would presumably consume more bandwidth in many situations but it would also blast this server with a continuous stream of the entire alphabet.
Reminds me of this:<p><a href="https://github.com/videlalvaro/gifsockets" rel="nofollow">https://github.com/videlalvaro/gifsockets</a>
Combining with Turing complete CSS, it can reach the sky higher than our imagination<p><a href="https://rawgit.com/elitheeli/stupid-machines/master/rule110-old/rule110-full.html" rel="nofollow">https://rawgit.com/elitheeli/stupid-machines/master/rule110-...</a>
Just a few hours earlier, this discussion on Turing-complete stuff hit HN's front page:<p><a href="https://news.ycombinator.com/item?id=19847939" rel="nofollow">https://news.ycombinator.com/item?id=19847939</a><p>Now I don't know if there's any causal relationship between the two (or the three) or if it's just a big coincidence, since it says on the README that the inspiration for it came from a Tweet posted a few days ago.
Probably a silly question, but is there a working demo for this? This is one of those things you kinda have to see in action, and there doesn't seem to be a link to anything like that in the readme.
Reminds me of this:
<a href="https://harmless.herokuapp.com/" rel="nofollow">https://harmless.herokuapp.com/</a><p>HN Discussion:
<a href="https://news.ycombinator.com/item?id=16319248" rel="nofollow">https://news.ycombinator.com/item?id=16319248</a><p>Basically the same idea, but it does refresh when you submit. The CSS buttons are quite a clever workaround to not refresh the page.
You could write a UI framework using these ideas to provide rich client-sided functionality to Tor hidden services, where users typically disable JavaScript.
Rather than the forever loading site, couldn't you also include in the html doc something like this to have it simply refresh every few seconds?<p><meta http-equiv="refresh" content="10; URL='<a href="http://new-website.com'"" rel="nofollow">http://new-website.com'"</a> /><p>So the page would simply refresh itself every 10 seconds.
Definitely the most creative code I'll be seeing this week! I realize this is really bad practice and likely to be fixed since it can be used for tracking users, but: are there any advantages to using CSS over Javascript, in theory?
"Css-only-chat"<p>CSS is always CSS. It's CSS on the repo too, but got edited back to "Css" here on the HN title for some reason.