Switch download links from AMO to cloud storage
Este commit está contenido en:
@@ -10,7 +10,7 @@ The add-ons listed here have been created by a wide range of developers from ind
|
|||||||
|
|
||||||
### The source of data
|
### The source of data
|
||||||
|
|
||||||
All the data contained in this catalog was obtained from publicly available sources such as [AMO](https://addons.mozilla.org/), [Wayback Machine](http://web.archive.org/) and other open Internet directories and collections. All download links currently also point to AMO, an independent repository is under way. Any help with hosting the main data storage or mirror is highly welcomed.
|
All the data contained in this catalog was obtained from publicly available sources such as [AMO](https://addons.mozilla.org/), [Wayback Machine](http://web.archive.org/) and other open Internet directories and collections. Cloud storage is kindly provided by [Waterfox Project](https://www.waterfoxproject.org/).
|
||||||
|
|
||||||
### Legal notices
|
### Legal notices
|
||||||
|
|
||||||
|
|||||||
43
bootstrap.js
vendido
43
bootstrap.js
vendido
@@ -22,7 +22,7 @@ const CAA_MODULES = [
|
|||||||
"chrome://ca-archive/content/versions.js"
|
"chrome://ca-archive/content/versions.js"
|
||||||
];
|
];
|
||||||
|
|
||||||
let factory, gWindowListener = null, branch = "extensions.ca-archive.";
|
let factory, storageHost, gWindowListener = null, branch = "extensions.ca-archive.";
|
||||||
|
|
||||||
let styleSheetService = Cc["@mozilla.org/content/style-sheet-service;1"].getService(Ci.nsIStyleSheetService);
|
let styleSheetService = Cc["@mozilla.org/content/style-sheet-service;1"].getService(Ci.nsIStyleSheetService);
|
||||||
let styleSheetURI = Services.io.newURI("chrome://ca-archive/skin/button.css", null, null);
|
let styleSheetURI = Services.io.newURI("chrome://ca-archive/skin/button.css", null, null);
|
||||||
@@ -293,6 +293,43 @@ function Factory(component) {
|
|||||||
this.register();
|
this.register();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let httpObserver = {
|
||||||
|
observe: function(subject, topic, data) {
|
||||||
|
if (topic == "http-on-examine-response" || topic == "http-on-examine-cached-response") {
|
||||||
|
subject.QueryInterface(Ci.nsIHttpChannel);
|
||||||
|
if (subject.URI.host == storageHost) {
|
||||||
|
if (/origin=caa&action=install$/.test(subject.URI.path)) {
|
||||||
|
subject.setResponseHeader("Content-Disposition", "", false);
|
||||||
|
} else if (/origin=caa&action=download$/.test(subject.URI.path)) {
|
||||||
|
subject.setResponseHeader("Content-Disposition", "attachment", false);
|
||||||
|
}
|
||||||
|
} else if (subject.URI.host == "ca-archive.biz.tm") {
|
||||||
|
if (subject.responseStatus == "302" && /^\/storage\//.test(subject.URI.path)) {
|
||||||
|
let redirect;
|
||||||
|
if ((redirect = /^https?:\/\/(.+?)\//.exec(subject.getResponseHeader("Location"))) !== null) {
|
||||||
|
storageHost = redirect[1];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
QueryInterface: function(aIID) {
|
||||||
|
if (aIID.equals(Ci.nsIObserver) || aIID.equals(Ci.nsISupports)) {
|
||||||
|
return this;
|
||||||
|
} else {
|
||||||
|
throw Cr.NS_NOINTERFACE;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
register: function() {
|
||||||
|
Services.obs.addObserver(this, "http-on-examine-response", false);
|
||||||
|
Services.obs.addObserver(this, "http-on-examine-cached-response", false);
|
||||||
|
},
|
||||||
|
unregister: function() {
|
||||||
|
Services.obs.removeObserver(this, "http-on-examine-response");
|
||||||
|
Services.obs.removeObserver(this, "http-on-examine-cached-response");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function startup(data, reason) {
|
function startup(data, reason) {
|
||||||
if (!styleSheetService.sheetRegistered(styleSheetURI, styleSheetService.USER_SHEET)) {
|
if (!styleSheetService.sheetRegistered(styleSheetURI, styleSheetService.USER_SHEET)) {
|
||||||
styleSheetService.loadAndRegisterSheet(styleSheetURI, styleSheetService.USER_SHEET);
|
styleSheetService.loadAndRegisterSheet(styleSheetURI, styleSheetService.USER_SHEET);
|
||||||
@@ -305,6 +342,8 @@ function startup(data, reason) {
|
|||||||
defaultBranch.setCharPref("before", "");
|
defaultBranch.setCharPref("before", "");
|
||||||
defaultBranch.setCharPref("url", "caa:about");
|
defaultBranch.setCharPref("url", "caa:about");
|
||||||
|
|
||||||
|
httpObserver.register();
|
||||||
|
|
||||||
gWindowListener = new BrowserWindowObserver({
|
gWindowListener = new BrowserWindowObserver({
|
||||||
onStartup: browserWindowStartup,
|
onStartup: browserWindowStartup,
|
||||||
onShutdown: browserWindowShutdown
|
onShutdown: browserWindowShutdown
|
||||||
@@ -323,6 +362,8 @@ function shutdown(data, reason) {
|
|||||||
Services.ww.unregisterNotification(gWindowListener);
|
Services.ww.unregisterNotification(gWindowListener);
|
||||||
gWindowListener = null;
|
gWindowListener = null;
|
||||||
|
|
||||||
|
httpObserver.unregister();
|
||||||
|
|
||||||
let winenu = Services.wm.getEnumerator("navigator:browser");
|
let winenu = Services.wm.getEnumerator("navigator:browser");
|
||||||
while (winenu.hasMoreElements()) {
|
while (winenu.hasMoreElements()) {
|
||||||
browserWindowShutdown(winenu.getNext());
|
browserWindowShutdown(winenu.getNext());
|
||||||
|
|||||||
@@ -85,10 +85,9 @@ let About = {
|
|||||||
<h2>Who creates these add-ons?</h2>
|
<h2>Who creates these add-ons?</h2>
|
||||||
<p>The add-ons listed here have been created by a wide range of developers from individual hobbyists to large corporations and were reviewed by a team of AMO editors before being released. Add-ons marked as Experimental have not been reviewed and should be installed with caution.</p>
|
<p>The add-ons listed here have been created by a wide range of developers from individual hobbyists to large corporations and were reviewed by a team of AMO editors before being released. Add-ons marked as Experimental have not been reviewed and should be installed with caution.</p>
|
||||||
<h2>The source of data</h2>
|
<h2>The source of data</h2>
|
||||||
<p>All the data contained in this catalog was obtained from publicly available sources such as <a target="_blank" href="https://addons.mozilla.org">AMO</a>, <a target="_blank" href="http://web.archive.org/">Wayback Machine</a> and other open Internet directories and collections. All download links currently also point to AMO, an independent repository is under way. Any help with hosting the main data storage or mirror is highly welcomed.</p>
|
<p>All the data contained in this catalog was obtained from publicly available sources such as <a target="_blank" href="https://addons.mozilla.org">AMO</a>, <a target="_blank" href="http://web.archive.org/">Wayback Machine</a> and other open Internet directories and collections. Cloud storage is kindly provided by <a target="_blank" href="https://www.waterfoxproject.org/">Waterfox Project</a>.</p>
|
||||||
<h2>Legal notices</h2>
|
<h2>Legal notices</h2>
|
||||||
<p>Except as noted below, this catalog is released under <a target="_blank" href="http://www.mozilla.org/MPL/2.0/">Mozilla Public License, version 2.0</a>. The design is based on AMO website by <a target="_blank" href="https://www.mozilla.org">Mozilla</a> and adapted by JustOff under <a target="_blank" href="http://creativecommons.org/licenses/by-sa/3.0/">CC-BY-SA-3.0</a>. All product names, logos and brands are property of their respective owners, specific licenses are indicated in the description of each add-on. All company, product and service names used in this catalog are for identification purposes only.</p>
|
<p>Except as noted below, this catalog is released under <a target="_blank" href="http://www.mozilla.org/MPL/2.0/">Mozilla Public License, version 2.0</a>. The design is based on AMO website by <a target="_blank" href="https://www.mozilla.org">Mozilla</a> and adapted by JustOff under <a target="_blank" href="http://creativecommons.org/licenses/by-sa/3.0/">CC-BY-SA-3.0</a>. All product names, logos and brands are property of their respective owners, specific licenses are indicated in the description of each add-on. All company, product and service names used in this catalog are for identification purposes only.</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -95,14 +95,15 @@ let Addon = {
|
|||||||
} else if (Services.appinfo.name != "SeaMonkey") {
|
} else if (Services.appinfo.name != "SeaMonkey") {
|
||||||
appver = Services.appinfo.version;
|
appver = Services.appinfo.version;
|
||||||
}
|
}
|
||||||
|
data.downurl = "https://ca-archive.biz.tm/storage/" + Math.trunc(dbQuery.row.addon_id/1000) + "/" + dbQuery.row.addon_id + "/" + dbQuery.row.url.replace(/^\d+\/(.*)/,"$1") + "?origin=caa&action=";
|
||||||
if (appver && Services.vc.compare(dbQuery.row.min, appver) <= 0 && Services.vc.compare(appver, dbQuery.row.max) <= 0) {
|
if (appver && Services.vc.compare(dbQuery.row.min, appver) <= 0 && Services.vc.compare(appver, dbQuery.row.max) <= 0) {
|
||||||
data.compat = "add";
|
data.compat = "add";
|
||||||
data.action = "Install Now";
|
data.action = "Install Now";
|
||||||
data.downurl = "https://addons.mozilla.org/firefox/downloads/file/" + dbQuery.row.url;
|
data.downurl += "install";
|
||||||
} else {
|
} else {
|
||||||
data.compat = "download";
|
data.compat = "download";
|
||||||
data.action = "Download";
|
data.action = "Download";
|
||||||
data.downurl = "https://addons.mozilla.org/firefox/downloads/file/" + dbQuery.row.url.replace("/", "/type:attachment/");
|
data.downurl += "download";
|
||||||
}
|
}
|
||||||
let created = new Date(dbQuery.row.created*1000);
|
let created = new Date(dbQuery.row.created*1000);
|
||||||
data.created = created.toLocaleDateString('en-US', { year: 'numeric', month: 'long', day: 'numeric' });
|
data.created = created.toLocaleDateString('en-US', { year: 'numeric', month: 'long', day: 'numeric' });
|
||||||
|
|||||||
@@ -178,7 +178,7 @@ let List = {
|
|||||||
if (appver && Services.vc.compare(dbQuery.row.min, appver) <= 0 && Services.vc.compare(appver, dbQuery.row.max) <= 0) {
|
if (appver && Services.vc.compare(dbQuery.row.min, appver) <= 0 && Services.vc.compare(appver, dbQuery.row.max) <= 0) {
|
||||||
item = item.replace("%COMPAT%", "add");
|
item = item.replace("%COMPAT%", "add");
|
||||||
item = item.replace("%ACTION%", "Install Now");
|
item = item.replace("%ACTION%", "Install Now");
|
||||||
item = item.replace("%DOWNURL%", "https://addons.mozilla.org/firefox/downloads/file/" + dbQuery.row.url);
|
item = item.replace("%DOWNURL%", "https://ca-archive.biz.tm/storage/" + Math.trunc(dbQuery.row.addon_id/1000) + "/" + dbQuery.row.addon_id + "/" + dbQuery.row.url.replace(/^\d+\/(.*)/,"$1") + "?origin=caa&action=install");
|
||||||
} else {
|
} else {
|
||||||
item = item.replace("%COMPAT%", "download");
|
item = item.replace("%COMPAT%", "download");
|
||||||
item = item.replace("%ACTION%", "List Versions");
|
item = item.replace("%ACTION%", "List Versions");
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ let Versions = {
|
|||||||
data.next = parseInt(page) + 1;
|
data.next = parseInt(page) + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
dbQuery = db.createStatement("SELECT is_experimental, version, platform, release_notes, is_restart_required, versions.url AS url, min, max, size, created, licenses.name AS lic_name, licenses.url AS lic_url FROM addons INNER JOIN versions ON addons.addon_id = versions.addon_id LEFT JOIN licenses ON licenses.license_id = versions.license_id WHERE addons." + col + " = :query ORDER BY created DESC LIMIT 30 OFFSET :offset");
|
dbQuery = db.createStatement("SELECT addons.addon_id AS addon_id, is_experimental, version, platform, release_notes, is_restart_required, versions.url AS url, min, max, size, created, licenses.name AS lic_name, licenses.url AS lic_url FROM addons INNER JOIN versions ON addons.addon_id = versions.addon_id LEFT JOIN licenses ON licenses.license_id = versions.license_id WHERE addons." + col + " = :query ORDER BY created DESC LIMIT 30 OFFSET :offset");
|
||||||
dbQuery.params.query = query;
|
dbQuery.params.query = query;
|
||||||
dbQuery.params.offset = pfrom - 1;
|
dbQuery.params.offset = pfrom - 1;
|
||||||
data.items = "";
|
data.items = "";
|
||||||
@@ -113,15 +113,17 @@ let Versions = {
|
|||||||
} else if (Services.appinfo.name != "SeaMonkey") {
|
} else if (Services.appinfo.name != "SeaMonkey") {
|
||||||
appver = Services.appinfo.version;
|
appver = Services.appinfo.version;
|
||||||
}
|
}
|
||||||
|
let downurl = "https://ca-archive.biz.tm/storage/" + Math.trunc(dbQuery.row.addon_id/1000) + "/" + dbQuery.row.addon_id + "/" + dbQuery.row.url.replace(/^\d+\/(.*)/,"$1") + "?origin=caa&action=";
|
||||||
if (appver && Services.vc.compare(dbQuery.row.min, appver) <= 0 && Services.vc.compare(appver, dbQuery.row.max) <= 0) {
|
if (appver && Services.vc.compare(dbQuery.row.min, appver) <= 0 && Services.vc.compare(appver, dbQuery.row.max) <= 0) {
|
||||||
item = item.replace("%COMPAT%", "add");
|
item = item.replace("%COMPAT%", "add");
|
||||||
item = item.replace("%ACTION%", "Install Now");
|
item = item.replace("%ACTION%", "Install Now");
|
||||||
item = item.replace("%DOWNURL%", "https://addons.mozilla.org/firefox/downloads/file/" + dbQuery.row.url);
|
downurl += "install";
|
||||||
} else {
|
} else {
|
||||||
item = item.replace("%COMPAT%", "download");
|
item = item.replace("%COMPAT%", "download");
|
||||||
item = item.replace("%ACTION%", "Download");
|
item = item.replace("%ACTION%", "Download");
|
||||||
item = item.replace("%DOWNURL%", "https://addons.mozilla.org/firefox/downloads/file/" + dbQuery.row.url.replace("/", "/type:attachment/"));
|
downurl += "download";
|
||||||
}
|
}
|
||||||
|
item = item.replace("%DOWNURL%", downurl);
|
||||||
|
|
||||||
data.items += item;
|
data.items += item;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
<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 <Off.Just.Off@gmail.com></em:creator>
|
<em:creator>Off JustOff <Off.Just.Off@gmail.com></em:creator>
|
||||||
<em:homepageURL>https://github.com/JustOff/ca-archive/</em:homepageURL>
|
<em:homepageURL>https://github.com/JustOff/ca-archive/</em:homepageURL>
|
||||||
<em:updateURL>https://raw.githubusercontent.com/JustOff/ca-archive/master/update.xml</em:updateURL>
|
<em:updateURL>https://ca-archive.biz.tm/update.xml</em:updateURL>
|
||||||
<em:targetApplication>
|
<em:targetApplication>
|
||||||
<Description>
|
<Description>
|
||||||
<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
|
<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
|
||||||
|
|||||||
Referencia en una nueva incidencia
Block a user