Explain xkcd bookmarklet

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 responses to “Explain xkcd bookmarklet”

  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, "");

    • I copied it wrong. The correct one is:

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

Leave a Reply

Your email address will not be published.

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