[Pkg-privacy-commits] [xul-ext-monkeysphere] 44/296: Remove preferences.
Ximin Luo
infinity0 at moszumanska.debian.org
Mon Aug 24 07:39:23 UTC 2015
This is an automated email from the git hooks/post-receive script.
infinity0 pushed a commit to branch debian
in repository xul-ext-monkeysphere.
commit 679c7cb8c74d2d18bf648301c61613b0905be9f5
Author: Jameson Rollins <jrollins at finestructure.net>
Date: Sun Jan 10 15:48:54 2010 -0500
Remove preferences.
We decided that we don't really need a prompt for querying the agent,
since installation of extension already indicates desire to use
monkeysphere. Given that this was really the only preference being
used at the moment, I remove all the preference infrastructure here,
in the name of simplicity. If we need preferences down the line we
can re-add.
---
chrome/content/dialog_prefs.js | 1 -
chrome/content/dialog_prefs.xul | 44 -----------------------------------------
chrome/content/initialize.xul | 8 +-------
chrome/content/monkeysphere.js | 23 +++------------------
chrome/content/statusbar.js | 8 --------
chrome/content/statusbar.xul | 5 -----
defaults/preferences/prefs.js | 3 ---
7 files changed, 4 insertions(+), 88 deletions(-)
diff --git a/chrome/content/dialog_prefs.js b/chrome/content/dialog_prefs.js
deleted file mode 100644
index 69c5297..0000000
--- a/chrome/content/dialog_prefs.js
+++ /dev/null
@@ -1 +0,0 @@
-var root_prefs = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
diff --git a/chrome/content/dialog_prefs.xul b/chrome/content/dialog_prefs.xul
deleted file mode 100644
index 0e1203d..0000000
--- a/chrome/content/dialog_prefs.xul
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
-<!DOCTYPE prefwindow SYSTEM "chrome://monkeysphere/locale/dialogs.dtd">
-
-<prefwindow id="monkeysphere-properties"
- title="Monkeysphere Preferences"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- buttons=",">
-
-<prefpane id="monkeysphere-main-prefpane">
-
-<preferences>
- <preference id="check-good"
- name="monkeysphere.check_good_certificates"
- type="bool" />
- <preference id="require-user-permission"
- name="monkeysphere.require_user_permission"
- type="bool" />
-</preferences>
-
-<dialogheader title="Monkeysphere" />
-
-<groupbox>
- <caption label="&WhentoConsultMonkeysphere;" style="font-weight: bold" />
- <radiogroup preference="check-good">
- <radio label="&ConsultMonkeysphereforallHTTPSsites;"
- value="true" />
- <radio label="&ConsultMonkeysphereonlywhenawebsitescertificatecausesasecurityerror;"
- value="false" />
- </radiogroup>
- <checkbox label="&AlwaysasktheuserbeforeconsultingMonkeysphere;"
- preference="require-user-permission" />
-</groupbox>
-
-<hbox>
- <spacer flex="1"/>
- <button label="&OK;" onclick="acceptDialog(); window.close()"/>
-</hbox>
-
-</prefpane>
-
-<script type="application/x-javascript" src="dialog_prefs.js"/>
-
-</prefwindow>
diff --git a/chrome/content/initialize.xul b/chrome/content/initialize.xul
index 9103e4f..ac4b73b 100644
--- a/chrome/content/initialize.xul
+++ b/chrome/content/initialize.xul
@@ -6,13 +6,7 @@
<script type="application/x-javascript" src="monkeysphere.js" />
<script type="text/javascript">
- window.addEventListener('load',evtLoad,false);
- function evtLoad(evt) {
- monkeysphere.init();
- if(!monkeysphere.preferences.getBoolPref("monkeysphere.show_label")){
- document.getElementById("monkeysphere-statusbar-label").hidden = true;
- }
- }
+ window.addEventListener('load', monkeysphere.init, false);
</script>
</overlay>
diff --git a/chrome/content/monkeysphere.js b/chrome/content/monkeysphere.js
index 0ec49e3..820a7db 100644
--- a/chrome/content/monkeysphere.js
+++ b/chrome/content/monkeysphere.js
@@ -11,9 +11,6 @@ var monkeysphere = {
TRANS: false, // bool to indicate state
- // get extension preferences
- preferences: Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranchInternal),
-
// override service class
// http://www.oxymoronical.com/experiments/xpcomref/applications/Firefox/3.5/interfaces/nsICertOverrideService
override: Components.classes["@mozilla.org/security/certoverride;1"].getService(Components.interfaces.nsICertOverrideService),
@@ -267,13 +264,9 @@ var monkeysphere = {
// if site secure, return
if(state & Ci.nsIWebProgressListener.STATE_IS_SECURE) {
monkeysphere.log("main", " site cert already trusted by browser. ignoring.");
- // and force check not set
- if(!monkeysphere.preferences.getBoolPref("monkeysphere.check_good_certificates")) {
- monkeysphere.log("main", "preferences don't require check");
- monkeysphere.setStatus(monkeysphere.states.NEU,
- monkeysphere.messages.getString("statusAlreadyValid"));
- return;
- }
+ monkeysphere.setStatus(monkeysphere.states.NEU,
+ monkeysphere.messages.getString("statusAlreadyValid"));
+ return;
// if site insecure continue
} else if(state & Ci.nsIWebProgressListener.STATE_IS_INSECURE) {
monkeysphere.log("main", " state INSECURE. query agent...");
@@ -282,16 +275,6 @@ var monkeysphere = {
monkeysphere.log("main", " state UNKNOWN. query agent...");
}
- // check if user permission required. if so, call notification and return
- if(monkeysphere.preferences.getBoolPref("monkeysphere.require_user_permission")
- && !has_user_permission) {
- monkeysphere.log("main", "user permission required");
- monkeysphere.notify.needsPermission(browser);
- monkeysphere.setStatus(monkeysphere.states.NEU,
- monkeysphere.messages.getString("statusNeedsPermission"));
- return;
- }
-
// finally go ahead and query the agent
monkeysphere.log("main", "#### querying validation agent ####");
monkeysphere.queryAgent(browser, cert);
diff --git a/chrome/content/statusbar.js b/chrome/content/statusbar.js
index f21547c..38b0b72 100644
--- a/chrome/content/statusbar.js
+++ b/chrome/content/statusbar.js
@@ -10,14 +10,6 @@ monkeysphere.dialog = {
"monkeysphereResults", "centerscreen, chrome, toolbar").focus();
},
- prefs: function() {
- window.openDialog(
- //window.open( // for debug
- "chrome://monkeysphere/content/dialog_prefs.xul",
- //"monkeysphereResults", "").focus(); // for debug
- "monkeysphereResults", "centerscreen, chrome, toolbar").focus();
- },
-
certs: function() {
openDialog("chrome://pippki/content/certManager.xul", "Certificate Manager");
},
diff --git a/chrome/content/statusbar.xul b/chrome/content/statusbar.xul
index fdc482e..2d4a2ba 100644
--- a/chrome/content/statusbar.xul
+++ b/chrome/content/statusbar.xul
@@ -25,11 +25,6 @@
<popupset>
<popup id="monkeysphere-contextmenu" position="after_start">
- <menuitem label="View Monkeysphere Status"
- oncommand="monkeysphere.dialog.results()" />
- <menuseparator />
- <menuitem label="Preferences"
- oncommand="monkeysphere.dialog.prefs()" />
<menuitem label="View Certificate Store"
oncommand="monkeysphere.dialog.certs()" />
<menuitem label="Help"
diff --git a/defaults/preferences/prefs.js b/defaults/preferences/prefs.js
deleted file mode 100644
index e7b18e1..0000000
--- a/defaults/preferences/prefs.js
+++ /dev/null
@@ -1,3 +0,0 @@
-pref("monkeysphere.check_good_certificates", false);
-pref("monkeysphere.require_user_permission", true);
-pref("monkeysphere.show_label", true);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/xul-ext-monkeysphere.git
More information about the Pkg-privacy-commits
mailing list