Help - Search - Members - Calendar
Full Version: Фильтр для новых релизов
Metal Area - Extreme Music Portal > Offtopic Area / Кроме тяжёлой музыки > Smoking room
Storky
headcrab.png
вот это надо вставить в консоль браузера и запустить

(function($){
var tr = $('tr');
tr.each(function(){
var currentTr = $(this);
var links = $(this).find('a');
links.each(function(){
//убираем ненужные типы
var text = $(this).text();
if(text.indexOf('[ep]')+1){
currentTr.remove();
}
if(text.indexOf('[demo]')+1){
currentTr.remove();
}
if(text.indexOf('[live]')+1){
currentTr.remove();
}
if(text.indexOf('[single]')+1){
currentTr.remove();
}
if(text.indexOf('[split]')+1){
currentTr.remove();
}
if(text.indexOf('[compilation]')+1){
currentTr.remove();
}
if(text.indexOf('[bootleg]')+1){
currentTr.remove();
}
});
var descs = $(this).find('.desc');
descs.each(function(){
var text = $(this).find('span').text().toLowerCase();//lowercase

//наличие любимых стилей

if(!(
(text.indexOf('death')+1) ||
(text.indexOf('black')+1) ||
(text.indexOf('thrash')+1) ||
(text.indexOf('grind')+1) ||
(text.indexOf('pagan')+1) ||
(text.indexOf('heavy')+1) ||
(text.indexOf('groove')+1) ||
(text.indexOf('speed')+1)
)
){
currentTr.remove();
}

//наличие говностилей
if(
(text.indexOf('metalcore')+1)
){
currentTr.remove();
}
});

});
})(jQuery);
Storky
Больше говнокода богу говнокода! pray.gif 28.gif
22.gif

Добавил открытие в новых вкладках отфильтрованного. Но, из-за глюка в мозилке открытое некликабельно, порэтому желательно закрыть мозилку в диспетчере и снова запустить, пройтись по вкладкам контрол-табом.
В хроме вовсе не работает, открывается только первый линк, возможно нужен тротлинг.

КОД
(function($){
    var tr = $('tr');
    var rightLinks = [];

    tr.each(function(){
        var currentTr = $(this);
        var links = $(this).find('a');
        links.each(function(){
            //убираем ненужные типы
            var text = $(this).text();
            if(text.indexOf('[ep]')+1){
                currentTr.remove();
            }
            if(text.indexOf('[demo]')+1){
                currentTr.remove();
            }
            if(text.indexOf('[live]')+1){
                currentTr.remove();
            }
            if(text.indexOf('[single]')+1){
                currentTr.remove();
            }
            if(text.indexOf('[split]')+1){
                currentTr.remove();
            }
            if(text.indexOf('[compilation]')+1){
                currentTr.remove();
            }
            if(text.indexOf('[bootleg]')+1){
                currentTr.remove();
            }
        });
        var descs = $(this).find('.desc');
        descs.each(function(){
            var text = $(this).find('span').text().toLowerCase();//lowercase

            //наличие любимых стилей

            if(!(
                (text.indexOf('death')+1) ||
                (text.indexOf('black')+1) ||
                (text.indexOf('thrash')+1) ||
                (text.indexOf('grind')+1) ||
                (text.indexOf('pagan')+1) ||
                (text.indexOf('heavy')+1) ||
                (text.indexOf('groove')+1) ||
                (text.indexOf('speed')+1)
                )
                ){
                currentTr.remove();
            }

            //наличие говностилей
            if(
                (text.indexOf('metalcore')+1) || (text.indexOf('deathcore')+1) || (text.indexOf('crossover')+1)
                ){
                currentTr.remove();
            }
        });
    });

    $('.ipbtable tr').each(function(){
        var currentTr = $(this);
        var links = $(this).find('.row1').find('a');
        var rightLink = $(links).each(function(){
            if ($(this).attr('id')) {
                rightLinks.push($(this).attr('href'));
            }
        });
    });

    console.dir(rightLinks);
    $(rightLinks).each(function(index,value){
        //console.log(value);
        window.open(value)
    });
    
})(jQuery);
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2024 Invision Power Services, Inc.