From dc17008e8d8fc2a78d53ef9f955c9185352282a4 Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Fri, 1 May 2015 20:57:48 +0100 Subject: [PATCH] Expand mkws-core parse_fragment() function to parse apart the individual teams' sets of parameters. --- src/mkws-core.js | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/mkws-core.js b/src/mkws-core.js index deb78d0..66d95fd 100644 --- a/src/mkws-core.js +++ b/src/mkws-core.js @@ -696,8 +696,20 @@ mkws.info("Using window.name '" + window.name + "'"); d = function (s) { return decodeURIComponent(s.replace(a, " ")); }, q = s.substring(1); - while (e = r.exec(q)) - hashParams[d(e[1])] = d(e[2]); + while (e = r.exec(q)) { + var key = d(e[1]); + if (key === 'mkws') { + key = 'AUTO'; + } else { + key = key.replace('mkws', ''); + } + var team = mkws.teams[key]; + if (team) { + hashParams[key] = team.parseFragment(d(e[2])); + } else { + alert("can't resolve team name '" + key + "'"); + } + } return hashParams; } -- 1.7.10.4