Mercurial > eldonilo > blog
annotate nothing.js @ 10:360186772aa3
Don’t hardcode avatars URL.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Wed, 02 Nov 2011 10:00:01 -0700 |
parents | 4d7a67349089 |
children | 161d4ea1c3f8 |
rev | line source |
---|---|
0 | 1 'use strict'; |
2 | |
3 parsers[''] = function(id, xml) { | |
4 var toDate = function() { | |
5 return new Date(); | |
6 }; | |
7 | |
8 var toHTML = function(xml, date) { | |
9 var article = document.createElementNS(ns.xhtml, 'article'); | |
5
4d7a67349089
Finish the changing of name to Eldonilo.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
0
diff
changeset
|
10 article.setAttributeNS(ns.e, 'id', id); |
4d7a67349089
Finish the changing of name to Eldonilo.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
0
diff
changeset
|
11 article.setAttributeNS(ns.e, 'date', date.to8601()); |
0 | 12 article.appendChild(document.createElementNS(ns.xhtml, 'h2').appendChild(document.createTextNode('This post is in an unknown namespace.'))); |
13 return article; | |
14 }; | |
15 | |
16 this.xml = xml; | |
17 this.date = toDate(xml); | |
18 this.html = toHTML(xml, this.date); | |
19 } |