2 ms·
I edited the bookmarklet: javascript:window.location="http://news.ycombinator.com/submitlink?u="+encodeURIComponent((document.location+'').replace(/.utm_.*$/
by jessaustin 10y ago
I edited the bookmarklet:
javascript:window.location="http://news.ycombinator.com/submitlink?u="+encodeURIComponent((document.location+'').replace(/.utm_.*$/,''))+"&t="+encodeURIComponent(document.title)
- jwilk 10y agoShouldn't you replace before URL-encoding?
- jessaustin 10y agoIt doesn't seem to matter. It's not as if "utm_" encodes to anything other than "utm_".
- jwilk 10y agoBut encoded "?" is "%3F".
- jessaustin 10y agoHmmm, I have seen an extra '%3' occasionally... it never hurt anything so I didn't bother fixing it. Thanks dude now I'm going to be totally tormented until I fix my bookmarklet. [EDIT:] ok moving that parenthesis and avoiding the update of document.location didn't take me too long...