Explain xkcd bookmarklet

As you may know, I really love reading comics over at xkcd. However, some of the comic meanings can be a bit abstract, and it helps to verify your interpretation is correct.

One of the best services for doing so is explain xkcd, a wiki where anyone can submit and contribute to explanations.  However, it becomes tedious reading multiple comics over at xckd.com and then looking up their explanations on explain xkcd.

I created a bookmarklet that sits in your bookmark bar or menu, and if you click it when you’re visiting a comic over at xkcd.com, it will take you to the explanation.

[CodePen height=300 show=result href=ezoyk user=bungeshea ]

Next time you’re visiting xkcd.com, click on the bookmark and you should be redirected directly to the explanation for the comic you’re viewing.

6 Comments


  1. That was exactly what I was looking for; thanks! Unfortunately the code as you gave it preserves the slashes, i.e. xkcd.com/1237/ redirects to wiki page /1237/.

    Instead, I found that the following works as expected.
    javascript:location.href="http://www.explainxkcd.com/wiki/index.php?title="+window.location.pathname.replace(///g, "");

    Reply

    1. I copied it wrong. The correct one is:

      javascript:location.href=”http://www.explainxkcd.com/wiki/index.php?title=”+window.location.pathname.replace(///g, “”);

      Reply

    1. I think the WordPress visual editor was messing up the code. I’ve replaced the code in the post with a Gist

      Reply

  2. If you want to see the explanation without using the page, you can use

    javascript:$("head").append("")

    Reply

Leave a Reply to Konstantinos Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.