Redirector tool
Yesterday, I ran into a very interesting issue so I created a small tool to help with this.
I was trying to link directly to a to-do list in the Things app, I use specific lists to separate things out so this would’ve been perfect. Things provides simple URI deep linking like things://show?id=[some-list-id]
. This was exactly what I needed to link to a list from a web page, in this case, the page was a Notion page. Well, it turns out that most link embedding tools don’t want you to use anything except HTTP or HTTPS as the schema, e.g. Notion and Google docs. So if I took the above things://...
url, Notion would just cancel the link embedding and go back to editing, Google docs actually gives you an error for this.
I thought about this for a bit and tried bit.ly’s link shortener but that also only wants http and https pages, nothing else. So, I decided to create a small tool. I had a simple rule for this tool, it had to be done quickly and did not require much upkeep/maintenance after I’m done using it this one time. This ruled out running a full-on web app because that would require at least an hour of setting things up. So I though about it and came to the conclusion that it should just be a simple webpage and I’ll use javascript’s window.location
to redirect. This means, the redirects will only happen after a user loads the link into a real browser. I timeboxed myself into about 30 minutes of work. It turned out that I had a working version live within 15 minutes, but only because Cloudflare propagated the DNS right away and the github repo is pretty bare.
The tool is available at https://r.mhmd.us and there are instructions on how to use it. It works by taking the provided URL and setting that as the location, then after 5 seconds, it closes the tab itself. I had some hesitation about putting it up in case someone abuses it by linking to it and then redirecting somewhere else but the likelihood that will happen is very little because it’s not a very easily found page on the internet.
Comments ()