Archived Comments (locked)
|
|
The following is an archive of comments made before threaded discussions was implemented (November 16th, 2008) |
|
|
You seem to have an escaping bug in this script. The lines that read:
var caption = document.createElement('div');
caption.innerHTML = '<p>' + title + '<p/>';
should instead read something like:
var caption = document.createElement('p');
caption.appendChild(document.createTextNode(title));
That way, it'll work correctly even if the comic title happens to contain HTML tags (which, xkcd being xkcd, wouldn't surprise me at all). It's not quite the same otherwise ? my code creates a single tag, yours creates a with two s, the second one empty ? but that's a minor difference you can easily correct if it matters. |
|
|
Updated the meta-data to work correctly on all urls. |
|
|
Now supports both the standard comics, and any of the large-format comics that are buried under a hyperlink. Also improved meta-data so it applies itself to xkcd.org/.net/.com |