@@ -1,8 +1,4 @@
|
||||
"use strict";
|
||||
let EXPORTED_SYMBOLS = ["List"];
|
||||
|
||||
var Cu = Components.utils;
|
||||
Cu.import("resource://gre/modules/Services.jsm");
|
||||
|
||||
let List = {
|
||||
|
||||
@@ -78,6 +74,10 @@ let List = {
|
||||
|
||||
let contfrag = document.createRange().createContextualFragment(template);
|
||||
let pagediv = document.getElementById("page");
|
||||
// Limpiar solo contenido dinámico, mantener cabecera
|
||||
Array.from(pagediv.children).forEach(child => {
|
||||
if (!child.classList.contains('amo-header')) child.remove();
|
||||
});
|
||||
let frag = contfrag.firstElementChild;
|
||||
pagediv.appendChild(frag.children[0]);
|
||||
pagediv.appendChild(frag.children[0]);
|
||||
@@ -150,9 +150,9 @@ let List = {
|
||||
item = item.replace(/%SLUG%/g, dbQuery.row.slug);
|
||||
item = item.replace("%SUMMARY%", dbQuery.row.summary);
|
||||
if (dbQuery.row.icon) {
|
||||
item = item.replace("%ICON%", "chrome://ca-archive/skin/icons/" + dbQuery.row.icon + ".png");
|
||||
item = item.replace("%ICON%", "../skin/icons/" + dbQuery.row.icon + ".png");
|
||||
} else {
|
||||
item = item.replace("%ICON%", "chrome://ca-archive/skin/icons/" + Math.trunc(dbQuery.row.addon_id/1000) + "/" + dbQuery.row.addon_id + ".png");
|
||||
item = item.replace("%ICON%", "../skin/icons/" + Math.trunc(dbQuery.row.addon_id/1000) + "/" + dbQuery.row.addon_id + ".png");
|
||||
}
|
||||
let users;
|
||||
if (dbQuery.row.users >= 0) {
|
||||
@@ -179,21 +179,11 @@ let List = {
|
||||
experiment = 'caution';
|
||||
}
|
||||
item = item.replace("%EXPERIMENT%", experiment);
|
||||
let appver;
|
||||
if (Services.appinfo.name == "Pale Moon") {
|
||||
appver = "27.9";
|
||||
} else if (Services.appinfo.name != "SeaMonkey" && Services.appinfo.name != "Iceape-UXP") {
|
||||
appver = Services.appinfo.version;
|
||||
}
|
||||
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("%ACTION%", "Install Now");
|
||||
item = item.replace("%DOWNURL%", "https://ca-archive.us.to/storage/" + Math.trunc(dbQuery.row.addon_id/1000) + "/" + dbQuery.row.addon_id + "/" + dbQuery.row.url.replace(/^\d+\/(.*)/,"$1") + "?origin=caa&action=install");
|
||||
} else {
|
||||
item = item.replace("%COMPAT%", "download");
|
||||
item = item.replace("%ACTION%", "List Versions");
|
||||
item = item.replace("%DOWNURL%", "caa:addon/" + dbQuery.row.slug + "/versions");
|
||||
}
|
||||
|
||||
// En WebExtensions no podemos instalar automáticamente, siempre mostrar versiones
|
||||
item = item.replace("%COMPAT%", "download");
|
||||
item = item.replace("%ACTION%", "List Versions");
|
||||
item = item.replace("%DOWNURL%", "#addon/" + dbQuery.row.slug + "/versions");
|
||||
|
||||
data.items += item;
|
||||
}
|
||||
@@ -237,27 +227,27 @@ let List = {
|
||||
<nav id="side-nav" class="c" data-addontype="1">
|
||||
<h2>Explore</h2>
|
||||
<ul id="side-explore">
|
||||
<li class="s-users"><em><a href="caa:list?sort=users">Most Popular</a></em></li>
|
||||
<li class="s-rating"><em><a href="caa:list?sort=rating">Top Rated</a></em></li>
|
||||
<li class="s-users"><em><a href="#list?sort=users">Most Popular</a></em></li>
|
||||
<li class="s-rating"><em><a href="#list?sort=rating">Top Rated</a></em></li>
|
||||
</ul>
|
||||
<h2>Categories</h2>
|
||||
<ul id="side-categories">
|
||||
<li id="c-0"><a href="caa:list%TAGC%">All</a></li>
|
||||
<li id="c-72"><a href="caa:list/alerts-updates%TAGC%">Alerts & Updates</a></li>
|
||||
<li id="c-14"><a href="caa:list/appearance%TAGC%">Appearance</a></li>
|
||||
<li id="c-22"><a href="caa:list/bookmarks%TAGC%">Bookmarks</a></li>
|
||||
<li id="c-5"><a href="caa:list/download-management%TAGC%">Download Management</a></li>
|
||||
<li id="c-1"><a href="caa:list/feeds-news-blogging%TAGC%">Feeds, News & Blogging</a></li>
|
||||
<li id="c-142"><a href="caa:list/games-entertainment%TAGC%">Games & Entertainment</a></li>
|
||||
<li id="c-37"><a href="caa:list/language-support%TAGC%">Language Support</a></li>
|
||||
<li id="c-38"><a href="caa:list/photos-music-videos%TAGC%">Photos, Music & Videos</a></li>
|
||||
<li id="c-12"><a href="caa:list/privacy-security%TAGC%">Privacy & Security</a></li>
|
||||
<li id="c-13"><a href="caa:list/search-tools%TAGC%">Search Tools</a></li>
|
||||
<li id="c-141"><a href="caa:list/shopping%TAGC%">Shopping</a></li>
|
||||
<li id="c-71"><a href="caa:list/social-communication%TAGC%">Social & Communication</a></li>
|
||||
<li id="c-93"><a href="caa:list/tabs%TAGC%">Tabs</a></li>
|
||||
<li id="c-4"><a href="caa:list/web-development%TAGC%">Web Development</a></li>
|
||||
<li id="c-73"><a href="caa:list/other%TAGC%">Other</a></li>
|
||||
<li id="c-0"><a href="#list%TAGC%">All</a></li>
|
||||
<li id="c-72"><a href="#list/alerts-updates%TAGC%">Alerts & Updates</a></li>
|
||||
<li id="c-14"><a href="#list/appearance%TAGC%">Appearance</a></li>
|
||||
<li id="c-22"><a href="#list/bookmarks%TAGC%">Bookmarks</a></li>
|
||||
<li id="c-5"><a href="#list/download-management%TAGC%">Download Management</a></li>
|
||||
<li id="c-1"><a href="#list/feeds-news-blogging%TAGC%">Feeds, News & Blogging</a></li>
|
||||
<li id="c-142"><a href="#list/games-entertainment%TAGC%">Games & Entertainment</a></li>
|
||||
<li id="c-37"><a href="#list/language-support%TAGC%">Language Support</a></li>
|
||||
<li id="c-38"><a href="#list/photos-music-videos%TAGC%">Photos, Music & Videos</a></li>
|
||||
<li id="c-12"><a href="#list/privacy-security%TAGC%">Privacy & Security</a></li>
|
||||
<li id="c-13"><a href="#list/search-tools%TAGC%">Search Tools</a></li>
|
||||
<li id="c-141"><a href="#list/shopping%TAGC%">Shopping</a></li>
|
||||
<li id="c-71"><a href="#list/social-communication%TAGC%">Social & Communication</a></li>
|
||||
<li id="c-93"><a href="#list/tabs%TAGC%">Tabs</a></li>
|
||||
<li id="c-4"><a href="#list/web-development%TAGC%">Web Development</a></li>
|
||||
<li id="c-73"><a href="#list/other%TAGC%">Other</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</section>
|
||||
@@ -270,12 +260,12 @@ let List = {
|
||||
<div id="sorter" class="c pjax-trigger">
|
||||
<h3>Sort by:</h3>
|
||||
<ul>
|
||||
<li %SORT0%><a class="opt" href="caa:list%CAT%?%TAG%sort=users">Most Users</a></li>
|
||||
<li %SORT1%><a class="opt" href="caa:list%CAT%?%TAG%sort=rating">Top Rated</a></li>
|
||||
<li %SORT2%><a class="opt" href="caa:list%CAT%?%TAG%sort=reviews">Most Reviews</a></li>
|
||||
<li %SORT3%><a class="opt" href="caa:list%CAT%?%TAG%sort=created">Newest</a></li>
|
||||
<li %SORT4%><a class="opt" href="caa:list%CAT%?%TAG%sort=updated">Recently Updated</a></li>
|
||||
<li %SORT5%><a class="opt" href="caa:list%CAT%?%TAG%sort=name">Name</a></li>
|
||||
<li %SORT0%><a class="opt" href="#list%CAT%?%TAG%sort=users">Most Users</a></li>
|
||||
<li %SORT1%><a class="opt" href="#list%CAT%?%TAG%sort=rating">Top Rated</a></li>
|
||||
<li %SORT2%><a class="opt" href="#list%CAT%?%TAG%sort=reviews">Most Reviews</a></li>
|
||||
<li %SORT3%><a class="opt" href="#list%CAT%?%TAG%sort=created">Newest</a></li>
|
||||
<li %SORT4%><a class="opt" href="#list%CAT%?%TAG%sort=updated">Recently Updated</a></li>
|
||||
<li %SORT5%><a class="opt" href="#list%CAT%?%TAG%sort=name">Name</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -284,12 +274,12 @@ let List = {
|
||||
</div> <!-- items -->
|
||||
|
||||
<nav class="paginator c pjax-trigger">
|
||||
<p class="num">Page <a href="caa:list%CAT%?%TAG%sort=%SORT%&page=%PAGE%">%PAGE%</a> of <a href="caa:list%CAT%?%TAG%sort=%SORT%&page=%PAGES%">%PAGES%</a></p>
|
||||
<p class="num">Page <a href="#list%CAT%?%TAG%sort=%SORT%&page=%PAGE%">%PAGE%</a> of <a href="#list%CAT%?%TAG%sort=%SORT%&page=%PAGES%">%PAGES%</a></p>
|
||||
<p class="rel">
|
||||
<a href="caa:list%CAT%?%TAG%sort=%SORT%&page=1" title="Jump to first page" class="jump %DISPREV%">◂◂</a>
|
||||
<a href="caa:list%CAT%?%TAG%sort=%SORT%&page=%PREV%" class="button prev %DISPREV%">◂ Previous</a>
|
||||
<a href="caa:list%CAT%?%TAG%sort=%SORT%&page=%NEXT%" class="button next %DISNEXT%">Next ▸</a>
|
||||
<a href="caa:list%CAT%?%TAG%sort=%SORT%&page=%PAGES%" title="Jump to last page" class="jump %DISNEXT%">▸▸</a>
|
||||
<a href="#list%CAT%?%TAG%sort=%SORT%&page=1" title="Jump to first page" class="jump %DISPREV%">◂◂</a>
|
||||
<a href="#list%CAT%?%TAG%sort=%SORT%&page=%PREV%" class="button prev %DISPREV%">◂ Previous</a>
|
||||
<a href="#list%CAT%?%TAG%sort=%SORT%&page=%NEXT%" class="button next %DISNEXT%">Next ▸</a>
|
||||
<a href="#list%CAT%?%TAG%sort=%SORT%&page=%PAGES%" title="Jump to last page" class="jump %DISNEXT%">▸▸</a>
|
||||
</p>
|
||||
<p class="pos">Showing <b>%PFROM%</b>–<b>%PTO%</b> of <b>%COUNT%</b></p>
|
||||
</nav>
|
||||
@@ -305,14 +295,14 @@ let List = {
|
||||
<div class="item addon">
|
||||
<div class="info">
|
||||
<h3>
|
||||
<a href="caa:addon/%SLUG%"><img src="%ICON%" alt="">%NAME%</a>
|
||||
<a href="#addon/%SLUG%"><img src="%ICON%" alt="">%NAME%</a>
|
||||
%RESTART%
|
||||
</h3>
|
||||
<p class="desc">%SUMMARY%</p>
|
||||
<div class="vitals c">
|
||||
<span class="rating">
|
||||
<span class="stars stars-%RATING%" title="Rated %RATING% out of 5 stars">Rated %RATING% out of 5 stars</span>
|
||||
<a href="caa:addon/%SLUG%">%REVIEWS%</a>
|
||||
<a href="#addon/%SLUG%">%REVIEWS%</a>
|
||||
</span>
|
||||
%USERS%
|
||||
</div>
|
||||
|
||||
Referencia en una nueva incidencia
Block a user