function runController(newPageHash)
	{
		// get controller name and parameters
		var controllerName = "";
		var parameters = {};
		newPageHash.replace(/^#page-([^?&]+)([?&].+)?$/, function(a, matchedController, matchedParams)
		{
			controllerName = matchedController.replace(/-/g, '_');
			if (matchedParams)
			{
				matchedParams.replace(/[?&]([^?&=]+)=([^?&=]*)/g, function(a, name, value)
				{
					parameters[name] = value;
				});
			}
		});

		// ignore controller if returning from some pages (e.g. menu)
		var page = $(newPageHash.replace(/\?.+/, ''));
		var viewOnlyVisit = page.attr('data-ignore-visit') == 'true' && newPageHash.search(/[^\w]ignore-visit=false[^\w]/) < 0;
		viewOnlyVisit |= newPageHash.search(/^#table.*-popup$/) === 0;
		if (!controllerIgnorance.appendVisit(newPageHash, controllerName, viewOnlyVisit)) {
			LOG.info('will NOT run controller');
			return;
		}
		else {
			LOG.info('will run controller or attempt it');
		}

		// run controller
		if (controllerName.length && typeof($mJ.controller[controllerName]) == 'function')
		{
			$(function () {
				$mJ.controller[controllerName](parameters);
			});
		}
	}
/**
	 * Run controller based on new hash.
	 *
	 * @note To ignore visits to some pages (e.g. menu) use data-ignore-visit="true" attribute.
	 * @note To force non-ignoring visit from some location use "ignore-visit=false" in parameters.
	 *
	 * To see how skippig controllers works see ControllerIgnorance library.
	 */
Run controller based on new hash.

@note To ignore visits to some pages  use data-ignore-visit="true" attribute.
@note To force non-ignoring visit from some location use "ignore-visit=false" in parameters.

To see how skippig controllers works see ControllerIgnorance library.
Run controller based on new hash . @note To ignore visits to some pages use data - ignore - visit = " true " attribute . @note To force non - ignoring visit from some location use " ignore - visit = false " in parameters . To see how skippig controllers works see ControllerIgnorance library .
function runController(newPageHash)
	{
		var controllerName = "";
		var parameters = {};
		newPageHash.replace(/^#page-([^?&]+)([?&].+)?$/, function(a, matchedController, matchedParams)
		{
			controllerName = matchedController.replace(/-/g, '_');
			if (matchedParams)
			{
				matchedParams.replace(/[?&]([^?&=]+)=([^?&=]*)/g, function(a, name, value)
				{
					parameters[name] = value;
				});
			}
		});
		var page = $(newPageHash.replace(/\?.+/, ''));
		var viewOnlyVisit = page.attr('data-ignore-visit') == 'true' && newPageHash.search(/[^\w]ignore-visit=false[^\w]/) < 0;
		viewOnlyVisit |= newPageHash.search(/^#table.*-popup$/) === 0;
		if (!controllerIgnorance.appendVisit(newPageHash, controllerName, viewOnlyVisit)) {
			LOG.info('will NOT run controller');
			return;
		}
		else {
			LOG.info('will run controller or attempt it');
		}
		if (controllerName.length && typeof($mJ.controller[controllerName]) == 'function')
		{
			$(function () {
				$mJ.controller[controllerName](parameters);
			});
		}
	}
function runController ( newPageHash ) { var controllerName = "" ; var parameters = { } ; newPageHash . replace ( / ^#page-([^?&]+)([?&].+)?$ / , function ( a , matchedController , matchedParams ) { controllerName = matchedController . replace ( / - / g , '_' ) ; if ( matchedParams ) { matchedParams . replace ( / [?&]([^?&=]+)=([^?&=]*) / g , function ( a , name , value ) { parameters [ name ] = value ; } ) ; } } ) ; var page = $ ( newPageHash . replace ( / \?.+ / , '' ) ) ; var viewOnlyVisit = page . attr ( 'data-ignore-visit' ) == 'true' && newPageHash . search ( / [^\w]ignore-visit=false[^\w] / ) < 0 ; viewOnlyVisit |= newPageHash . search ( / ^#table.*-popup$ / ) === 0 ; if ( ! controllerIgnorance . appendVisit ( newPageHash , controllerName , viewOnlyVisit ) ) { LOG . info ( 'will NOT run controller' ) ; return ; } else { LOG . info ( 'will run controller or attempt it' ) ; } if ( controllerName . length && typeof ( $mJ . controller [ controllerName ] ) == 'function' ) { $ ( function ( ) { $mJ . controller [ controllerName ] ( parameters ) ; } ) ; } }
Run controller based on new hash.
Run controller based on new hash .
// get controller name and parameters
 // ignore controller if returning from some pages (e.g. menu)
 // run controller
