Skip to content

Instantly share code, notes, and snippets.

@sheabunge
Created July 19, 2013 23:08
Show Gist options
  • Save sheabunge/6043015 to your computer and use it in GitHub Desktop.
Save sheabunge/6043015 to your computer and use it in GitHub Desktop.
Explain xkcd bookmarklet

This bookmarklet will take you from a comic on xkcd.com to the explaination on explain xkcd.

To use, create a new bookmark/favurite/whatever and paste the above code instead of the bookmark URL.

javascript:location.href='http://www.explainxkcd.com/wiki/index.php?title='+window.location.pathname.replace(/^\/|\/$/g, '')
@AaronCosta
Copy link

Thanks!

@askeeve
Copy link

askeeve commented Sep 5, 2018

This is probably trivial to most people but if you'd prefer this bookmarklet to open explain xkcd in a new tab you can write it like this:
javascript:(function(){ window.open('http://www.explainxkcd.com/wiki/index.php?title='+window.location.pathname.replace(/^\/|\/$/g, '')); })();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment