Methods
checkDomain(url) → {string}
Return the domain of a given URL.
Parameters
-
url
stringInput URL.
Returns
-
stringURL domain.
Source
copyToClipboard(text) → {boolean}
Copy the input string to the clipboard.
Parameters
-
text
stringInput string.
Returns
-
booleanfalseif copy failed.
Source
flashElement(elem)
Add a short (<400ms) "flash" animation to an element.
Parameters
-
elem
objectElement to be "flashed".
Source
getCookie(cname) → {string}
Return the value of the cookie with the given name.
Parameters
-
cname
stringCookie name.
Returns
-
stringCookie string.
Source
isExternal(url) → {boolean}
Check if a given URL is external.
Parameters
-
url
stringInput URL.
Returns
-
booleantrueif the input URL is external,falseotherwise.
Source
parseURL(url) → {Object.<string, string>}
Return a dictionary of keyword/value pairs from a URL string.
Parameters
-
url
stringURL.
Returns
-
Object.<string, string>Dictionary of keyword/value pairs.
Source
readFITSKey(keyword, str) → nullable{string}
Read the value of a FITS header keyword.
Parameters
-
keyword
stringKeyword.
-
str
stringInput string.
Returns
-
stringKeyword value string, or
nullif keyword could not be matched.
Source
requestURL(url, purpose, action, context, timeout)
Do an AJAX query to a server.
Parameters
-
url
stringServer URL.
-
purpose
stringPurpose of the query (for error messages).
-
action
VUtil~queryCallbackCallback function for successful queries.
-
context
objectContext (this).
-
timeout
numberQuery timeout in seconds.
Source
updateURL(url, keyword, value) → {string}
Return a URL with a new or updated keyword/value query string.
Parameters
-
url
stringInput URL.
-
keyword
stringkeyword.
-
value
number|stringvalue.
Returns
-
stringUpdated URL.
Source
Type Definitions
queryCallback(context, httpRequest)
Callback for Ajax queries.
Parameters
-
context
objectContext (this).
-
httpRequest
objectXMLHttpRequest object.