$(function () {
    $("div#loadpkg").slideDown();
    const container = $("div#pkglist");
    $.get(container.data("url"), function (result) {
        $("div#loadpkg").slideUp();
        $(container).html(result);
        $(container).slideDown();
        initRemoteAlerts(container);
        $(container).find(".tablesorter").DataTable({
            language: {
                url: $("body").data("datatables-translation")
            },
            columnDefs: [{targets: "no-sort", orderable: false}]
        });
        $(container).find(".btn-install").click(function (event) {
            event.preventDefault();
            const url = $(event.target).attr("href");
            const name = $(event.target).data("name");
            const message = AvailablePackageTranslation.AskForInstallPackage.replace
                    ("%pkg%", name);
            bootbox.confirm(message, function (confirmed) {
                if (confirmed) {
                    location.replace(url);
                }
            });
        });
    });
});

@@ -290,232 +290,41 @@
     
-$(container).find(%22.tablesorter%22).DataTable(%7B%0A            language: %7B%0A                url: $(%22body%22).data(%22datatables-translation%22)%0A            %7D,%0A            columnDefs: %5B%7Btargets: %22no-sort%22, orderable: false%7D%5D%0A        %7D
+initDataTables(%22.tablesorter%22
 );%0A
+%0A
     

Update available.js