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.
Permalink
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, "");
Permalink
I copied it wrong. The correct one is:
javascript:location.href=”http://www.explainxkcd.com/wiki/index.php?title=”+window.location.pathname.replace(///g, “”);
Permalink
It keeps getting it wrong. See pastebin.com/UjJjXTks.
Permalink
I think the WordPress visual editor was messing up the code. I’ve replaced the code in the post with a Gist
Permalink
Apparently that is what was happening. The new code also works as expected. Now I think is time to put them in use.
Permalink
If you want to see the explanation without using the page, you can use
javascript:$("head").append("")