Posted by bpierre 5 hours ago
Yes, it's not communicated very clearly.
So, its just like sending your sites link through email/whatsapp or any other channel. I don't know what the real usecase for this idea could be!!!!
this works as a "url" in both chrome and safari:
data:text/html, <html contenteditable><head><title>notes</title></head><body><textarea rows=36 cols=140></textarea></body></html>data:text/html,<pre onkeyup="(function(d,t){d[t]('iframe')[0].contentDocument.body.innerHTML = d[t]('pre')[0].textContent;})(document,'getElementsByTagName')" style="width:100%;height:48%;white-space:pre-wrap;overflow:auto;padding:2px" contenteditable></pre><iframe style="width:100%;height:48%">
javascript:(function(){navigator.clipboard.writeText(`${window.location}#:~:text=${escape(window.getSelection().toString())}`);%20console.log("copied!");%20})();
Pretty useful to share a specific part of a page to someone else.For example it will give you this: https://news.ycombinator.com/item?id=47888337#47888930#:~:te...