Snatched Sorter for filelist.ro

Sort items in filelist.ro by most snatched per page.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name       Snatched Sorter for filelist.ro
// @namespace  Snatched Sorter FL
// @version    1.4.1
// @description Sort items in filelist.ro by most snatched per page.
// @include     *filelist.ro/*
// @copyright   2019, SyShade
// @require     https://code.jquery.com/jquery-3.4.1.min.js
// ==/UserScript==

$(function () {
    $(".torrentrow div:nth-child(8)").each(function () {
        var th = $(this).parent();
        var vl = $(this).text().slice(0, -5);
        var vls = vl.replace(/,/g, "");
        var vlint = parseInt(vls);
        $(this).parent().attr("data-value", vlint);
    });
    var rows = $('.torrentrow [data-value]');
    $('.visitedlinks').append("<div class='table'>");
    $('.table').append(rows);
    $('[data-value]').sort(function (a, b) {
        return $(b).data('value') - $(a).data('value');
    }).appendTo('.table');
});