Methods
checkDomain(url) → {string}
Return the domain of a given URL.
Parameters
-
url
string
Input URL.
Returns
-
string
URL domain.
Source
copyToClipboard(text) → {boolean}
Copy the input string to the clipboard.
Parameters
-
text
string
Input string.
Returns
-
boolean
false
if copy failed.
Source
flashElement(elem)
Add a short (<400ms) "flash" animation to an element.
Parameters
-
elem
object
Element to be "flashed".
Source
getCookie(cname) → {string}
Return the value of the cookie with the given name.
Parameters
-
cname
string
Cookie name.
Returns
-
string
Cookie string.
Source
isExternal(url) → {boolean}
Check if a given URL is external.
Parameters
-
url
string
Input URL.
Returns
-
boolean
true
if the input URL is external,false
otherwise.
Source
parseURL(url) → {Object.<string, string>}
Return a dictionary of keyword/value pairs from a URL string.
Parameters
-
url
string
URL.
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
string
Keyword.
-
str
string
Input string.
Returns
-
string
Keyword value string, or
null
if keyword could not be matched.
Source
requestURL(url, purpose, action, context, timeout)
Do an AJAX query to a server.
Parameters
-
url
string
Server URL.
-
purpose
string
Purpose of the query (for error messages).
-
action
VUtil~queryCallback
Callback function for successful queries.
-
context
object
Context (this).
-
timeout
number
Query timeout in seconds.
Source
updateURL(url, keyword, value) → {string}
Return a URL with a new or updated keyword/value query string.
Parameters
-
url
string
Input URL.
-
keyword
string
keyword.
-
value
number
|string
value.
Returns
-
string
Updated URL.
Source
Type Definitions
queryCallback(context, httpRequest)
Callback for Ajax queries.
Parameters
-
context
object
Context (this).
-
httpRequest
object
XMLHttpRequest object.