Remix.run Logo
cagenut 2 days ago

similar enough that i'll share, I think i learned this from an HN comment, you can put the code for a page in the url (with obvious limits):

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>
Doublon 2 days ago | parent | next [-]

I have one bookmark that will copy to clipboard the current page URL + an anchor to the highlighted text:

    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...

jefc1111 2 days ago | parent | prev | next [-]

I like these. I have one which gives you a little HTML playground. It's in my favourites and I use it quite a lot for jotting things down.

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%">

jdiff 2 days ago | parent | prev [-]

This also is quite handy for inlining SVGs in CSS, although I believe you have to mark the encoding as utf-8.

2 days ago | parent [-]
[deleted]