From a73cf27e83da68363ab735ad35488ee6fdc8a136 Mon Sep 17 00:00:00 2001 From: Preole Date: Sat, 8 Feb 2014 19:23:34 -0800 Subject: [PATCH] Change Firefox Detection Method Instead of using `navigator.userAgent` string to test for Mozilla Firefox (Which can be spoofed), it may be more robust to use the proprietary `InstallTrigger` variable present in all gecko-based browsers, including Firefox. Source: --- bean.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bean.js b/bean.js index 78b74ae..e0350b9 100644 --- a/bean.js +++ b/bean.js @@ -91,7 +91,7 @@ return { mouseenter: { base: 'mouseover', condition: check } , mouseleave: { base: 'mouseout', condition: check } - , mousewheel: { base: /Firefox/.test(navigator.userAgent) ? 'DOMMouseScroll' : 'mousewheel' } + , mousewheel: { base: !(typeof InstallTrigger == 'undefined') ? 'DOMMouseScroll' : 'mousewheel' } } }()) @@ -738,4 +738,4 @@ setSelectorEngine() return bean -}); \ No newline at end of file +});