[Pkg-privacy-commits] [xul-ext-monkeysphere] 199/296: move isRelevantURI function to module
Ximin Luo
infinity0 at moszumanska.debian.org
Mon Aug 24 07:39:40 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 c99775d5c608a08fe21e1fbef8d5f82d775035d2
Author: Jameson Rollins <jrollins at finestructure.net>
Date: Sun Apr 25 13:59:49 2010 -0400
move isRelevantURI function to module
---
chrome/content/monkeysphere.js | 40 +---------------------------------------
modules/monkeysphere.jsm | 39 +++++++++++++++++++++++++++++++++++++++
2 files changed, 40 insertions(+), 39 deletions(-)
diff --git a/chrome/content/monkeysphere.js b/chrome/content/monkeysphere.js
index 4b68a76..90a14e5 100644
--- a/chrome/content/monkeysphere.js
+++ b/chrome/content/monkeysphere.js
@@ -28,44 +28,6 @@ var monkeysphere = (function() {
// NOTVALID : processed and not validated
////////////////////////////////////////////////////////////
-// SITE URI CHECK FUNCTION
-////////////////////////////////////////////////////////////
-
- //////////////////////////////////////////////////////////
- // check uri is relevant to monkeysphere
- var isRelevantURI = function(uri) {
- ////////////////////////////////////////
- // check host
- try {
- var host = uri.host;
- } catch(e) {
- ms.log("host data empty.");
- return null;
- }
-
- ////////////////////////////////////////
- // check scheme
- try {
- var scheme = uri.scheme;
- } catch(e) {
- ms.log("scheme data empty.");
- return null;
- }
-
- ms.log("url: " + uri.asciiSpec);
-
- ////////////////////////////////////////
- // check if scheme is https
- if(scheme != "https") {
- ms.log("scheme not https.");
- return null;
- }
-
- // if uri is relevant for monkeysphere return true
- return true;
- };
-
-////////////////////////////////////////////////////////////
// MAIN SITE CHECK FUNCTION
////////////////////////////////////////////////////////////
@@ -77,7 +39,7 @@ var monkeysphere = (function() {
var uri = browser.currentURI;
// if uri not relevant, return
- if(!isRelevantURI(uri)) {
+ if(!ms.isRelevantURI(uri)) {
setStatus(browser, 'NEUTRAL');
return;
}
diff --git a/modules/monkeysphere.jsm b/modules/monkeysphere.jsm
index 4b49b2a..1037736 100644
--- a/modules/monkeysphere.jsm
+++ b/modules/monkeysphere.jsm
@@ -20,6 +20,7 @@
var EXPORTED_SYMBOLS = [
"agent_socket",
"log",
+ "isRelevantURI",
"getInvalidCert",
"overrides"
];
@@ -90,6 +91,44 @@ var EXPORTED_SYMBOLS = [
}
};
+////////////////////////////////////////////////////////////
+// SITE URI CHECK FUNCTION
+////////////////////////////////////////////////////////////
+
+ //////////////////////////////////////////////////////////
+ // check uri is relevant to monkeysphere
+ var isRelevantURI = function(uri) {
+ ////////////////////////////////////////
+ // check host
+ try {
+ var host = uri.host;
+ } catch(e) {
+ log("host data empty.");
+ return null;
+ }
+
+ ////////////////////////////////////////
+ // check scheme
+ try {
+ var scheme = uri.scheme;
+ } catch(e) {
+ log("scheme data empty.");
+ return null;
+ }
+
+ log("url: " + uri.asciiSpec);
+
+ ////////////////////////////////////////
+ // check if scheme is https
+ if(scheme != "https") {
+ log("scheme not https.");
+ return null;
+ }
+
+ // if uri is relevant for monkeysphere return true
+ return true;
+ };
+
////////////////////////////////////////////////////////////
// CERT FUNCTIONS
////////////////////////////////////////////////////////////
--
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