Skip to content

Commit

Permalink
fix for Opera w/ blink
Browse files Browse the repository at this point in the history
  • Loading branch information
tagomoris committed Apr 2, 2014
1 parent 35c2e3d commit 80d0812
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion lib/woothee/browser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,17 @@ def self.challenge_safari_chrome(ua, result)
version = Woothee::VALUE_UNKNOWN

if ua =~ /(?:Chrome|CrMo|CriOS)\/([.0-9]+)/o
chrome_version = $1

if ua =~ /OPR\/([.0-9]+)/o
version = $1
update_map(result, Woothee::DataSet.get('Opera'))
update_version(result, version)
return true
end

# Chrome
version = $1
version = chrome_version
update_map(result, Woothee::DataSet.get('Chrome'))
update_version(result, version)
return true
Expand Down

0 comments on commit 80d0812

Please sign in to comment.