maxwell.spy
Finds out all possible information from the client,
including user-agent, screen size, browser, platform,
engine, and their respective versions
agent
(agent)
Returns the user agent string.
Ex: "Mozilla/5.0 (X11; Linux x86_64).."
agent->tuples
(agent->tuples agent)
Transforms the user-agent string into a set of tuples
Ex: [["Mozilla/5.0" "(X11; Linux x86_64)"] ["AppleWebKit/537.36 ..."]]
all-info
(all-info)
Returns a map with all available user info:
:browser
:browser-version
:platform
:platform-version
:engine
:engine-version
:screen
:agent
android-browser?
(android-browser?)
browser-version
(browser-version)
Returns a string with the version in the vendor's format
Ex: "42.0.2311.135" for Chrome
browser>=
(browser>= version)
Whether the running browser version is higher or the same (>=) as the
given version.
(running-browser-version >= given-version)
Ex: if the running version is 3 then (browser>= 2) -> (3 >= 2) -> true
if the running version is "42.0.2311.135" then
(browser>= "43") -> ("42.0.2311.135" >= "43") -> false
engine-version
(engine-version)
Gets the running engine version or "" if it can't be determined
engine>=
(engine>= version)
Whether the running engine version is higher or the same (>=) as the
given version.
(running-engine-version >= given-version)
Ex: if the running version is 3 then (engine>= 2) -> (3 >= 2) -> true
if the running version is "537.36" then
(browser>= "540") -> ("537.36" >= "540") -> false
get-browser
(get-browser)
Returns a keyword with the Browser
Possible return values:
:android-browser
:chrome
:coast
:firefox
:ie
:webview
:safari
:silk
:opera
:unknown
get-engine
(get-engine)
Returns a keyword with the Engine
Possible return values:
:gecko
:presto
:webkit
:trident
:edge
:unknown
screen
(screen)
Returns the size of the inner screen in px in a vector [x y]
Ex: [1600 720]