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?)

android?

(android?)

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

chrome-os?

(chrome-os?)

chrome?

(chrome?)

coast?

(coast?)

edge?

(edge?)

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

firefox?

(firefox?)

gecko?

(gecko?)

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

get-platform

(get-platform)
Returns a keyword with the Platform 
Possible return values: 
  :android
  :chrome-os
  :ios
  :ipad
  :iphone
  :ipod
  :linux
  :mac
  :windows
  :unknown

ie?

(ie?)

ios?

(ios?)

ipad?

(ipad?)

iphone?

(iphone?)

ipod?

(ipod?)

linux?

(linux?)

mac?

(mac?)

opera?

(opera?)

platform-version

(platform-version)
Returns the platform version. Returns "" for Linux.

platform>=

(platform>= version)
Whether the running platform version is higher or the same (>=) as the 
 given version.
(running-platform-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

presto?

(presto?)

safari?

(safari?)

screen

(screen)
Returns the size of the inner screen in px in a vector [x y]
Ex: [1600 720]

silk?

(silk?)

trident?

(trident?)

webkit?

(webkit?)

webview?

(webview?)

windows?

(windows?)