Skip to content

Commit

Permalink
add browser detection
Browse files Browse the repository at this point in the history
  • Loading branch information
fabianrbz authored and Raven24 committed Feb 23, 2014
1 parent 97ede99 commit f0ae80b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/assets/javascripts/browser_detection.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
jQuery.browser = {};
jQuery.browser.mozilla = /mozilla/.test(navigator.userAgent.toLowerCase()) && !/webkit/.test(navigator.userAgent.toLowerCase());
jQuery.browser.webkit = /webkit/.test(navigator.userAgent.toLowerCase());
jQuery.browser.opera = /opera/.test(navigator.userAgent.toLowerCase());
jQuery.browser.msie = /msie/.test(navigator.userAgent.toLowerCase());
1 change: 1 addition & 0 deletions app/assets/javascripts/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
//= require jquery.placeholder
//= require rails-timeago
//= require facebox
//= require browser_detection
//= require jquery.events.input
//= require jquery.elastic
//= require jquery.mentionsInput
Expand Down

0 comments on commit f0ae80b

Please sign in to comment.