[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [torbirdy/develop] Refactor.
commit 7fc8da14e00d2e6d2436358ffd509e81527bdfa6
Author: anonym <anonym@xxxxxxxxxx>
Date: Fri Mar 18 16:51:09 2016 +0100
Refactor.
---
chrome/content/preferences.js | 40 ++++++++++++----------------------------
1 file changed, 12 insertions(+), 28 deletions(-)
diff --git a/chrome/content/preferences.js b/chrome/content/preferences.js
index 1359f63..de77205 100644
--- a/chrome/content/preferences.js
+++ b/chrome/content/preferences.js
@@ -37,36 +37,20 @@ if (!org.torbirdy.prefs) org.torbirdy.prefs = new function() {
};
pub.setEnigmailPrefs = function(anonService) {
+ var opts = "";
if (pub.prefs.getBoolPref("extensions.torbirdy.enigmail.throwkeyid")) {
- if (anonService === "tor") {
- return "--no-emit-version " +
- "--no-comments " +
- "--throw-keyids " +
- "--display-charset utf-8 " +
- "--keyserver-options no-auto-key-retrieve,no-try-dns-srv,http-proxy=http://127.0.0.1:8118";
- }
- if (anonService === "jondo") {
- return "--no-emit-version " +
- "--no-comments " +
- "--throw-keyids " +
- "--display-charset utf-8 " +
- "--keyserver-options no-auto-key-retrieve,no-try-dns-srv,http-proxy=http://127.0.0.1:4001";
- }
- }
- else {
- if (anonService === "tor") {
- return "--no-emit-version " +
- "--no-comments " +
- "--display-charset utf-8 " +
- "--keyserver-options no-auto-key-retrieve,no-try-dns-srv,http-proxy=http://127.0.0.1:8118";
- }
- if (anonService === "jondo") {
- return "--no-emit-version " +
- "--no-comments " +
- "--display-charset utf-8 " +
- "--keyserver-options no-auto-key-retrieve,no-try-dns-srv,http-proxy=http://127.0.0.1:4001";
- }
+ opts += "--throw-keyids ";
}
+ var proxy = "http-proxy=http://127.0.0.1:8118";
+ if (anonService === "jondo") {
+ proxy = "http://127.0.0.1:4001";
+ }
+ return opts +
+ "--no-emit-version " +
+ "--no-comments " +
+ "--display-charset utf-8 " +
+ "--keyserver-options no-auto-key-retrieve,no-try-dns-srv,http-proxy=" +
+ proxy;
};
pub.updateKeyserver = function(anonService) {
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits