ProductPromotion
Logo

Elixir

made by https://0x3d.site

GitHub - danhper/elixir-browser: Browser detection for Elixir
Browser detection for Elixir. Contribute to danhper/elixir-browser development by creating an account on GitHub.
Visit Site

GitHub - danhper/elixir-browser: Browser detection for Elixir

GitHub - danhper/elixir-browser: Browser detection for Elixir

elixir-browser

ci

Browser detection for Elixir. This is a port from the Ruby browser library.

All the detection features have been ported, but not the meta and the language ones.

Installation

Add browser to your list of dependencies in mix.exs:

def deps do
  [{:browser, "~> 0.5.4"}]
end

Usage

ua = "some string"
Browser.name(ua)            # readable browser name
Browser.version(ua)         # major version number
Browser.full_version(ua)
Browser.full_browser_name(ua) # Chrome 5.0.375.99
Browser.full_display(ua)    # example: Chrome 5.0.375.99 on MacOS 10.6.4 Snow Leopard
Browser.safari?(ua)
Browser.opera?(ua)
Browser.chrome?(ua)
Browser.chrome_os?(ua)
Browser.mobile?(ua)
Browser.tablet?(ua)
Browser.console?(ua)
Browser.firefox?(ua)
Browser.ie?(ua)
Browser.ie?(ua, 6)          # detect specific IE version
Browser.edge?(ua)           # Newest MS browser
Browser.modern?(ua)         # Webkit, Firefox 17+, IE 9+ and Opera 12+
Browser.platform(ua)        # return :ios, :android, :mac, :windows, :linux or :other
Browser.full_platform_name(ua) # example: MacOS 10.6.4 Snow Leopard
Browser.device_type(ua)     # return :mobile, :tablet, :desktop, :console, :unknown
Browser.ios?(ua)            # detect iOS
Browser.ios?(ua, 9)         # detect specific iOS version
Browser.mac?(ua)
Browser.mac_version(ua)     # display version of Mac OSX. i.e. High Sierra
Browser.windows?(ua)
Browser.windows_x64?(ua)
Browser.windows_version_name # display version of Windows.  i.e. Windows 10
Browser.linux?(ua)
Browser.blackberry?(ua)
Browser.blackberry?(ua, 10) # detect specific BlackBerry version
Browser.bot?(ua)
Browser.search_engine?(ua)
Browser.phantom_js?(ua)
Browser.quicktime?(ua)
Browser.core_media?(ua)
Browser.silk?(ua)
Browser.android?(ua)
Browser.android?(ua, 4.2)   # detect Android Jelly Bean 4.2
Browser.known?(ua)          # has the browser been successfully detected?

See the original Ruby library for more information.

Elixir addition

You can also pass Plug.Conn instead of a string, the user-agent header will be extracted and used.

Browser.bot?(conn)

Configuration

You can specify custom bots.txt file in your project's config.

config :browser,
  bots_file: Path.join(File.cwd!, "bots.txt")  # bots.txt in project's root

Please note that option set as mobule attribute during compile time, so make sure you recompiled elixir-browser after changing this option or bots file itself.

Articles
to learn more about the elixir concepts.

Resources
which are currently available to browse on.

mail [email protected] to add your project or resources here 🔥.

FAQ's
to know more about the topic.

mail [email protected] to add your project or resources here 🔥.

Queries
or most google FAQ's about Elixir.

mail [email protected] to add more queries here 🔍.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory