Hacker News new | ask | show | jobs
by edwardloveall 1714 days ago
I _believe_ you can do one simpler (assuming the reader only clicks the link if they recognize it's a medium post)

    javascript:q=location.pathname;location.href="https://scribe.rip"+q;
1 comments

while we're golfing

   javascript:location.href="https://scribe.rip"+location.pathname;
Golf you say?

  javascript:l=location;l.href="//scribe.rip"+l.pathname;
Thanks, I ended up using yours. But I might change that if someone shortens it even more /s

    javascript:l=location;l.href="//scribe.rip"+(l.hostname.includes("medium.com")?l.pathname:"");
is a happy medium (no pun intended) & I'll give it a go in my bookmark toolbar