<commit_before>// ==UserScript==
// @name         browse view: cleaner view by hiding duplicate name information
// @description  magiccardmarket.eu, magickartenmarkt.de
// @version      0.0.1
// @namespace    https://github.com/solygen/userscripts
// @repository   https://github.com/solygen/userscripts.git
// @license      MIT
// @require      https://ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js
//
// @include      https://www.magickartenmarkt.de/?mainPage=browseUserProducts*
// @include      https://www.magiccardmarket.eu/?mainPage=browseUserProducts*
// @include      https://fr.magiccardmarket.eu/?mainPage=browseUserProducts*
// @include      https://es.magiccardmarket.eu/?mainPage=browseUserProducts*
// @include      https://id.magiccardmarket.eu/?mainPage=browseUserProducts*
//
// @updateURL    https://rawgithub.com/solygen/userscripts/master/scripts-min/magickartenmarkt.de/browse-view-min.user.js
// @downloadURL  https://rawgithub.com/solygen/userscripts/master/scripts-min/magickartenmarkt.de/browse-view-min.user.js
// @homepage     https://github.com/solygen/userscripts

// ==/UserScript==

(function () {

    'use strict';

    var $summary = $('.navBarTopText').length ? $($('.navBarTopText').children()[0]) : $($('#siteContents').children()[2]),
        $table = $('tbody'),
        $rows = $('tbody').find('tr'),
        list = $($.find('.col_2')).find('a'),
        hits = 0,
        //flag green
        tolerance = 0.1,
        lastname;
 
    //sort cards (name, price)
    (function sortCards() {
        $rows.sort(function(a, b){
            //TODO: price > 9.99
            var keyA = $(a).find('.col_2').text() + $(a).find('.col_9').text().trim(),
                keyB = $(b).find('.col_2').text() + $(b).find('.col_9').text().trim();
            return keyA.localeCompare(keyB);
        });
    }());

    //apply order
    (function applyOrder() {
        $table.empty();
        $.each($rows, function (index, row){
            $table.append(row);
        });
    }());
    
    //add column header
    (function addColumnHeader() {
        var header = $('.col_price').clone();
        header
            .removeClass('col_price')
            .addClass('col_price_sold')
            .html('&empty;')
            .insertBefore($('.col_price'));
        //expand footer row<commit_msg>fix sort for prices > 9.99<commit_after>// ==UserScript==
// @name         browse view: cleaner view by hiding duplicate name information
// @description  magiccardmarket.eu, magickartenmarkt.de
// @version      0.0.1
// @namespace    https://github.com/solygen/userscripts
// @repository   https://github.com/solygen/userscripts.git
// @license      MIT
// @require      https://ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js
//
// @include      https://www.magickartenmarkt.de/?mainPage=browseUserProducts*
// @include      https://www.magiccardmarket.eu/?mainPage=browseUserProducts*
// @include      https://fr.magiccardmarket.eu/?mainPage=browseUserProducts*
// @include      https://es.magiccardmarket.eu/?mainPage=browseUserProducts*
// @include      https://id.magiccardmarket.eu/?mainPage=browseUserProducts*
//
// @updateURL    https://rawgithub.com/solygen/userscripts/master/scripts-min/magickartenmarkt.de/browse-view-min.user.js
// @downloadURL  https://rawgithub.com/solygen/userscripts/master/scripts-min/magickartenmarkt.de/browse-view-min.user.js
// @homepage     https://github.com/solygen/userscripts

// ==/UserScript==

(function () {

    'use strict';

    var $summary = $('.navBarTopText').length ? $($('.navBarTopText').children()[0]) : $($('#siteContents').children()[2]),
        $table = $('tbody'),
        $rows = $('tbody').find('tr'),
        list = $($.find('.col_2')).find('a'),
        hits = 0,
        //flag green
        tolerance = 0.1,
        lastname;
 
    //sort cards (name, price)
    (function sortCards() {
        $rows.sort(function(a, b){
            var keyA = $(a).find('.col_2').text() + parseFloat($(a).find('.col_9').text().trim(), 10) + 1000,
                keyB = $(b).find('.col_2').text() + parseFloat($(b).find('.col_9').text().trim(), 10) + 1000;
            return keyA.localeCompare(keyB);
        });
    }());

    //apply order
    (function applyOrder() {
        $table.empty();
        $.each($rows, function (index, row){
            $table.append(row);
        });
    }());
    
    //add column header
    (function addColumnHeader() {
        var header = $('.col_price').clone();
        header
            .removeClass('col_price')
            .addClass('col_price_sold')
            .html('&empty;')
            .insertBefore($('.col_price'));
        //expand footer row
{'fraction_non_alphanumeric': 0.19085106382978723, 'fraction_numerical': 0.010638297872340425, 'mean_word_length': 2.518712574850299, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 22, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6952694', 'n_tokens_mistral': 1563, 'n_tokens_neox': 1466, 'n_words': 222}