1. 27
  1.  

  2. 8

    After reading this I thought that it would be better if it were an extension that did this without having to click a button and for websites other than twitter. I decided to search and found https://addons.mozilla.org/en-US/firefox/addon/redirector/?utm_source=addons.mozilla.org&utm_medium=referral&utm_content=search

    1. 13

      I prefer bookmarklets for a few reasons:

      Compatibility

      Bookmarklets work on all devices. Deskop, iOS and Android.

      Security

      I can easily read and understand the code.

      Flexibility

      They are easy to change. For example in this one, I will probably update the array of nitter instances regularly.

      Usability

      I can organize them just like my other bookmarks.

      Sharing

      Sharing a bookmark is as easy as copy/pasting a line of text

      1. 8

        For what it’s worth, I really like bookmarklets for the security reasons alone. I know they they aren’t running any code until I click on them (unlike extensions). It’s much easier to check that nothing nefarious is going on behind the scenes. Even the simplest extensions have multiple files of boilerplate code, and they can be updated remotely. I hate to think what would happen if the developer’s account got compromised for any of the popular extensions.

        Unfortunately, it seems like Chrome on Android doesn’t support bookmarklets – or at least fails on ones imported from my desktop.

        1. 7

          Extensions are updated remotely without user interaction? That is another scary aspect.

          For me, the bookmarklet works fine on Chrome on Android. I have to use it from the address bar though. I named it “t2n” and when I am on a Twitter page, I type “t2n” into my address bar. Now from the list of suggestions I click on the bookmarklet and it works.

          1. 8

            Bookmarklets can’t get sold to a hostile data-collecting advertising company while you weren’t paying attention.

        2. 2

          Yeah these are good points. Have you also see Fraidycat which has slightly different aims?

          1. 1

            This looks awesome! I’ve been looking for something similar for a while. Thank you for sharing :)

          2. 2

            that’s fair but i personally find extensions more convenient 🤷

            1. 2

              Problem with using a redirect extension is:

              • It doesn’t always redirect
              • Often, the nitter instance is throttled so you have to disable the extension
              1. 2

                redirection via an extension sometimes just doesn’t work? not all that surprising I guess.

                an extension could pick a random instance just like the bookmarklet though

            2. 1

              I’d did not know bookmarklets worked on iOS. That’s pretty rad!

            3. 4

              This is the extension I use https://libredirect.github.io/

              1. 1

                Privacy Redirect is similar. Found some alternatives I didn’t know about in there.

              2. 8

                No need to play the location.href.replace dance, you can simply do

                javascript:h=['nitter.it','nitter.snopyta.org','nitter.net'];
                window.location.host=h[Math.floor(Math.random()*h.length)];
                
                1. 4

                  Awesome! I updated the repo.

                2. 3

                  if the github project is meant to ensure free distribution, I’m pretty sure something this small is not subject to copyright anyway. you could just share the bookmarklet itself instead of a link to a github project:

                  javascript:h=[‘nitter.it’,‘nitter.snopyta.org’,‘nitter.net’]; location.href=location.href.replace(window.location.host,h[Math.floor(Math.random()*h.length)]);

                  1. 1

                    The GitHub repo has a few benefits.

                    It will be updated and annotated forever. Since I made this post, I already incorporated multiple improvements people suggested. And it makes collaboration easy. Everyone can add issues and pull requests, make forks or follow the repo.

                  2. 3

                    I’ve been using a userscript on Greasyfork which dynamically replaces all in-page Twitter links with nitter links. I don’t think my browser has opened a connection to Twitter since.

                    1. 1

                      I can see the appeal of solving this with a bookmarklet. It seems easy at first.

                      Sadly it doesn’t account for changing loads and nitter instances, so it currently only randomizes between three selected instances. And its nearly impossible to deploy a daily updating list via bookmarklets.

                      1. 1

                        Thanks for posting this. They’ve gotten so aggressive lately about trying to force a login that I’d been meaning to find something like this. I think I might just host a Nitter instance on my LAN, and point my bookmarklet at that.