Mercurial > eldonilo > blog
view nothing.js @ 13:161d4ea1c3f8
Migration of the client-side to XMPP.js instead of Strophe.js.
Drop BOSH support and add WebSockets support.
The server-side is untested, may be broken.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Thu, 03 Nov 2011 14:23:10 -0700 |
parents | 4d7a67349089 |
children | 03be0717d3f8 |
line wrap: on
line source
'use strict'; parsers[''] = function(item) { var toDate = function() { return new Date(); }; var toHTML = function(item, date) { var article = document.createElementNS(ns.xhtml, 'article'); article.setAttributeNS(ns.e, 'id', id); article.setAttributeNS(ns.e, 'date', date.to8601()); article.appendChild(document.createElementNS(ns.xhtml, 'h2').appendChild(document.createTextNode('This post is in an unknown namespace.'))); return article; }; this.xml = item.payload; this.date = toDate(); this.html = toHTML(item, this.date); }