[Pkg-privacy-commits] [xul-ext-monkeysphere] 49/296: modify extension to display response from agent in status bar tooltip
Ximin Luo
infinity0 at moszumanska.debian.org
Mon Aug 24 07:39:24 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 c38748fc06cef7d60dfb2e0275e75d6785f24756
Author: Jameson Rollins <jrollins at finestructure.net>
Date: Tue Jan 12 01:52:41 2010 -0500
modify extension to display response from agent in status bar tooltip
---
chrome/content/monkeysphere.js | 26 ++++++++++++--------------
chrome/locale/en-US/messages | 2 --
2 files changed, 12 insertions(+), 16 deletions(-)
diff --git a/chrome/content/monkeysphere.js b/chrome/content/monkeysphere.js
index a5b7238..5ac3fcc 100644
--- a/chrome/content/monkeysphere.js
+++ b/chrome/content/monkeysphere.js
@@ -142,7 +142,9 @@ var monkeysphere = {
// if tooltip not specified, use the current one
if(!tooltip) {
- //tooltip = t.getAttribute("tooltiptext");
+ tooltip = panel.getAttribute("tooltiptext");
+ }
+ if(!tooltip) {
tooltip = "Monkeysphere";
}
@@ -238,9 +240,8 @@ var monkeysphere = {
// check if exception has already been granted this session
monkeysphere.log("main", "checking override status:");
if(monkeysphere.checkOverrideStatus(uri)) {
- monkeysphere.log("main", " override set. valid!");
- monkeysphere.setStatus(monkeysphere.states.VAL,
- monkeysphere.messages.getString("statusValid"));
+ monkeysphere.log("main", " override set. verified!");
+ monkeysphere.setStatus(monkeysphere.states.VAL);
return;
} else {
monkeysphere.log("main", " no override.");
@@ -344,18 +345,15 @@ var monkeysphere = {
if (client.status == 200) {
var response = JSON.parse(client.responseText);
monkeysphere.log("query", "validation agent response:");
+ monkeysphere.log("query", " message: " + response.message);
if (response.valid) {
- monkeysphere.log("query", " site valid!");
- monkeysphere.securityOverride(browser, cert);
+ monkeysphere.log("query", " site verified!");
+ monkeysphere.securityOverride(browser, cert, response);
} else {
- monkeysphere.log("query", " site invalid.");
+ monkeysphere.log("query", " site not verified.");
monkeysphere.setStatus(monkeysphere.states.INV,
- monkeysphere.messages.getString("statusInvalid"));
- return;
+ "Monkeysphere: " + response.message);
}
- if (response.message) {
- monkeysphere.log("query", " agent message: " + response.message);
- }
} else {
monkeysphere.log("error", "validation agent did not respond");
monkeysphere.setStatus(monkeysphere.states.ERR,
@@ -393,7 +391,7 @@ var monkeysphere = {
////////////////////////////////////////////////////////////
// browser security override function
- securityOverride: function(browser, cert) {
+ securityOverride: function(browser, cert, agent_response) {
monkeysphere.log("policy", "**** CERT SECURITY OVERRIDE REQUESTED ****");
var uri = browser.currentURI;
@@ -434,7 +432,7 @@ var monkeysphere = {
// set status valid!
monkeysphere.setStatus(monkeysphere.states.VAL,
- monkeysphere.messages.getString("statusValid"));
+ "Monkeysphere: " + agent_response.message);
monkeysphere.log("policy", "browser reload");
// FIXME: why the "timeout"? what's it for?
diff --git a/chrome/locale/en-US/messages b/chrome/locale/en-US/messages
index 1e2b404..a6dd3d2 100644
--- a/chrome/locale/en-US/messages
+++ b/chrome/locale/en-US/messages
@@ -18,5 +18,3 @@ statusNoCert=Monkeysphere: unable to retrieve a certificate for %1$S
statusAlreadyValid=Monkeysphere: site already trusted.
statusNeedsPermission=Monkeysphere: permission required to query validation agent.
statusInProgress=Monkeysphere: querying validation agent...
-statusValid=Monkeysphere: this site has been Monkeysphere validated!
-statusInvalid=Monkeysphere: this site could not be validated.
--
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