From: Mike Taylor Date: Fri, 1 May 2015 19:54:36 +0000 (+0100) Subject: Add team method parseFragment() X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=f6e31a437b324d68bc275a7945036cd7760b702c;p=mkws-moved-to-github.git Add team method parseFragment() --- diff --git a/src/mkws-team.js b/src/mkws-team.js index 890f582..c688f76 100644 --- a/src/mkws-team.js +++ b/src/mkws-team.js @@ -101,6 +101,18 @@ mkws.makeTeam = function($, teamName) { return s; } + // ### what quoting do we need to undo? Complement of previous function + that.parseFragment = function(s) { + var x = {}; + + var list = s.split('@'); + for (var i in list) { + var a = list[i].split('='); + x[a[0]] = a[1]; + } + + return x; + } // The following PubSub code is modified from the jQuery manual: // http://api.jquery.com/jQuery.Callbacks/