[Pkg-mozext-commits] [scrapbook] 01/05: Imported Upstream version 1.5.12
David Prévot
taffit at moszumanska.debian.org
Fri Mar 13 15:50:45 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository scrapbook.
commit e17935af837bfb666e273b25e6d510dce165ec4a
Author: David Prévot <david at tilapin.org>
Date: Fri Mar 13 10:56:50 2015 -0400
Imported Upstream version 1.5.12
---
LICENSE.txt | 2 +-
chrome/content/scrapbook/saver.js | 5 ++++-
install.rdf | 6 +++---
modules/utils.jsm | 13 ++++++++++++-
4 files changed, 20 insertions(+), 6 deletions(-)
diff --git a/LICENSE.txt b/LICENSE.txt
index 82aa128..6fb4876 100644
--- a/LICENSE.txt
+++ b/LICENSE.txt
@@ -14,7 +14,7 @@
* The Original Code is ScrapBook.
*
* The Initial Developer of the Original Code is Gomita.
- * Portions created by the Initial Developer are Copyright (C) 2014
+ * Portions created by the Initial Developer are Copyright (C) 2015
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
diff --git a/chrome/content/scrapbook/saver.js b/chrome/content/scrapbook/saver.js
index 3ba24b9..6a819cb 100755
--- a/chrome/content/scrapbook/saver.js
+++ b/chrome/content/scrapbook/saver.js
@@ -708,7 +708,10 @@ var sbContentSaver = {
var WBP = Cc['@mozilla.org/embedding/browser/nsWebBrowserPersist;1'].createInstance(Ci.nsIWebBrowserPersist);
WBP.persistFlags |= WBP.PERSIST_FLAGS_FROM_CACHE;
WBP.persistFlags |= WBP.PERSIST_FLAGS_AUTODETECT_APPLY_CONVERSION;
- WBP.saveURI(aURL, null, refURL, null, null, targetFile, null);
+ if (ScrapBookUtils.FX36)
+ WBP.saveURI(aURL, null, refURL, Ci.nsIHttpChannel.REFERRER_POLICY_NO_REFERRER_WHEN_DOWNGRADE, null, null, targetFile, null);
+ else
+ WBP.saveURI(aURL, null, refURL, null, null, targetFile, null);
this.httpTask[this.item.id]++;
WBP.progressListener = new sbCaptureObserver(this.item, newFileName);
this.file2URL[newFileName] = aURLSpec;
diff --git a/install.rdf b/install.rdf
index 76032ea..80ca206 100644
--- a/install.rdf
+++ b/install.rdf
@@ -7,7 +7,7 @@
<em:id>{53A03D43-5363-4669-8190-99061B2DEBA5}</em:id>
<em:type>2</em:type>
<em:name>ScrapBook</em:name>
- <em:version>1.5.11</em:version>
+ <em:version>1.5.12</em:version>
<em:description>Helps you to save Web pages and organize the collection.</em:description>
<em:creator>Gomita</em:creator>
<em:localized>
@@ -197,8 +197,8 @@
<em:targetApplication>
<Description>
<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
- <em:minVersion>24.0</em:minVersion>
- <em:maxVersion>35.0a1</em:maxVersion>
+ <em:minVersion>31.0</em:minVersion>
+ <em:maxVersion>36.*</em:maxVersion>
</Description>
</em:targetApplication>
</Description>
diff --git a/modules/utils.jsm b/modules/utils.jsm
index 7ae7d2b..01f5d68 100644
--- a/modules/utils.jsm
+++ b/modules/utils.jsm
@@ -6,6 +6,14 @@ const ScrapBookUtils = {
get namespace() { return "http://amb.vis.ne.jp/mozilla/scrapbook-rdf#"; },
+ get FX36() {
+ var vc = Cc["@mozilla.org/xpcom/version-comparator;1"].getService(Ci.nsIVersionComparator);
+ var ver = Cc["@mozilla.org/xre/app-info;1"].getService(Ci.nsIXULAppInfo).version;
+ var cmp = vc.compare(ver, "36.0") >= 0;
+ this.__defineGetter__("FX36", function() cmp);
+ return cmp;
+ },
+
getScrapBookDir: function SBU_getScrapBookDir() {
var dir;
@@ -231,7 +239,10 @@ const ScrapBookUtils = {
createInstance(Ci.nsIWebBrowserPersist);
var privacyContext = this.getBrowserWindow().QueryInterface(Ci.nsIInterfaceRequestor).
getInterface(Ci.nsIWebNavigation).QueryInterface(Ci.nsILoadContext);
- persist.saveURI(uri, null, null, null, null, aFile, privacyContext);
+ if (this.FX36)
+ persist.saveURI(uri, null, null, Ci.nsIHttpChannel.REFERRER_POLICY_NO_REFERRER_WHEN_DOWNGRADE, null, null, aFile, privacyContext);
+ else
+ persist.saveURI(uri, null, null, null, null, aFile, privacyContext);
},
convertToUnicode: function SBU_convertToUnicode(aString, aCharset) {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/scrapbook.git
More information about the Pkg-mozext-commits
mailing list