Update protocol handler for FF56+

Este commit está contenido en:
JustOff
2017-11-11 01:52:05 +02:00
padre 6db8958628
commit 677a5e8316
Se han modificado 2 ficheros con 8 adiciones y 2 borrados

9
bootstrap.js vendido
Ver fichero

@@ -10,6 +10,7 @@ const CAA_URL ="chrome://ca-archive/content/ca-archive.html";
const CAA_URI = Services.io.newURI(CAA_URL, null, null); const CAA_URI = Services.io.newURI(CAA_URL, null, null);
const nsIURI = CC("@mozilla.org/network/simple-uri;1", "nsIURI"); const nsIURI = CC("@mozilla.org/network/simple-uri;1", "nsIURI");
const ff47plus = (Services.vc.compare(Services.appinfo.version, 47) > 0);
const CAA_MODULES = [ const CAA_MODULES = [
"chrome://ca-archive/content/about.js", "chrome://ca-archive/content/about.js",
@@ -224,9 +225,13 @@ CAAProtocolHandler.prototype = Object.freeze({
return rv; return rv;
}, },
newChannel: function(aURI, aSecurity_or_aLoadInfo) { newChannel: function(aURI) {
return this.newChannel2(aURI, null);
},
newChannel2: function(aURI, aSecurity_or_aLoadInfo) {
let channel; let channel;
if (Services.vc.compare(Services.appinfo.version, 47) > 0) { if (aSecurity_or_aLoadInfo || ff47plus) {
let uri = Services.io.newURI(CAA_URL, null, null); let uri = Services.io.newURI(CAA_URL, null, null);
channel = Services.io.newChannelFromURIWithLoadInfo(uri, aSecurity_or_aLoadInfo); channel = Services.io.newChannelFromURIWithLoadInfo(uri, aSecurity_or_aLoadInfo);
} else { } else {

Ver fichero

@@ -5,6 +5,7 @@
<em:version>1.0.6</em:version> <em:version>1.0.6</em:version>
<em:type>2</em:type> <em:type>2</em:type>
<em:bootstrap>true</em:bootstrap> <em:bootstrap>true</em:bootstrap>
<em:multiprocessCompatible>false</em:multiprocessCompatible>
<em:name>Classic Add-ons Archive</em:name> <em:name>Classic Add-ons Archive</em:name>
<em:description>Catalog of classic Firefox add-ons created before WebExtensions apocalypse</em:description> <em:description>Catalog of classic Firefox add-ons created before WebExtensions apocalypse</em:description>
<em:creator>Off JustOff &lt;Off.Just.Off@gmail.com&gt;</em:creator> <em:creator>Off JustOff &lt;Off.Just.Off@gmail.com&gt;</em:creator>