commit 0284153e7774ade4f5369fbc5705fb76207dee69 Author: Arlo Breault arlolra@gmail.com Date: Mon Mar 11 12:33:15 2013 -0700
indexOf returns -1 if value not found --- proxy/flashproxy.js | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/proxy/flashproxy.js b/proxy/flashproxy.js index 236cf52..ddd9de3 100644 --- a/proxy/flashproxy.js +++ b/proxy/flashproxy.js @@ -928,15 +928,14 @@ function repr(x) { } }
-/* Do we seem to be running in Tor Browser? Check the user-agent string, lack of - DOM storage, and no listing of supported MIME types. */ +/* Do we seem to be running in Tor Browser? Check the user-agent string, and no listing of supported MIME types. */ var TBB_UA = [ "Mozilla/5.0 (Windows NT 6.1; rv:10.0) Gecko/20100101 Firefox/10.0", "Mozilla/5.0 (Windows NT 6.1; rv:17.0) Gecko/20100101 Firefox/17.0" ];
function is_likely_tor_browser() { - return TBB_UA.indexOf(window.navigator.userAgent) > 0 + return TBB_UA.indexOf(window.navigator.userAgent) > -1 && (window.navigator.mimeTypes && window.navigator.mimeTypes.length === 0); }
tor-commits@lists.torproject.org