From 968a1a63f8e625994b40b7d2af2d22940285c63c Mon Sep 17 00:00:00 2001 From: Matěj Cepl Date: Sun, 5 Jun 2011 23:34:55 +0200 Subject: Move attachments and comments functions into four separate objects. Specifically there are objects AttachList, Attachment, Comment, and CommentList. --- data/tweaks/viewSource.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'data/tweaks/viewSource.js') diff --git a/data/tweaks/viewSource.js b/data/tweaks/viewSource.js index 81e6735..fdf92d3 100644 --- a/data/tweaks/viewSource.js +++ b/data/tweaks/viewSource.js @@ -39,12 +39,12 @@ var reAttachmentType = /,\s+([^ )]*)[;)]/; function viewAttachmentSource(attachments) { attachments.forEach(function(att) { - if (att.length < 1) { + if (!att.id) { return; } - var typeName = att[2]; - var elem = att[4]; - var id = att[1]; + var typeName = att.name; + var elem = att.element; + var id = att.id; var attachHref = elem.getAttribute("href"); if (typeName == "application/java-archive" -- cgit