This repository has been archived on 2024-10-29. You can view files and clone it, but cannot push or open issues or pull requests.
FunctionProject/scripts/pagesJS/short_links-list.js

12 lines
670 B
JavaScript
Raw Normal View History

$(function () {
/* Permet d'afficher la liste des liens récemment raccourcit */
try {
const shortcuts = JSON.parse(getCookieValue("shortcuts"));
window.onload = $('.totalLengthLinksList').html(`Total de ${shortcuts.length} lien(s) raccourcit récemment.`);
let resultat = "";
for (element of shortcuts) {
resultat += `<tr> <td class="original-link-list"><a href="${element["url"]}" target="_blank">${element["url"]}</a></td> <td class="link-list"><a href="${element["shortcut"]}" target="_blank">${element["shortcut"]}</a></td> </tr>`;
}
$(".links-list").append(resultat);
} catch(error) {}
});