• If you are having trouble changng your password please click here for help.

Max Price Filtering Tip

Status
Not open for further replies.

chupacabra

Default rank <3000 posts Supporter
ODT Junkie!
30   0
Joined
Dec 4, 2020
Messages
2,748
Reaction score
1,122
Location
Tucker
Hello fam!
You can use the following code to filter results that cost more than what you want to spend. Just paste it into the browser's console and hit enter.
Paste this code into your browser's console (ctrl+shift+i) and change the "a=550" to your max price:
JavaScript:
a=550;
$('.fieldContainer--price').each(function(){if(parseInt($(this).text().trim().replace(/^\D+|\D+$/g,'').replace(',',''))>a)$(this).closest('.structItem').hide();});
$('.listInline.listInline--bullet>li').each(function(){if(parseInt($(this).text().trim().replace(/^\D+|\D+$/g,'').replace(',',''))>a)$(this).closest('.block-row.block-row--separated').hide();});

Then, if you want to be able to see bigger thumbnails you can use these lines:
JavaScript:
$('.avatar.avatar--s').css({'width':'250px','height':'250px'});
$('.structItem-cell.structItem-cell--icon').css('width','270px');
$('.structItem-cell--meta').css('display','none');
$('.structItem-cell.structItem-cell--latest').css('width','90px');
$('.structItem-cell--iconEnd').css('display','none');

Combine it all in a single line for simplicity!
JavaScript:
a=550;$('.avatar.avatar--s').css({'width':'250px','height':'250px'});$('.structItem-cell.structItem-cell--icon').css('width','270px');$('.structItem-cell--meta').css('display','none');$('.structItem-cell.structItem-cell--latest').css('width','90px');$('.structItem-cell--iconEnd').css('display','none');$('.fieldContainer--price').each(function(){if(parseInt($(this).text().trim().replace(/^\D+|\D+$/g,'').replace(',',''))>a)$(this).closest('.structItem').hide();});$('.listInline.listInline--bullet>li').each(function(){if(parseInt($(this).text().trim().replace(/^\D+|\D+$/g,'').replace(',',''))>a)$(this).closest('.block-row.block-row--separated').hide();});

pro tip: once you paste and hit enter, after you switch pages, you can press the key "arrow up" in the console and it will recall the code. You only need to hit enter from there.
 
Status
Not open for further replies.
Back
Top Bottom