# HG changeset patch # User Sonny Piers # Date 1326587111 -3600 # Node ID 715726598b2304b85fe00e77b35db1a88c5ddce5 # Parent b7a582a2b32c20d93cde5d52609d0cc9bd483b83 improvements on plugins diff --git a/plugins.js b/plugins.js --- a/plugins.js +++ b/plugins.js @@ -16,15 +16,9 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -NodeList.prototype.forEach = function(aCallback) { - for(var i = 0; i 0) { - contact.groups = []; - groups.forEach(function(group) { - contact.groups.push(group.textContent); - }); - } + var items = answer.querySelectorAll('item'); + for(var i = 0; i 0) { + contact.groups = []; + groups.forEach(function(group) { + contact.groups.push(group.textContent); + }); + } - contacts.push(contact); - }); + contacts.push(contact); + }; aCallback(contacts); }); } -// -//vCard -// +///////// +//vCard// +///////// Lightstring.NS.vcard = 'vcard-temp'; Lightstring.stanza.vcard = { 'get': function(aTo) { @@ -94,9 +90,9 @@ Lightstring.getVcard = function(aConnect aCallback(null); }); } -// -//Disco -// +///////// +//Disco// +///////// Lightstring.NS['disco#info'] = "http://jabber.org/protocol/disco#info"; Lightstring.NS['disco#items'] = "http://jabber.org/protocol/disco#items"; Lightstring.stanza.disco = { @@ -149,9 +145,9 @@ Lightstring.discoInfo = function(aConnec aCallback(creator); }); }; -// -//PubSub -// +////////// +//PubSub// +////////// Lightstring.NS.x = "jabber:x:data"; Lightstring.NS.pubsub = "http://jabber.org/protocol/pubsub"; Lightstring.NS.pubsub_owner = "http://jabber.org/protocol/pubsub#owner"; @@ -265,9 +261,9 @@ Lightstring.pubsubGetAffiliations = func Lightstring.pubsubSetAffiliations = function(aConnection, aTo, aNode, aAffiliations, aCallback) { aConnection.send(Lightstring.stanza.pubsub.setAffiliations(aTo, aNode, aAffiliations)); }; -// -//IM -// +////// +//IM// +////// Lightstring.stanza.message = { normal: function(aTo, aSubject, aText) { return ""+aSubject+""+aText+"";