src/main/webapp/js/singlepage.js
/**
	 * Decode the current page url in the format of /<contextRoot>/<corpus>/search/[hits|docs][/]?query=...
	 * into a SearchParameters object
	 *
	 * @param {string} url - full page url, the querystring (if present) should encode a BlackLabParameters object
	 * @returns {SearchParameters} object containing the decoded and translated parameters, or null if no parameters were found
	 */


@param {string} url - full page url, the querystring (if present) should encode a BlackLabParameters object
@returns {SearchParameters} object containing the decoded and translated parameters, or null if no parameters were found
@param { string } url - full page url the querystring ( if present ) should encode a BlackLabParameters object @returns { SearchParameters } object containing the decoded and translated parameters or null if no parameters were found
function fromPageUrl() {
		var uri = new URI();
		var paths = uri.segmentCoded();
		var operation = paths[paths.lastIndexOf('search') + 1];
		var blsParam = new URI().search(true);
		if ($.isEmptyObject(blsParam))
			return null;
		var pageParam = SINGLEPAGE.BLS.getPageParam(blsParam);
		if (operation)
			pageParam.operation = operation;
		return pageParam;
	}
function fromPageUrl ( ) { var uri = new URI ( ) ; var paths = uri . segmentCoded ( ) ; var operation = paths [ paths . lastIndexOf ( 'search' ) + 1 ] ; var blsParam = new URI ( ) . search ( true ) ; if ( $ . isEmptyObject ( blsParam ) ) return null ; var pageParam = SINGLEPAGE . BLS . getPageParam ( blsParam ) ; if ( operation ) pageParam . operation = operation ; return pageParam ; }
Decode the current page url in the format of /<contextRoot>/<corpus>/search/[hits|docs][/]?query=...
 into a SearchParameters object
Decode the current page url in the format of / <contextRoot > / <corpus > / search / [ hits|docs ] [ / ] ?query = ... into a SearchParameters object
// operation is (usually) contained in the path, the other parameters are contained in the query parameters