Some minor changes to make it easier to load a machine in the Node environment

This commit is contained in:
Jeff Parsons 2016-12-27 22:05:59 -08:00 committed by Jeff Parsons
commit d930b31c53
38 changed files with 4216 additions and 3743 deletions

View file

@ -705,12 +705,26 @@ web.isMobile = function()
};
/**
* getURLParameters(sParms)
* getURLParm(sParm)
*
* @param {string} sParm
* @return {string|undefined}
*/
web.getURLParm = function(sParm)
{
if (!web.parmsURL) {
web.parmsURL = web.parseURLParms();
}
return web.parmsURL[sParm];
};
/**
* parseURLParms(sParms)
*
* @param {string} [sParms] containing the parameter portion of a URL (ie, after the '?')
* @return {Object} containing properties for each parameter found
*/
web.getURLParameters = function(sParms)
web.parseURLParms = function(sParms)
{
var aParms = {};
if (window) { // an alternative to "if (typeof module === 'undefined')" if require("defines") was used
@ -855,6 +869,8 @@ web.onClickRepeat = function(e, msDelay, msRepeat, fn)
};
};
web.parmsURL = null; // initialized on first call to parseURLParms()
web.aPageEventHandlers = {
'init': [], // list of window 'onload' handlers
'show': [], // list of window 'onpageshow' handlers