jquery.mockjax.js
function processJsonpUrl( requestSettings ) {
		if ( requestSettings.type.toUpperCase() === "GET" ) {
			if ( !CALLBACK_REGEX.test( requestSettings.url ) ) {
				requestSettings.url += (/\?/.test( requestSettings.url ) ? "&" : "?") +
					(requestSettings.jsonp || "callback") + "=?";
			}
		} else if ( !requestSettings.data || !CALLBACK_REGEX.test(requestSettings.data) ) {
			requestSettings.data = (requestSettings.data ? requestSettings.data + "&" : "") + (requestSettings.jsonp || "callback") + "=?";
		}
	}
function processJsonpUrl( requestSettings ) {
		if ( requestSettings.type.toUpperCase() === "GET" ) {
			if ( !CALLBACK_REGEX.test( requestSettings.url ) ) {
				requestSettings.url += (/\?/.test( requestSettings.url ) ? "&" : "?") +
					(requestSettings.jsonp || "callback") + "=?";
			}
		} else if ( !requestSettings.data || !CALLBACK_REGEX.test(requestSettings.data) ) {
			requestSettings.data = (requestSettings.data ? requestSettings.data + "&" : "") + (requestSettings.jsonp || "callback") + "=?";
		}
	}
function processJsonpUrl ( requestSettings ) { if ( requestSettings . type . toUpperCase ( ) === "GET" ) { if ( ! CALLBACK_REGEX . test ( requestSettings . url ) ) { requestSettings . url += ( / \? / . test ( requestSettings . url ) ? "&" : "?" ) + ( requestSettings . jsonp || "callback" ) + "=?" ; } } else if ( ! requestSettings . data || ! CALLBACK_REGEX . test ( requestSettings . data ) ) { requestSettings . data = ( requestSettings . data ? requestSettings . data + "&" : "" ) + ( requestSettings . jsonp || "callback" ) + "=?" ; } }
Append the required callback parameter to the end of the request URL, for a JSONP request
Append the required callback parameter to the end of the request URL for a JSONP request