jQuery.telligent.evolution.url
Methods for parsing and manipulating URLs, query strings, and hashes.
Methods
parseQuery
Returns an object representation of the query strings key/value pairs. queryString
can optionally include '?' or '#' which will be ignored as bounds
$.telligent.evolution.url.parseQuery(queryString)
serializeQuery
Converts key/value pairs into a new query string
$.telligent.evolution.url.serializeQuery(data)
modify
Modifies a URL with the values from a given query string and hash. If url
is not specified, the current URL is used. query
and hash
are optional and, if not provided, will result in no modifications to that component of the URL.
$.telligent.evolution.url.modify(options)
options:
url
: URL to modify. (default: current)query
: Map of keys/values to add/replace in the query stringhash
: Map of keys/values to add/replace in the hashprotocol
: Protocol, defaulting to current page's
hashData
Returns an object key/value pair of the existing querystring-encoded data that's in the current hash
$.telligent.evolution.url.hashData()
hashData
Adds/updates key/value pairs with the existing pairs in the hash and updates the current hash
$.telligent.evolution.url.hashData(data, options)
options:
overrideCurrent
: when true, replaces all items in the hash with only those providedprefix
: prefixes each key in the serialized hash with the optional value provided
encode
Returns the URL-encoded version of text
$.telligent.evolution.url.encode(text)
decode
Returns the URL-decoded version of text
$.telligent.evolution.url.decode(text)
encodePathComponent
Returns the URL-path-component-encoded version of text. This is the lossless format used in Evolution for data within URL paths.
$.telligent.evolution.url.encodePathComponent(text)
decodePathComponent
Returns the URL-path-component-decoded version of text.
$.telligent.evolution.url.decodePathComponent(data)
encodeFileComponent
Returns the URL-file-component-encoded version of text. This is the lossless format used in Evolution for data within URL file name.
$.telligent.evolution.url.encodeFileComponent(text)
decodeFileComponent
Returns the URL-file-component-decoded version of text.
$.telligent.evolution.url.decodeFileComponent(data)
navigateTo
Navigates to the provided URL and honors any base URL targets.
$.telligent.evolution.url.navigateTo(url)