Skip to content

Commit

Permalink
Remove Util.mightBeTBB
Browse files Browse the repository at this point in the history
Trac 31222
  • Loading branch information
arlolra committed Jul 26, 2019
1 parent 0aa5ee2 commit 8385e7c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 22 deletions.
5 changes: 0 additions & 5 deletions proxy/init-badge.js
Expand Up @@ -114,11 +114,6 @@ var debug, snowflake, config, broker, ui, log, dbg, init, update, silenceNotific
return;
}

if (Util.mightBeTBB()) {
ui.missingFeature("Will not run within Tor Browser.");
return;
}

config = new Config;
if ('off' !== query.get('ratelimit')) {
config.rateLimitBytes = Params.getByteCount(query, 'ratelimit', config.rateLimitBytes);
Expand Down
18 changes: 1 addition & 17 deletions proxy/util.js
@@ -1,4 +1,4 @@
/* exported Params, DummyRateLimit */
/* exported Util, Params, DummyRateLimit */

/*
A JavaScript WebRTC snowflake proxy
Expand All @@ -8,12 +8,6 @@ Contains helpers for parsing query strings and other utilities.

class Util {

static mightBeTBB() {
return Util.TBB_UAS.indexOf(window.navigator.userAgent) > -1 && (
window.navigator.mimeTypes && window.navigator.mimeTypes.length === 0
);
}

static genSnowflakeID() {
return Math.random().toString(36).substring(2);
}
Expand All @@ -28,16 +22,6 @@ class Util {

}

// It would not be effective for Tor Browser users to run the proxy.
// Do we seem to be running in Tor Browser? Check the user-agent string and for
// no listing of supported MIME types.
Util.TBB_UAS = [
'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',
'Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Firefox/24.0',
'Mozilla/5.0 (Windows NT 6.1; rv:31.0) Gecko/20100101 Firefox/31.0'
];


class Parse {

Expand Down

0 comments on commit 8385e7c

Please sign in to comment.