Skip to content

Commit 31a7d80

Browse files
author
Aaron Vegh
committed
Improve screening for Outlook vs IE
1 parent c872d6c commit 31a7d80

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/browser.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ def chrome?
313313

314314
# Detect if browser is Internet Explorer.
315315
def ie?
316-
!!(ua =~ /MSIE/ && ua !~ /Opera/ && ua !~ /MSOffice/)
316+
!!(ua =~ /MSIE/ && ua !~ /Opera/ && ua !~ /MSOffice/ && ua !~ /Outlook/)
317317
end
318318

319319
# Detect if browser is Internet Explorer 6.
@@ -367,11 +367,11 @@ def tablet?
367367
end
368368

369369
def outlook2010?
370-
!!(ua =~ /MSOffice 14/)
370+
!!(ua =~ /MSOffice 14/ || ua =~ /Microsoft Outlook 14/)
371371
end
372372

373373
def outlook2007?
374-
!!(ua =~ /MSOffice 12/)
374+
!!(ua =~ /MSOffice 12/ || ua =~ /Microsoft Outlook 12/)
375375
end
376376

377377
def thunderbird?

0 commit comments

Comments
 (0)