top | item 31020383

(no title)

nilshauk | 3 years ago

Some weeks ago I wrote a couple of bookmarklets, one of which was this:

javascript:(function(){ location.href = `https://nitter.net${location.pathname}` })();

You can take this JavaScript snippet and save it as a clickable bookmark (hence the name bookmarklet) in you browser. I've named this "re-open in Nitter". I deleted my Twitter account a while back but sometimes I get handed a Twitter link. This snippet let's me quickly re-open the link in Nitter which is a nag-free way to browse Twitter without having an account. :)

discuss

order

terinjokes|3 years ago

Related, I have a bookmark called "HN Migrate" that let's me redirect an HN comment section to a mirror (currently hackerweb.app).

    javascript:(function(){!function(){var a=new URL(location.href);if("news.ycombinator.com"===a.host){var e=new URLSearchParams(a.search.substr(1));if(e.has("id")){var n=new URL("http://hackerweb.app/");n.hash="#/item/"+e.get("id"),location.href=""+n}}}()})()
At some point I might add support for deep linked comment threads, but in practice it hasn't been enough of an itch.

sgc|3 years ago

Useful! There is a nitter add-on at least for firefox, called nitter redirect. All twitter links go there seamlessly.

Matumio|3 years ago

Nice use-case for bookmarklets! With Firefox I've started using the LibRedirect extension for that, which also covers other big sites.