Author

Topic: Automatic URL shortener for bitcointalk posts (Read 301 times)

legendary
Activity: 1876
Merit: 1475
February 24, 2018, 09:16:15 PM
#2
I've updated this to 0.2.
I made some improvements and added support for profiles:

legendary
Activity: 1876
Merit: 1475
February 22, 2018, 06:49:34 PM
#1
Update:
I've closed this and let the domain btct.ws expire because of lack of demand and use.




bitcointalk URL shortener
+ Tampermonkey/Greasemonkey script

Several times I've needed to shorten bitcointalk URLs, especially when including more than one link on trust I've left, "Reference link" is not enough and I don't like posting things like "https://bitcointalksearch.org/topic/m.30865584" on other users' profiles.

So I've created a simple service which takes the topic and msg parameters from that URL, base-62 encodes them and writes a short URL like:
btct.ws/cAUS.25vy0 for this post, or
btct.ws/~I67 for my profile

No database is ever used. It's basically just a URL re-writer.
The creation of these short URLs is done offline on your browser using JS. The forwarding is done on the server (for convenience and to increase compatibility) but nothing is stored and no DB is used.

There are 2 ways to create these links:


1: No installation required, recommended to use it once or a few times only
  • Copy the full URL of a post or a topic
  • Go to https://btct.ws/ (make sure JS is enabled on your browser)
  • Paste the full URL
  • The short URL will appear, ready to be copied

Supported formats are:
https://bitcointalksearch.org/topic/automatic-url-shortener-for-bitcointalk-posts-3001846 => btct.ws/cAUS
https://bitcointalksearch.org/topic/m.30865584 => btct.ws/cAUS.25vy0
https://bitcointalksearch.org/user/ecuamobi-169515 => btct.ws/~I67
https://bitcointalk.org/index.php?action=trust;u=169515 => btct.ws/t~I67
https://bitcointalk.org/index.php?action=merit;u=169515 => btct.ws/m~I67


2: A simple installation is required to make everything automatic
  • Install Tampermonkey on Chrome, Greasemonkey on Firefox, or Violentmonkey on Opera (Read more here: https://openuserjs.org/about/Userscript-Beginners-HOWTO)
  • Install this user script: https://openuserjs.org/scripts/EcuaMobi/btct.ws_shortener (for my convenience, it's based on grue's Merit script)
  • Make sure it's enabled and open any thread on bitcointalk.org
  • Click on #msg (for example #1) shown on any post (see image)
  • A popup will appear showing the short URL, along with the original one (so no functionality is lost). Just copy it. Click the same link again to close it
  • A small (Link) will appear next to every poster's name
  • Click it to show short links to the user's profile, trust and merit

Notes:
  • To make the URL shorter, it is shown without any protocol. If you want you can use http or https, both will work.
  • The alphabet used to convert topic and msg to base-62 is 0-9, a-z, A-Z, in that order

Releases:
     0.2
  • Added support to shorten users' profiles, trust and merit
  • Improved design to make it look like part of the forum
  • Fixed an issue that prevented it from working correctly when clicking any link and goign back
    0.1
  • Initial release

Post here if you have any question or suggestion, or if something's not working fine.
Jump to: