+ /**
+ * Add a media message type to append HTML after a matching URL
+ * match() should return true if it wants to handle this URL
+ * buildHtml() should return the HTML string to append after the URL in the message
+ */
+ addType: function(match, buildHtml) {
+ if (typeof match !== 'function' || typeof buildHtml !== 'function')
+ return;
+
+ this.types = this.types || [];
+ this.types.push({match: match, buildHtml: buildHtml});
+ },
+
+