XKCD Click to Drag

If you’re in to this sort of thing, you’ve probably come across today’s XKCD already.  If you’ve not, you should: it’s an insanely large comic, very nicely done.  I’ve taken some of the hacks that have been floating around, and put them together for easy using.  So far, that means full-screen with cursor key navigation.

View the comic.

Thanks to a comment on Explain XKCD for inspiration for the full-screen code and potch on HN for the keyboard control.

This entry was posted in Technology. Bookmark the permalink.

6 Responses to XKCD Click to Drag

  1. Alex says:

    Hi!

    did you think about implementing a perma-link feature to link to a specific position of the comic?

    Alexander

  2. Natalie says:

    Hey I’ve been looking for this kind of script everywhere.
    Having one page as seemingly one large image to click and drag to navigate
    and excited to see its under the CC licence
    Is it possible you could send me the files for that page you’ve made? I would be extremely grateful (including the little bubble so I can give credit to you and its original writer)

    • There’s no server-side smarts here, it’s all available from view source and almost all copied directly from XKCD — all I’ve done is chop out the rest of the XKCD page, make it full-screen and added the bubble and keyboard navigation. I’d recommend you study the source if you’d like something similar. It may not be immediately suited for your purpose: it assumes a fixed size set of images, with the lower half being black. You’ll also need to chop up your picture appropriately. Have fun :).

      • Natalie says:

        I was aware of the tiles, was gunna be the biggest challenge.
        I did try and attempt to look at the source but I couldn’t get it working, I could only get the CSS working ahah but the rest was blank. Guess I’ll just have to keep trying. Thanks anyway

Leave a Reply

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