Mercurial > projects > booket
diff booket.js @ 2:82c50265c8dc
Display creation and modification time
author | Guido Berhoerster <guido+booket@berhoerster.name> |
---|---|
date | Mon, 08 Sep 2014 19:34:11 +0200 |
parents | c2248f662a2c |
children | 4786df0aec03 |
line wrap: on
line diff
--- a/booket.js Sat Sep 06 18:20:15 2014 +0200 +++ b/booket.js Mon Sep 08 19:34:11 2014 +0200 @@ -1031,6 +1031,8 @@ var newNode; var bookmarkElement; var linkElement; + var ctimeElement; + var mtimeElement; var tagListElement; newNode = document.importNode(this.bookmarkTemplate.content, true); @@ -1042,6 +1044,14 @@ linkElement.textContent = linkElement.title = bookmark.title; linkElement.href = bookmark.url; + ctimeElement = bookmarkElement.querySelector('.ctime'); + ctimeElement.dateTime = bookmark.ctime.toISOString(); + ctimeElement.textContent = bookmark.ctime.toString(); + + mtimeElement = bookmarkElement.querySelector('.mtime'); + mtimeElement.dateTime = bookmark.mtime.toISOString(); + mtimeElement.textContent = bookmark.mtime.toString(); + tagListElement = bookmarkElement.querySelector('ul.tag-list'); bookmark.tags.forEach(function (tag) { var newNode;