From f6e31a437b324d68bc275a7945036cd7760b702c Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Fri, 1 May 2015 20:54:36 +0100 Subject: [PATCH] Add team method parseFragment() --- src/mkws-team.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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/ -- 1.7.10.4