X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fmkws-core.js;h=9668cd19bda4c58fcfd12a53687d609a7d9a0656;hb=ac1878922c2abfbbfa564548344ae88c3b744198;hp=4ea36ef38d3eaf5ab69641b5d19cf25c7a555de8;hpb=0f1feb1a81659f046de02035e127d61b99e96a09;p=mkws-moved-to-github.git diff --git a/src/mkws-core.js b/src/mkws-core.js index 4ea36ef..9668cd1 100644 --- a/src/mkws-core.js +++ b/src/mkws-core.js @@ -96,14 +96,14 @@ mkws.log = function(string) { }; -mkws.objectWithParent = function(parent) { - function thing() {} // Must be function so `prototype' works - - thing.prototype = parent; - var res = new thing(); - thing.prototype = null; - return res; -}; +// This function is taken from a StackOverflow answer +// http://stackoverflow.com/questions/901115/how-can-i-get-query-string-values-in-javascript/901144#901144 +mkws.getParameterByName = function(name) { + name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]"); + var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"), + results = regex.exec(location.search); + return results == null ? "" : decodeURIComponent(results[1].replace(/\+/g, " ")); +} mkws.registerWidgetType = function(name, fn) { @@ -298,7 +298,7 @@ mkws.pagerNext = function(tname) { log("running auto searches"); for (var teamName in mkws.teams) { - mkws.teams[teamName].runAutoSearch(); + mkws.teams[teamName].queue("ready").publish(); } }