Sha256: 1c79db7de2457939fea22bb8a6c22789d4033d60f438af452c440c7755d04162
Contents?: true
Size: 605 Bytes
Versions: 1
Compression:
Stored size: 605 Bytes
Contents
# frozen_string_literal: true module Browser class Chrome < Base def id :chrome end def name "Chrome" end def full_version # Each regex on its own line to enforce precedence. ua[%r{Chrome/([\d.]+)}, 1] || ua[%r{CriOS/([\d.]+)}, 1] || ua[%r{Safari/([\d.]+)}, 1] || ua[%r{AppleWebKit/([\d.]+)}, 1] || "0.0" end def match? ua =~ /Chrome|CriOS/ && ua !~ /PhantomJS|FxiOS|ArchiveBot/ && !opera? && !edge? && !duck_duck_go? && !yandex? && !sputnik? end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
browser-4.0.0 | lib/browser/chrome.rb |