Skip to content

Instantly share code, notes, and snippets.

@Heavyblade
Created June 29, 2012 21:49
Show Gist options
  • Select an option

  • Save Heavyblade/3020870 to your computer and use it in GitHub Desktop.

Select an option

Save Heavyblade/3020870 to your computer and use it in GitHub Desktop.
def self.user_agent(mybrowser)
case mybrowser
when /MSIE/ then "Internet Explorer"
when /Firefox/ then "Mozilla Firefox"
when /Opera/ then "Opera"
when /Safari/ then "Safari"
when /Chrome/ then "Google Chrome"
when /Camino/ then "Camino"
when /Dillo/ then "Dillo"
when /Epiphany/ then "Epiphany"
when /Firebird/ then "Mozilla Firebird"
when /Thunderbird/ then "Mozilla Thunderbird"
when /Galeon/ then "Mozilla Galeon"
when /IBrowse/ then "IBrowse"
when /iCab/ then "iCab"
when /K-Meleon/ then "K-Meleon"
when /Konqueror/ then "Konqueror"
when /SeaMonkey/ then "SeaMonkey"
when /Netscape/ then "Netscape"
when /OmniWeb/ then "OmniWeb"
else "Unknown"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment